FFMPEG : custom sequence input images

后端 未结 2 1212
情书的邮戳
情书的邮戳 2021-01-15 11:24

I created a video from a set of images.

The command look like:

ffmpeg -i bg.jpeg -i img_%d.png -filter_complex overlay=5:H-h-5[b]-shortest testvid.mp         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 11:54

    You can use the concat demuxer with the custom sequence.

    First, create a text file:

    file 'img_0.png'
    file 'img_1.png'
    file 'img_1.png'
    file 'img_2.png'
    file 'img_1.png'
    file 'img5.png'
    file 'img_4.png'
    

    Then run

    ffmpeg -i bg.jpeg -f concat -r 25 -i list.txt -filter_complex "overlay=5:H-h-5" -shortest out.mp4
    

    Edit: For PNG and most other image formats, r should be expressly specified to initialize a duration for each image entry in the list.

提交回复
热议问题