What frame does ffmpeg do when frame rate is reduced?

I have a video that I would like to convert to image frames every 2 seconds.

For example, if a video lasts 7 seconds at 15 frames per second, I would like to get frames 1, 31, 61, 91.

Team:

ffmpeg -i foo.mp4 -r 0.5  -f image2 -vcodec mjpeg foo%d.jpg

It seems to do what I want, but what frame does it get? 1, 31, 61, 91 or 30, 60, 90 or 13, 43, 73, 103?

+3
source share
2 answers

The first image will be from the very first frame.

, , . , / , ffmpeg . : 7 ? 7,63 ?

+1

ffmpeg:

ffmpeg -v 3 -vsync 0 -sameq -i movie.mpr  -f image2 "images-%03d.jpeg"

JPEG 1 . , , 30 , 60- .

+1

Source: https://habr.com/ru/post/1719899/


All Articles