[FFmpeg-user] How is the gmtime option used for pts?
Matthew Mah
matthew.y.mah at gmail.com
Thu Feb 4 00:00:24 CET 2016
How is the gmtime option used for pts? I want to overlay the time video
frames have been captured onto a video and display the time in a
YYYY-MM-DD HH:MM:SS format. I have succeeded in using the pts option
with flt to display the time in seconds since the start of the video.
ffmpeg -i in.webm -filter_complex
"drawtext=fontfile=/usr/share/fonts/truetype/arial.ttf: text='%{pts
\:flt}': x=100 : y=50 : box=1" -c:a copy out.webm
There is a gmtime option for pts described in the documentation:
> pts
> The timestamp of the current frame. It can take up to three arguments.
>
> The first argument is the format of the timestamp; it defaults to flt
> for seconds as a decimal number with microsecond accuracy; hms stands
> for a formatted [-]HH:MM:SS.mmm timestamp with millisecond accuracy.
> gmtime stands for the timestamp of the frame formatted as UTC time;
> localtime stands for the timestamp of the frame formatted as local
> time zone time.
>
> The second argument is an offset added to the timestamp.
This gmtime option does not work for me, when running:
ffmpeg -i in.webm -filter_complex
"drawtext=fontfile=/usr/share/fonts/truetype/arial.ttf: text='%{pts
\:gmtime}': x=100 : y=50 : box=1" -c:a copy out.webm
I get the error: "Invalid format 'gmtime'".
How can the gmtime option be applied to display the time of the video in
YYYY-MM-DD HH:MM:SS format?
I posted this question weeks ago to superuser.com, but did not get a
response on using the pts gmtime argument:
http://superuser.com/q/1013753/483849
More information about the ffmpeg-user
mailing list