[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 10:23:51 EET 2021


On 2021-02-27 02:57, list+ffmpeg-user at jdlh.com wrote:
> On 2021-02-26 23:20, Mark Filipak (ffmpeg) wrote:
>> On 2021-02-27 01:37, Jim DeLaHunt wrote:
-snip-
>> 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? 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?

If that works for you, then (because I'm fairly ignorant of non-MPEG formats), would you kindly 
suggest a format for the remux. I've not had success remuxing with ffmpeg. Better yet, just complete 
this script command for me:

ffmpeg -i original.vob ... clip.??? <<== that container type? MP4? AVI?

I will supply the '-ss' and '-to'.

How's that sound?

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 MKV does is unknown to me, but as a container, it 
shouldn't be able to alter the program stream it contains at all. But I confess that the MKV devs 
may have done a silly thing. 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.

Regards,
Mark.


More information about the ffmpeg-user mailing list