Comments (8)
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.
So does it work with the line I gave above ?
from moviepy.
So does it work with the line I gave above ?
from moviepy.
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.
@sergiobuj This error means that the program cannot detect ImageMagick. Did you install ImageMagick ?
from moviepy.
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.
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.
Got it, thanks!
I will install ImageMagick (and Pygame) because the gifs really look ugly.
from moviepy.
Related Issues (20)
- No sound HOT 2
- how to keep the aspect ratio for my vertical video? HOT 5
- I cut 1800 seconds of audio, but the result is 1846 seconds. Why is this happening? How can I solve this problem?
- Resizable rounded rectangle
- Getting `AttributeError: 'NoneType' object has no attribute 'get_frame'` when trying to save a `CompositeVideoClip`
- Error When Generating a Long video and not getting the error when generating a shorter video HOT 1
- AttributeError: 'NoneType' object has no attribute 'get_frame' when calling write_videofile HOT 1
- Vertical MOV video to MP4 HOT 3
- yielding write_videofile progress HOT 5
- Output video without sound
- Inconsistent video duration before and after write_videofile HOT 1
- Audio glitching when concatenating with moviepy
- Error Using MoviePy in Django Project on Linux (Python 3.12, MoviePy 1.0.3)
- Adapt to setuptools v72 HOT 4
- How to obtain an AudioArrayClip or AudioFileClip object from a MP3 BytesIO object?
- CompositeAudioClip not compute duration
- Documentation in a PDF or any other downloadable format please?
- Incorrect Rendering of Bengali Ligatures in Subtitles Using MoviePy HOT 2
- How to set opacity in text_clip using Lambda
- Moviepy unable to concatenate a long list of videos but is able to concatenate a short list of videos
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.