In addition to the select filter in Gyan's answer (which I use with eq
rather than between
), I came across another filter in the manual: thumbnail
Select the most representative frame in a given sequence ofconsecutive frames.
The filter accepts the following options:
- n: Set the frames batch size to analyze; in a set of n frames, the filter will pick one of them, and then handle the next batch of nframes until the end. Default is 100.
Since the filter keeps track of the whole frames sequence, a bigger nvalue will result in a higher memory usage, so a high value is notrecommended.
Examples
Extract one picture each 50 frames:
thumbnail=50
Complete example of a thumbnail creation with ffmpeg:
ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png