Take screenshot in the middle of ffmpeg / ffprobe video?

Asked

Viewed 117 times

2

I would like the time that Thumb was generated to correspond to 50% of the time of the episode with ffmpeg I am using this code

$ffmpeg -ss 00:00:18 -i $video -vf scale=800:-1 -vframes 1 $output

How do I stop instead of 00:00:18, be the exact time in the middle of the video?

1 answer

1

To catch a frame in the second 18:

ffmpeg -ss 18 -i video.mp4 -vframes 1 -f image2 frame.jpg
  • If you need to save to a different size add the -s parameter with the desired resolution: ffmpeg -ss 18 -i video.mp4 -vframes 1 -s 320x240 -f image2 frame.jpg

Browser other questions tagged

You are not signed in. Login or sign up in order to post.