I am creating timelapse from PNG single frames.
Using the first and last frame as stills I create a header and a trailer with a text and a fade filter. In the end I use concat
to put all parts together. What I see happen is that in the final video there is a jump between the end of the main body and the trailer. It seems as if the concat process has cut away some frames (at the end) from the main body. That makes the transition from the main body to the trailer look very bad.
What do I have to do to fix this?
Header
------
/home/tools/bin/ffmpeg -loop 1 -i Timelapse_1080/IMG_7255.png -c:v libx264 -vf drawtext="fontsize=60:fontcolor=yellow:fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:textfile=./Scripts/header_text.txt:x=(w-text_w)/2:y=(h-text_h-line_h)/2" -t 5 -pix_fmt yuv420p -crf 16 -r 24 -y ./Video/header_txt.mp4
/home/tools/bin/ffmpeg -i ./Video/header_txt.mp4 -vf fade=in:0:48 -crf 16 -r 24 -y ./Video/header_txt_fade.mp4
Timlapse body
------------------
/home/tools/bin/ffmpeg -start_number 7255 -i Timelapse_1080/IMG_%04d.png -pix_fmt yuv420p -crf 16 -r 24 -y ./Video/body.mp4
Trailer
--------
/home/tools/bin/ffmpeg -loop 1 -i Timelapse_1080/IMG_7490.png -c:v libx264 -t 6 -pix_fmt yuv420p -crf 16 -r 24 -y ./Video/trailer.mp4
/home/tools/bin/ffmpeg -i ./Video/trailer.mp4 -vf fade=out:20:60 -crf 16 -y ./Video/trailer_fade.mp4
Concat all together
-------------------
/home/tools/bin/ffmpeg -safe 0 -f concat -i ./scripts/ffmpeg_concat_all.txt -c copy -y ./Video/Timelapse_crf16_24fps.mp4