Backlinks:
Created: 2026-08-15 23:57
Last edited: 2026-08-15 23:57
Add timer to video with ffmpeg
Example
- portrait 1920✕1080 video
- start showing timer at 2.5 seconds in
- time until 175.5 seconds in
- then show 2:53 for the rest of the video
ffmpeg -i input.mp4 -vf "\
drawtext=text='%{pts\:gmtime\:-2.5\:%-M}\:%{pts\:gmtime\:-2.5\:%S}':enable='between(t,2.5,175.5)':font='Courier New':fontsize=192:fontcolor=white:x='(w-text_w)/2':y=1700, \
drawtext=text='2\:53':enable='gt(t,175.5)':font='Courier New':fontsize=192:fontcolor=white:x='(w-text_w)/2':y=1700\
" -c:a copy output.mp4