I'd like to repeat one frame from a source video to output. I've tried the following

avconv -ss 00:20:00 -i INPUT_VIDEO -t 0.5 -vsync 1 -an -r 1 -vcodec libx264 VIDEO_1F
avconv -i VIDEO_1F -t 10 -r 1 -vcodec libx264 OUTPUT_VIDEO

But I found that -ss doesn't work in the former command, and it would always extract the first frame of input video; in the latter -t has no effects and the duration of the output video will be 2 seconds.

Any suggestion? Or, is there a better approach?

1 Answer 1


I've got a way out, with also 2 steps.

First extract the frame

avconv -ss 00:20:00 -i INPUT_VIDEO -vsync 1 -t 0.01 output.png

There is a chance that avconv extracts more than one frame within 0.01s, and terminates with an error "... Could not get frame filename number 2 from pattern 'output.png' ...". But don't mind since we need only the first frame.

Then convert the image to video

avconv -loop 1 -i output.png -vcodec libx264 -tune stillimage -t 10 OUTPUT_VIDEO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.