I grabbed a quantity of snapshots at irregular times and would like to create a posthumous (fake) real-time video (mp4, animated GIF, etc) from them. This means I need to insert a proper delay between these frames, and this dwell time changes between each couple of frames.
As an example:
- frame0, taken at t0;
- frame1, taken at t1=1 sec;
- frame2, at t2=5 sec;
- end dwell time of 2 seconds
should return a 7-sec video like this:
I cannot afford to work manually with a video editing software because we are talking about hundreds of frames, but I can easily prepare a list with all frame names and delays between them.
I read around how to create a video with a fixed interframe time (i.e. from here), how to create animated GIFs with Python (alas with fixed delay), and how to add a frame at the end of an existing video (the dwell time between second-last and last frame can be set, but the process is very inefficient and slow for hundred of frames).
Can it be done with ffmpeg or any other Linux tool?