TTOF_00866

Frame Grabbing

I needed to export one jpeg out of every Nth frame of a video – so that I can pick frames for reference when colour grading (in my case it was “The Tree of Life”).
ffmpeg came to the rescue!

Here’s a quick way to do this with its command-line version (which you can download here):

ffmpeg -i input -filter:v "select=not(mod(n\,step)),setpts=N/((fps)*TB)" -qscale:v 2 output_%05d.jpg

where input is the input video file, step means “one frame every N frame”, fps are the frame per seconds of the input video, output is the output file name.

in my case this command line

/Applications/ffmpeg -i ~/Desktop/TTOF.mkv -filter:v "select=not(mod(n\,125)),setpts=N/((25)*TB)" -qscale:v 2 ~/Desktop/TTOF/TTOF_%05d.jpg

did the trick, outputting 1 out every 125 frames (which, in my 25 fps PAL world, means 1 frame every 5 seconds).

-->

Tags