Making a GIF using FFMPEG

First, open terminal install FFMPEG

brew install ffmpeg

Done!

Now cd over to the directory your videos are and run ffmpeg on the video you want to convert to a GIF. Something like this:

ffmpeg -ss 20.0 -t 3.0 -i 0303201545.mp4 -s 480x320 -f gif vid1.gif

This will seek (-ss) 20 seconds, then grab 3 seconds (-t) of the video, output (-s) as a 480×320 gif

Resulting File:

Animation of the process:

And the command to convert the screen cast from MOV to GIF and speed up the GIF:

ffmpeg -ss 0.0 -t 17.0 -i Screen\ Recording\ 2020-03-03\ at\ 4.54.25\ PM.mov -filter:v "setpts=0.1*PTS,scale=720:-1" -f gif howtoffmpeg.gif

setpts=0.1 speeds up the video

scale=720:-1 changes the scale of the video to 720 wide and keeps the aspect ratio of the video.

That’s it. The GIFs make uploading to the Crashspace WordPress blog easier.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.