[FFmpeg-user] Convert Single Image

Lou Logan lou at lrcd.com
Mon Dec 4 21:15:53 EET 2017

On Mon, Dec 4, 2017, at 08:45 AM, Damien Gallagher wrote:
> Hi
> I am trying to convert a single jpg image to a video
> I am creating a list of training videos and I want to an intro video
> based
> on images I create used Graphics2D in java
> When I run the following command - it runs fine
> ffmpeg.exe -y -v error -i intro.jpg -r 1/5 intro_1.mp4
> The file will play on my pc but it wont play in youtube or on my android
> phone
> Are there any restrictions on the image type / size or the generated
> video?

To make a video from a single image you'll need to loop it, provide a
not-too-low frame rate, and a duration:

ffmpeg -loop 1 -framerate 10 -t 5 -i input.jpg -vf format=yuv420p

If the duration is long you can save a little time by using a low input
-framerate then change the output frame rate with the -r output option
or fps filter with a more common rate.

Your Android player will require "-vf format=yuv420p" (or the "-pix_fmt
yuv420p" alias) but YouTube will not.

More information about the ffmpeg-user mailing list