michbeck
michbeck

Reputation: 745

FFMPEG Thumbnail Generation in certain timespan

I'm generating thumbnails in regular intervals based on the length of a video:

ffmpeg -i "/my/dir/tmp/mymovie.mp4" -vf fps=4/259 /my/dir/tmp/123456/mymoviethumb%d.jpg

Now I want to use just the first 30 seconds of the video and grab 5 thumbnails out of them. I'm stuck, can anybody help me out and give me an example command how can i do that?

Upvotes: 0

Views: 286

Answers (1)

aergistal
aergistal

Reputation: 31229

ffmpeg -i input.mp4 -t 30 -vf fps=1/6:round=inf out_%d.jpg

where:

-t 30 - limit duration to 30s

fps=1/6 - 30s / 5 = 6s, round away from 0

Upvotes: 1

Related Questions