- You’ll need the start and end times of the clip you want. These are the ‘-ss’ and ‘-to’ flags in the command below.
- Determine how many frames you want to extract. This is what goes into the option ‘-r 5/1’ below.
- Combine them all to make a ffmpeg command like this:
- Delete extraneous frames. In most cases for gifs you want to minimize the amount of images/frames you’ll use. This will keep your file size down.
ffmpeg -i test.mp4 -r 5/1 -ss 00:03 -to 00:10 test%03d.png