Comments (3)
Thanks for the feedback. I fixed (I hope) the GIF reading, now you can read gifs easily using VideoFileClip.
For your second point, I am hesitating. A way you could do that for the moment is as follows:
clip = VideoFileClip("myfile.gif")
fps = 1.0*clip.reader.fps
start_frame, end_frame = 5, 15
start_t, end_t = start_frame/fps, end_frame/fps
cut_clip = clip.subclip(start_t, end_t)
I could add these steps into "subclip". However, the philosophy of MoviePy (which can always change) is that the user doesn't have to care about frames and frame rates, and many clips (like image clips or custom-made clips) don't have a frame rate at all. The only clips which have frame rates are VideoFileClips, but the moment you transform them, for instance with clip.speedx(2), they lose it. So that would create this situation:
clip = VideoFileClip("myclip.mp4")
clip.subclip(frame_start=5, frame_end=15).speedx(2) # works
clip.speedx(2).subclip(frame_start=5, frame_end=15) # doesn't work
I'll think about it.
from moviepy.
Does GIF reading works for you now ? I also recently fixed the transparency. Now you can load gifs with transparent backgrounds with VideoFileClip.
from moviepy.
Yes, works like a charm, thanks.
from moviepy.
Related Issues (20)
- Release 0.2.4.0 missing
- video.preview() has a bug after concatenate_videoclips in version 1.0.3
- TypeError: '<' not supported between instances of 'str' and 'int' HOT 1
- Audio out of sync for combined DASH video
- Inconsistent duration for composite output HOT 1
- Trying to hide the Logger Bar in the console
- Text For Stroke/Outline Doesn't Align properly
- Unable to set FPS in GIFs
- Can I run 'write_videofile' function with GPU ? HOT 2
- I have a doubt, as shown in the picture, I get a 403 from my program, but from the browser it works!
- Saving the same video clip twice will yield different results
- Decorator not working correctly fps remains to be None and cause TypeError
- Sound doubling / looping when merging clips. HOT 1
- ffmpeg interpets video title as a command line argument when it begins with "-"
- Audio out of sync when I grab window bar.
- Bug in CompositeVideoClip
- Efficiency Disparity Between MoviePy and FFmpeg
- A household appliances company in the Netherlands and all of Europe, King Import Export, announces the theft of a container of household appliances and warns customers to beware of purchasing the product without invoices. The invoice must bear the company seal, King Import Export, so as not to be exposed to problems.
- ImageMagick Binary Not Found HOT 2
- King1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moviepy.