Using FFmpeg to join images with different timly distance [duplicate]

假装没事ソ 提交于 2019-12-02 07:24:00

You can try the concat demuxer and provide the duration for each frame.

  1. Make text file containing the path to your inputs and the duration for each:

    file '/path/to/image0.png'
    duration 2
    file '/path/to/image1.png'
    duration 5
    file '/path/to/image2.png'
    duration 1.5
    file '/path/to/image3.png'
    duration 4
    
  2. Then run ffmpeg:

    ffmpeg -f concat -i input.txt -pix_fmt yuv420p -movflags +faststart output.mp4
    

Notes:

  • See the concat demuxer documentation for more info.

  • The example won't work with an old ffmpeg, so make sure to download a recent build first since FFmpeg development is so active.

So it is some time ago I asked this question an there is no answer yet. I also did not find one by myself. I solved the task in my case by creating simbolic links for each frame pointing to the correct image. Then I set the framerate to 1. So for each second I want to display an image I have a symbolic link pointing to it.

One can of course also just copy the files accordingly. Depending on the total number of frames of the video this can result in a lot of disk space used. So I went with the links.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!