="http://www.w3.org/2000/svg" viewBox="0 0 512 512">

4 Extract Frames

  1. You’ll need the start and end times of the clip you want. These are the ‘-ss’ and ‘-to’ flags in the command below.
  2. Determine how many frames you want to extract. This is what goes into the option ‘-r 5/1’ below.
  3. Combine them all to make a ffmpeg command like this:
  4. ffmpeg -i test.mp4 -r 5/1 -ss 00:03 -to 00:10 test%03d.png

    Animated gif showing a terminal with this command executed: ffmpeg -i test.mp4 -r 5/1 -ss 00:03 -to 00:10 test%03d.png

    Extracting frames from the clip.

  5. 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.

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Extract Frames by York University Libraries is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book