[FFmpeg-user] concatenate png files for different durations?
george at nsup.org
Sun Mar 16 21:24:58 CET 2014
Le tridi 23 ventôse, an CCXXII, Spencer Graves a écrit :
> How can I display a sequence of png files for different time
> durations and mate them with a single audio?
> Attached is a toy example: I want to display tst1.png for 0.5
> seconds followed by tst2.png for 1.5 seconds and merge that video
> with the audio in tst2.mp2.
> If I don't care about the display time for each image, I can
> merge these 2 png and 1 mp2 files with "ffmpeg -y -r 1 -i tst.mp2 -r
> 2 -i tst%d.png -b 300k tst.mp4".
> The documentation describes "concat" for filter, demuxer,
> protocol, and raw. I was unable to see how any of these would solve
> this problem.
I believe you can implement what you need using the concat demuxer, with a
file like this:
Note that the duration of the last frame is discarded by ffmpeg, so you
probably need to add a dummy last frame (possibly the same as the real last
one) with a very short duration to mark the time.
Adding the audio is orthogonal to the video and duration issue, just add a
second input to the ffmpeg command-line tool.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-user