I would like to create a blank video and add images (occupying the entire screen) throughout the video for a very short amount of time (a frame or a second).

I found a command to create the blank video:

ffmpeg -t 7200 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero empty.mpeg

Now let's say I have an image. I want to insert the image into the video at the 8th second (or some other arbitrary second), and I want it to remain there only briefly.

How can I do this?

1 Answer 1


Use the color, scale2ref, and overlay filters. Include the enable option with an expression.

ffmpeg -f lavfi -i color=c=black:s=640x480:d=7200 -i iamge.png -filter_complex "[1][0]scale2ref=oh*mdar:ih[fg][bg];[bg][fg]overlay=(W-w)/2:(H-h)/2:enable='eq(t,8)'[v]" -map "[v]" output

Your Answer

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

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