scripts:ffmpeg:convert_still_image_to_video

Convert still image to a video

You can convert a still picture into a video of your specified length. You just need to loop the input, and provide -t to set the time.

In the below, change the -t for how long the resulting video should be and mark -loop 1 for the input. All other parameters are placeholders and don't really matter.

I found it helpful to specify pix_fmt since otherwise it tends to use yuv444p (which is good for better colours) but fails with some codecs that don't support it.

ffmpeg -loop 1 -i input.png -c:v libx264 -crf 18 -r 30 -t 10 -pix_fmt yuv420p output.mkv
  • scripts/ffmpeg/convert_still_image_to_video.txt
  • Last modified: 2022-04-06 19:39
  • by Tony