home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Getting Individual Frames And Matching Thumbnails From A Video With ffmpeg

December 2022

Or, An Easier Way To Make Animate GIFs

This is how to generate the initial set of thumbnails (one per frame)

Code
ffmpeg -i "input.mp4" -vf "scale=800:-2" -y "frames/%d.jpg"

Then you can access an individual frame based of the numbers with this (which is zero indexed subtract one to get the frame number your after:

Code
export INPUT=Prince-Sexy-MF-bfHsF6FKgb4.mp4 && \
export FRAME=2952&& \
ffmpeg -i "$INPUT" -vf "select=eq(n\,$FRAME-1)" -vframes 1 -y "frame-$FRAME.png"
═══ § ═══