I have tested these commands on Windows but on Linux it should be performed in a similar way:
First you have to get the duration in seconds of the video:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4
Next you use the seconds obtained in the ffprobe command that I will specify as "$duration" (use also the numbers behind the dot ex: 3600.48993) here:
ffmpeg -f lavfi -i "color=color=#00000000@0:size=600x100:duration=$duration:r=30,format=rgba,settb=AVTB,drawtext=text='Time left\: %{pts\:gmtime\:0\:%#M\\\:%S}':fontsize=80:fontcolor=black:bordercolor=white:borderw=3:x=20:y=(H-th)/2:font=calibri" -i input.mp4 -filter_complex "[0]reverse[timer];[1][timer]overlay=x=0:y=H-h:enable='between(t,0,$duration-1)'" -y -c:v libx264 -c:a copy output.mp4
You may want to create a bash script or something to automate this...
The output is something like the link I posted before:
output.gif
Explanation:
color=
creates a timer with a transparent background
[0]reverse[timer]
reverts the order of the timer going from end time to 0
enable='between(t,0,$duration-1)'
removes the last second from the timer since you don't want 00:00...
{pts\:gmtime\:0\:%#M\\\:%S}
creates a timer with Minutes %#M and Seconds %S, the # in %#M removes leading zeros but in Linux I guess it is %-M instead. The number of backslashes in %#M\\\:%S
is probably different in Linux too. Try one, two, four and see what works for you.