If you know exactly what frames to extract, for example, 1, 200, 400, 600, 800, 1000, try using:
select='eq(n\,1)+eq(n\,200)+eq(n\,400)+eq(n\,600)+eq(n\,800)+eq(n\,1000)' \ -vsync vfr -q:v 2
I use this with the Imagemagick editing pipeline to get 10 preview frames from any video. Obviously the frame numbers you need to find out with ffprobe
ffmpeg -i myVideo.mov -vf \ select='eq(n\,1)+eq(n\,200)+eq(n\,400)+eq(n\,600)+eq(n\,800)+eq(n\,100)',scale=320:-1 \ -vsync vfr -q:v 2 -f image2pipe -vcodec ppm - \ | montage -tile x1 -geometry "1x1+0+0<" -quality 100 -frame 1 - output.png
,
A little explanation:
- In expressions, ffmpeg
+ stands for OR and * stands for AND \, Just an escape , character- Without
-vsync vfr -q:v 2 doesn't seem to work, but I donβt know why - anyone?
Voy Mar 23 '16 at 10:25 2016-03-23 ββ22:25
source share