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
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
fontfileoption with the path to the font. See drawtext filter docs for more info.In Windows you may have to first set the
FONTCONFIG_PATHvariable (and/or other related variables).You can add
boxborderw=4if 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