The "packetizer"
Basically it means that MakeMKV is not muxing MPEG-2 stream in a very nice / proper way, so (as per my understanding) VLC needs to sort of "redo" part of the muxing "on-the-fly" (through inspecting headers in the stream by itself).
VLC is at fault regarding the non-standard frame rates being reported under "tools>codec information" for mkv files output by mkvtoolnix
Yes. In fact not only those output by mkvtoolnix, but basically any mkv files other than those output by MakeMKV (or technically, any that claims to be so in its metadata).
due to imprecise playback by VLC
Well I have no idea how much this frame rate thing affect actual playback, or in general how the number would be used. All I know is that, under normal circumstances, the frame rate is "transformed" / "calculated" from the "default duration" set in the file. "Default duration" is stored in nanosecond, such as 33366666 ns for 30000 / 1001 fps, although the actual precision depends on the software that produce it (e.g. it
could be set to 33366000 ns).
The problem here is that when VLC reads the number from a file, it ignores "the less significant part", like even when mkvtoolnix set the value to 33366666 nanoseconds, VLC converts it to 33366 µs and then use that to derive the frame rate. (Btw in previous posts I made a mistake by calling microsecond / µs as millisecond / ms.) I have no idea why the developer made VLC does that, but you can see it concretely in the linked code.
and VLC uses code hacks to keep the playback framerate more precise
No.
And for some reason mkv files from makemkv are not affected but files from mkvtoolnix are
The "hack" I referred to was the packetizer.
Files from MakeMKV would have the same default duration value as mkvtoolnix does, so "originally" it should also be affected by the "precision loss" / microsecond problem I just explained. However, because VLC enables the packetizer for it,
and that the packetizer would "reset" the "imprecise" frame rate that is already in VLC's "memory" to a precise value. (It doesn't do so because "it knew it was being imprecise", but essentially just a "side-effect".) For example, for a 30000 / 1001 fps video, resetting it from 1000000 / 33366 (29.970628) to 30000 / 1001 (29.970030). (I'm not really sure why they aren't 29.970629
or 29.970029 instead.)
Does this apply to
It applies to files with MPEG-2 video stream of frame rate that the
corresponding default duration would suffer from "precision loss" in nanosecond-to-microsecond conversion (any duration that does not "end" with 000 when in ns).
For example, for 30 fps ("exact" / "non-NTSC-ized" version of 30000 / 1001 fps) video the default duration would be 33333333 ns, and the frame rate derived / calculated from that should be 30.000000 fps, yet you would probably see 30.000300 fps in VLC (for any MPEG-2 MKV not from MakeMKV).
blu-ray
But since most Blu-ray does not come with MPEG-2 video (H.262) but AVC (H.264) or VC-1, or HEVC (H.265) for UHD Blu-ray, things could be very different for Blu-ray mux. The thing is I do NOT know whether default duration typically get set in MKV with AVC/VC-1/HEVC, and whether mkvtoolnix and MakeMKV have different "policy" in that.
Suppose they both set default duration (to the same value for a particular video), you should NOT see any difference in the reported frame rate for non-MPEG-2 MKV (unless there is something similar that "kicks in"
just for MakeMKV output like the MPEG-2 packetizer -- I'm not seeing any so far).
If so, it seems there's no reliable method to quickly check an mkv for it's actual precise framerate
Well, you can check the default duration set with mkvinfo (and maybe mkvtoolnix GUI) -- if it is set. 1000000000 divided by the default duration would be the frame rate the mux "reports" (for video with constant frame rate -- essentially
including those with soft pulldown; I think that some codecs support literally varying frame rate, although it doesn't mean that players / decoders would support it well; and I have no idea whether in that case default duration is supposed to be set -- actually AFAIK default duration is somewhat optional anyway -- with at least some codec / mux / player the file should play fine even when its value is set to 0).
Bottom line, should I trust mkvtoolnix and makemkv when ripping my DVDs, even when mediainfo reports a different "original frame rate" in the scan results?
I don't think you should give
too much of a damn about
anything MediaInfo output...