(ffmpeg-utils)2.2. Syntax | Date¶
- doc
Official documentation says:
The accepted syntax is:
[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z] nowIf the value is
now
it takes the current time.Time is local time unless Z is appended, in which case it is interpreted as UTC. If the
year-month-day
part is not specified it takes the currentyear-month-day
.
Sorry, I don’t know when and where to use this format. In the first place, according to the understanding that I read the source code of ffmpeg, it seems that it can be used as a form of duration, if so, I don’t think this specification is useful. I don’t understand the meaning of specifying “generate a 440Hz sine wave with a duration ‘21:00:03 on March 1, 2001’”:
[me@host: ~]$ # Even if you can do the following, ...hey, what do you really want to do?
[me@host: ~]$ ffplay -f lavfi "sine=440:d='2001-03-01T21\:00\:03'" -autoexit
Of course this ridiculous command line is rejected:
[sine @ 000001e4b29dca00] Unable to parse option value "2001-03-01T21:00:03" as duration
Last message repeated 1 times
[sine @ 000001e4b29dca00] Error setting option d to value 2001-03-01T21:00:03.
[Parsed_sine_0 @ 000001e4b29dc900] Error applying options to the filter.
[lavfi @ 000001e4b29d9c40] Error initializing filter 'sine' with args '440:d=2001-03-01T21\:00\:03'
sine=440:d='2001-03-01T21\:00\:03': Invalid argument
As far as I know, ffmpeg doesn’t seem to have anything (such as a filter) that takes a date as arguments. In other words, this form may only appear in the above-mentioned ridiculous form.
For this reason, I think it’s best to forget about this date format specification.