I am trying to capture frames using FFmpeg and add current timestamp on to it.
Below code is working fine for a Linux PC :
ffmpeg -i input -vf "drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf: text='%{localtime}': x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" image%03d.png
But same is not working for Windows because of:
- The filter applied in the
-vfoption. fontfile=/usr/share/fonts/TTF/Vera.ttfis not valid for Windows PC.- Some other things are also invalid.
I tried editing and removing it with some other option but nothing worked.
- I need to add time stamp on the images captured using FFmpeg in Windows.
- How could I add timestamp to it accurate to milliseconds - don't need a date in the timestamp.
What I have tried so far is:
text='%{localtime\:%X}%{pts\:hms}'
The above prints local time and the pts. I need to add both and print, so that I could get it exactly correct.
Any kind of help would be appreciated. I am cracking my head for this from last couple of hours.