2024-02-18, 06:53 PM
There is no way to identify "bad" MKVs without trying to play them or running them through ffmpeg. I'm not expert enough to really break down the problem. My understanding is that MKVs have what's called "packet timestamps" in the file. It keeps all the various streams in the video in sync and is used by video players to enable scrubbing/skipping around the video. These "bad" MKVs either don't have them or they're malformed in some way. To remedy this we use "-fflags genpts" to regenerate the packet timestamps (the pts in genpts).