Giter Club home page Giter Club logo

Comments (3)

Zulko avatar Zulko commented on May 16, 2024

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.

Zulko avatar Zulko commented on May 16, 2024

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.

RealJTG avatar RealJTG commented on May 16, 2024

Yes, works like a charm, thanks.

from moviepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.