[FFmpeg-user] How is the gmtime option used for pts?

Moritz Barsnick barsnick at gmx.net
Fri Feb 5 10:37:25 CET 2016


Hi Matthew,

On Wed, Feb 03, 2016 at 18:00:24 -0500, Matthew Mah wrote:
> 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 think the options gmtime and localtime use the time *at the time of
filtering*, not the creation time. (Yes, that may be the same time if
you are capturing from a device. ffmpeg can also use the wallclock for
timestamping the captured frames though, if that's of help for you.)

> I get the error: "Invalid format 'gmtime'".

You didn't supply the complete, uncut output of your command. Luckily,
on superuser.com, you did. What I needed to see was your versions of
ffmpeg and its components.

The reason for your error: Your ffmpeg version does not match with the
documentation you are using. The feature you are referring to was
introduced to git master on October 12, 2015:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=cf28490e564d91c89b4c56e605c6f391bddb9ba9
and hasn't become part of a release as of today. You need to compile
(or grab a version which was compiled) from git master to have this
feature. Or wait for 2.9, if you need it in a release. (No need to
stick to releases, git master is considered stable.)

BTW, while I didn't get your error message, the displayed timestamp in
my experiment didn't seem correct. But that may be a different issue or
just me.

Moritz


More information about the ffmpeg-user mailing list