Wednesday 5 February 2020

ffmpeg - How to display current time with the ffplay.exe?


I need to play video files by the ffplay (or the ffmpeg if is it possible) and display current play time.


Please tell me how can I see the current play time (as H:M:S) with ffplay?


OS = MS Windows 7



Answer



rgbtestsrc filter


ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" input.mp4



  • If your build does not support fontconfig, then you'll have to add the fontfile option with the path to the font. See drawtext filter docs for more info.




  • In Windows you may have to first set the FONTCONFIG_PATH variable (and/or other related variables).




  • You can add boxborderw=4 if you want more padding in the box, but you'll need a relatively recent build. See the FFmpeg Download page.




No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...