GithubHelp home page GithubHelp logo

Comments (8)

Zulko avatar Zulko commented on August 25, 2024

I am not sure I understand. If you have ffmpeg, you can do:

myclip.to_gif('animation.gif', fps=10, program='ffmpeg')

Doesn't this work ?

I have seen your other commits, I am not sure it is a good idea to have a global variable for the gif program. Most of the time, I use ImageMagick, but sometimes the result is not good, so I want to try with ffmpeg (they yield very different results).

from moviepy.

Zulko avatar Zulko commented on August 25, 2024

So does it work with the line I gave above ?

from moviepy.

Zulko avatar Zulko commented on August 25, 2024

So does it work with the line I gave above ?

from moviepy.

sergiobuj avatar sergiobuj commented on August 25, 2024

I was also getting something like:

/usr/local/lib/python2.7/dist-packages/moviepy/tools.pyc in subprocess_call(cmd, verbose, errorprint)
     23     verboseprint( "\nMoviePy Running:\n>>> "+ " ".join(cmd) )
     24 
---> 25     proc = sp.Popen(cmd, stderr = sp.PIPE)
     26 
     27     out, err = proc.communicate() # proc.wait()
OSError: [Errno 2] No such file or directory

But adding the program='ffmpeg' parameter to to_gif worked for me.

from moviepy.

Zulko avatar Zulko commented on August 25, 2024

@sergiobuj This error means that the program cannot detect ImageMagick. Did you install ImageMagick ?

from moviepy.

sergiobuj avatar sergiobuj commented on August 25, 2024

I didn't install ImageMagick, but the extra parameter worked.
Is 'to_gif' one of the advanced features? because I didn't install Pygame either.

from moviepy.

Zulko avatar Zulko commented on August 25, 2024

The default parameter for "program" is "ImageMagick", and it will only work if ImageMagick is installed on your computer. If you change it to ffmpeg you can make gifs using ffmpeg (but these are generally heavy and ugly).

Pygame is not needed for gifs, it is needed if you want to make previews of your gifs/videos before writing them to a file, it is especially useful if you use the IPython Notebook.

Thanks for the feedback, I will make more explicit error messages for the "couldn't find imagemagick" case.

from moviepy.

sergiobuj avatar sergiobuj commented on August 25, 2024

Got it, thanks!
I will install ImageMagick (and Pygame) because the gifs really look ugly.

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.