1

I would like to capture continuous frames from a mpeg video file starting from a specific time stamp. That means assume that I have a video which has total duration of 2 minutes. I need to capture all the frames which are continuous from time 00:01:00. I also want to limit the number of frames capturing to 20. How can I make ffmpeg executable to do this

Thanks Faisal

1 Answer 1

5

As covered in the docs:

ffmpeg -ss 60 -i input.mpg -frames:v 20 frame_%d.png

Will start reading from the input at sixty seconds, and will write 20 video frames to frame_1.png, frame_2.png, frame_3.png, etc.

The note in the docs about the accuracy of -ss when used to modify the input file versus the output file if a slower but more accurate timing is necessary.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried it out several times. But I am facing a problem again and again. I am able to capture only one frame. What I meant by that is all the 20 frames I am trying to capture is the same. I am not getting the next frame. I don't know why this happens. Please help me
@user1537351 Try the more accurate timing by putting -ss ... after the input. Maybe that will help. Using the latest version of FFmpeg couldn't hurt either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.