I have a problem displaying the timer on the video. I have consulted a few examples, but it does not show success. Help me fix it.
Asked
Active
Viewed 2.4k times
3 Answers
4
try this command:
ffmpeg -y -i input.mp4 -vf "drawtext=fontfile=roboto.ttf:fontsize=36:fontcolor=yellow:text='%{pts\:gmtime\:1575526882\:%A, %d, %B %Y %I\\\:%M\\\:%S %p}'" -preset ultrafast -f mp4 output.mp4
made changes in command as per your need.
also refer below links it will give you more idea about timestamp:
Milan Tejani
- 480
2
I use the following filter:
-vf drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf:text='%{localtime}':fontcolor=white@0.8:x=7:y=7
I put this filter between the input specifications and the output specifications.
You just have to adapt:
x=XXandy=YYdepending on the wished position.fontfile=depending on the fonts available on your system.
binarym
- 391
- 1
- 8
2
I came across this post from google trying to overlay time elapsed for my video. Learned that the proper term for it is Burnt-in timecode, and found a post that was close. Made some changes and was able to get the timecode burn in for my video in the bottom right corner in yellow:
ffmpeg -i input_video.mp4 -vf "drawtext=fontsize=60:fontcolor=yellow:text='%{pts\:hms}':x=(w-text_w):y=(h-text_h)" output.mp4
kyrlon
- 181

