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).
Jellyfin 10.9.11
Ubuntu 24.04 LTS (bare metal)
Intel i3 12100 on Asus Prime H610M-E D4 mATX
32GB DDR4-3600
Intel Arc A380
OS drive - SK Hynix P41 1TB
Storage
WD Green 3TB (Samba shares)
WD Red 3TB CMR (WIP Media, Test libraries)
3x WD Red Pro 6TB CMR in RAIDZ1 (JF Library)
Fractal Meshify 2
Corsair CX430