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

Jim DeLaHunt list+ffmpeg-user at jdlh.com
Sat Feb 27 10:52:04 EET 2021


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).
>
> This point can be settled. Would you like me to dig out the DVD and 
> parse the headers and report back the PTSs? No, I suppose you'd say 
> that I screwed the pooch when I transcoded it to MKV, eh? 

Precisely. It is the MKV file, not the the DVD, which is the input to 
your test of FFmpeg.


> And you may be right -- I don't know how to parse MKVs to settle the 
> point one way or the other.
>
> I'll tell you what. How about I start with the DVD and extract a 5 
> second clip into a non-KMV container? Then repeat all that I've done 
> but using that clip? Would that work for you?

Mark, I didn't ask you to attempt this conversion, and I will not 
validate that you have succeeded.  But if you ask a question about 
FFmpeg which I know enough to answer, I may take the time to answer it.  
And if you make a claim about FFmpeg which I believe to be false, then 
for the benefit of other readers of this list, I may take the time to 
challenge it.


> …would you kindly suggest a format for the remux. I've not had success 
> remuxing with ffmpeg.… 

No, sorry, that does not belong to the set of questions which I know 
enough to answer.


> Better yet, just complete this script command for me: …[snip]…
> How's that sound?

I'd be happy to, as a paid consulting gig. Contact me off-list if you'd 
like to hire me. Others on this list would likely be more knowledgeable 
vendors, but I may be a more friendly vendor.


> I really do understand what you wrote most recently about how MKV (at 
> 1ms resolution) is throwing off the PTSs and it does make sense to me. 
> But I'm a bit skeptical because mpeg-ps doesn't store milliseconds. 
> mpeg-ps stores fps and PTSs.…
What I read in Wikipedia says that mpeg-ps also specifies 90kHz and 
27MHz timebases for interpreting PTS values. Multiply a PTS value by a 
time base and you can compute frame times in seconds.
> …What MKV does is unknown to me, but as a container, it shouldn't be 
> able to alter the program stream it contains at all.…

"Shouldn't"? Says who?  Of course the designers of a container can 
decide what it will contain precisely, and leave it unable to contain 
other things precisely.


> …But I confess that the MKV devs may have done a silly thing.… 

Or they may have done a very wise thing which meets their needs, but not 
yours.  It's on you to choose the right container for your needs.


> So, an end-to-end test would be decisive, eh? I'm willing to spend the 
> time if you're willing to stick with it.

This is not my circus, these are not my clowns. You asked questions. You 
got accurate answers. You appear to be getting the message that some of 
your beliefs about FFmpeg arithmetic and MKV accuracy are incorrect. If 
you want to stick with it until you prove it to yourself, that is up to you.

Best regards,

      —Jim DeLaHunt




More information about the ffmpeg-user mailing list