O
O
oldTV2017-12-24 20:48:11
fmpeg
oldTV, 2017-12-24 20:48:11

FFMPEG and output current time how to do?

You need to capture a webcam at a certain moment using ffmpeg and overlay text on it. The text itself can be superimposed, but in addition to the text, you need to add the current date and time.

ffmpeg -f dshow -i video=%VDEVICE%:audio=%ADEVICE% -i -vf "drawtext=fontcolor=white:fontsize=10:fontfile='C\:\\Windows\\Fonts\\verdana.ttf':x=10:y=10:text='%{localtime} %T'" %OUTPUTFILE%
. Instead I %Ttried and %X
Instead of time, the letter T is displayed. Tell me what I'm doing wrong or click the link to a detailed working example, I have already tried a lot, including with pts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2017-12-25
@oldTV

'%{localtime:%X}'or '%{localtime\:%X}'or '%{localtime\\:%X}'(the only difference is how the colon is escaped. Otherwise, for some reason, you decided to take the format out of the macro, this is not in the documentation and it is not clear where you got it from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question