Generating a video from a stillimage

In our videoproduction at work, we often need to use stillimages in a given video.

So: Here's a pretty simple way of generating a movie based on stretching an image to stillframing for a given number of seconds.

ffmpeg -loop 1 -r 25 -t 6 -i kittycat.jpg -q:v 2 -an cutekitty.avi

The options used here are:

-loop 1: Causes the input to loop forever.

-r 25: Sets the framerate, in this case 25 fps.

-t 6: The time (in seconds), the video should last.

-q:v 2: Sets the quality. The higher the number, the lower the quality. Also note, this may be different on your ffmpeg version, as the parameter name has changed in different versions.

-an: "Audio none". Does not generate an audio track.

Finally, note that ffmpeg is pretty picky about the way parameters are handled, so parameters affecting input, have to be grouped with the appropriate input, the same goes for output parameters.

Enjoy!