1

I am trying to grab images from an mp4. The video is 241 seconds long and looking at data from VLC player I can see that the Frame rate is 4.

I would like to grab an image from the video every 5 seconds. Since 241/5 = 48.2 In total I would like to have around 49 images in the end.

How can I do this?

I tried the following simply by trial and error:

ffmpeg -i ~/inputvideo.mp4 -r 0.4 -t 240 image-%d.png

This gives me a total of 50 images from the video.

1 Answer 1

1

I think the correct string would be

ffmpeg -i ~/inputvideo.mp4 -vf fps=1/5 image-%d.png

thereas fps=1/5 is one Frame every 5 seconds. If you want to create one picture every minute, it would be

ffmpeg -i ~/inputvideo.mp4 -vf fps=1/60 image-%d.png

edit Here's also a documentation which seem to suit your needs

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .