I save the last frame to image when I create a video, then I convert image to 10 seconds video and put countdown on it, at last, merge this two videos. I can also use video to countdown but that start from first frame, how can I countdown at last frame?
countdown.bat
<code>ffmpeg -hide_banner ^
-i "C:myvideosvideo.mp4" ^
-filter_complex_script countdown.txt ^
-t 30 -y %2.mp4
</code>
<code>ffmpeg -hide_banner ^
-i "C:myvideosvideo.mp4" ^
-filter_complex_script countdown.txt ^
-t 30 -y %2.mp4
</code>
ffmpeg -hide_banner ^
-i "C:myvideosvideo.mp4" ^
-filter_complex_script countdown.txt ^
-t 30 -y %2.mp4
countdown.txt
<code>[0:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s0];
[s0]drawtext=fontfile='/WINDOWS/Fonts/Arial.ttf':text='%{eif:10-t:d}':
box=1:boxborderw=10:[email protected]:
fontsize=24:x=w-tw-10:y=10:fontcolor=red:enable='between(t,0,10)';
</code>
<code>[0:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s0];
[s0]drawtext=fontfile='/WINDOWS/Fonts/Arial.ttf':text='%{eif:10-t:d}':
box=1:boxborderw=10:[email protected]:
fontsize=24:x=w-tw-10:y=10:fontcolor=red:enable='between(t,0,10)';
</code>
[0:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s0];
[s0]drawtext=fontfile='/WINDOWS/Fonts/Arial.ttf':text='%{eif:10-t:d}':
box=1:boxborderw=10:[email protected]:
fontsize=24:x=w-tw-10:y=10:fontcolor=red:enable='between(t,0,10)';