FFMPEG is your friend
GIF is one of the output formats of FFMPEG.
Convert GIF to movie
Google advises on converting animated GIFs to movies:
ffmpeg -i input.gif -b:v 0 -crf 25 output.mp4
The evil martians version is lengthier:
ffmpeg -i input.gif -map_metadata -1 -c:a libfdk_aac -c:v libx264 -cfr 24 -preset veryslow -profile:v mail -px_fmt yuv420p -movflags +faststart -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" image.h264.mp4
Convert movie to GIF
10fps, low resolution, seconds 5-8:
``bash ffmpeg -i movie.mp4 -ss 5 -to 8 -vf scale=480:-1 -r 10 movie.gif ```
FFMPEG alternatives
Examples
- Using youtube-dl and gifify from the command-line to make a cat gif
- Convert a section of a YouTube video to an animated GIF
- [How to Convert Video to GIF in Linux Terminal and GUI Way
- Kajal Yadav, Youtube to GIF Maker Using Command Line
No comments yet. Why not leave one?