[FFmpeg-user] Matroska (.mkv) time resolution [was: Re: How can I force a 360kHz time base? ]

Mark Filipak (ffmpeg) markfilipak at bog.us
Sat Feb 27 11:23:28 EET 2021


On 2021-02-27 03:52, Jim DeLaHunt wrote:
> On 2021-02-27 00:23, Mark Filipak (ffmpeg) wrote:
> 
>> On 2021-02-27 02:57, list+ffmpeg-user at jdlh.com wrote:
>>> On 2021-02-26 23:20, Mark Filipak (ffmpeg) wrote:
>>>> showinfo reports 11880, 24120, 36000 because that's what ffmpeg has calculated based on rounded 
>>>> ms (milliseconds).
>>>
>>> No, showinfo reports 11880, 24120, 36000 because that's what the input video's frame times are. 
>>> The input video does not have constant frame time increments (so the evidence indicates).

Yes, I now understand that 'settb' doesn't create new PTSs, it just takes the times and rescales 
them to the new time base. For that, I give you thanks.

"16.18 settb, asettb
"Set the timebase to use for the output frames timestamps. It is mainly useful for testing timebase 
configuration.
"It accepts the following parameters:
"expr, tb
"    The expression which is evaluated into the output timebase.
"The value for tb is an arithmetic expression representing a rational. The expression can contain 
the constants "AVTB" (the default timebase), "intb" (the input timebase) and "sr" (the sample rate, 
audio only). Default value is "intb". "

That documentation doesn't say that, even if the argument is *not* 'intb', the input's time base is 
nonetheless used to rescale the input's PTSs. My bad.

I will try 'settb=expr=1/360000,setpts=N*1001/30000*360000,fps=30000/1001'.

Regards, and Thanks Again,
Mark.


More information about the ffmpeg-user mailing list