Ffmpeg to capture a screen shot of a video in exact time mode

I use ffmpeg to capture a screenshot from a video. Here is the command code:

ffmpeg -i /my_video_file_dir/video.flv -y -f image2 -ss 8 -sameq -t 0.001 -s 320*240 /image_dir/screenshot.jpg 

And I want to capture a screenshot in the exact timeline 8.344, for example

But it does not display a screenshot of the above command.

In my test, -ss 1,1,5,2,2,5 ... works fine, while others are not the same as 1.1.1.11

Does anyone know why this is happening and how I can take a screenshot from x.xxx

+6
ffmpeg
source share
1 answer

Try this instead:

 ffmpeg -ss 00:00:01.01 -i /my_video_file_dir/video.flv -y -f image2 \ -vcodec mjpeg -vframes 1 /image_dir/screenshot.jpg 

Please note that very small increments usually do not result in different images due to the lower frame rate of most videos. The increments of 0.001s only work with video clips with a frame rate of 1000 frames per second :) 0.03 increments should work with video at 30fps, etc.

+18
source share

All Articles