FFmpeg image sequence with certain durations combined into a video

Viewed 76

Let's say I have a bunch of images and different float durations. I want to combine the images with the said durations so that they have the right amount of screentime. This is what I have exactly:

I have a bunch of images in a directory like this:

image001.png
image002.png
image003.png
...

I have all durations stored in a text file "durations.txt" where each line number corresponds with image index:

3.445677
2.213412
7.43234
...

I found a image sequence page on wikibooksforum where you can set each duration with frames shown with something like this:

ffmpeg -i image-%3d.jpg -vf "zoompan=d=25+'50*eq(in,3)'+'100*eq(in,5)'" test.mp4

But this gets really long and if I have like a hundred images with all different durations, how can I comibine them effectively? Can I read the durations directly from durations.txt?

0 Answers
Related