2

I am trying to overlay my video with the timecode.

Currently, I have this:

ffmpeg -y -i input.avi -vf "drawtext=:fontfile=/Windows/Fonts/myfont.ttf:timecode='00\:00\:00\:00':rate=$framerate: fontcolor=white: x=700: y=555" -crf $quality -vcodec libx264 output.avi

This works but uses the default format of hh:mm:ss:ff.

Is it possible to just display the elapsed time in seconds only?

If not, is there another way of displayed the number of elapsed seconds?

1 Answers1

0

is possible with strftime and basetime you can put initial date and time and in text paramter you can set the format of the date and time. ex:

ffmpeg -i inputvideo.mp4 -vf "drawtext=expansion=strftime: basetime=$(date +%s -d'2019-11-22 14:06:01')000000: text='%d/%m/%Y %H\\:%M\\:%S': r=12: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: fontsize=42" outvideo.mp4
rüff0
  • 111