-2

Below is the ffmpeg command to convert still images into video with the delay of 5 seconds to each image.

ffmpeg -f image2 -r 1/5 -i img%03d.png -vcodec libx264 out.mp4

This command is working fine. I just wanted to know, whether it is possible to put two parameters for -vcodec, as along with libx264, I also want to use H264, to make that video work even on i-phone.

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
Narendra Singh
  • 3,990
  • 5
  • 37
  • 78

1 Answers1

1

Adding another -vcodec does not make sense unless you want two different outputs. Secondly, h264 is the name of the H.264 decoder in ffmpeg. If your build of ffmpeg supports libx264, then using h264 as an encoder is simply an alias for libx264; otherwise ffmpeg will report Unknown encoder 'h264'.

Apple devices support varying H.264 profiles depending on the model. For broad compatibility simply add the following as output options:

-profile:v baseline -level 30


Note that ffmpeg usage questions are better suited for superuser.com. Stack Overflow is limited to programming discussions.

llogan
  • 121,796
  • 28
  • 232
  • 243