Hi, I have a bit of situation here, I use an old player which runs a very old (2011-ish) mplayer, I use it to playback video easily on a CRT from an sd card or hdd.

MKV is basically the best container because I can stack up the subs internally. So I end up always going back to it but the problem is that 30 fps video specifically will randomly become choppy, as if it were dropping every other frame. When it triggers it's usually constant unless I pause or seek. It can happen instantly, sometimes it can take minutes.

30 fps has become a huge problem for me, it's very strange, I can playback 60 fps or 60 / 1.001 fps video perfectly and 24 fps, etc. looks fine to me.
This has been the case since I first started using the player in 2012, but only a few days ago I happened to encode the same video as xvid and put it in an AVI file and discovered that it was perfectly in sync all the time!

Because mplayer is open source I started adding some checks for the exact frame rate, to see if there were tiny differences or something between the files but nothing.

So then I gave up and looked up how to throw the h264 file into an .avi, though my plan was cut short when I realized AVI-Mux GUI had its own mkv muxer, which I tried and magically fixed the sync issues. However this muxer has problems, I can't specify display size and subtitles get muxed but don't show up on any player.

Naturally the next step is figuring out what's different when compared to an mkv made with mkvtoolnix. I used mkvinfo:
Code:
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type version: 1
|+ Document type read version: 1
|+ Document type: matroska
+ Segment: size 63882071
|+ Seek head (subentries will be skipped)
|+ Tracks
| + Track
|  + Codec's private data: size 40
|  + Codec ID: V_MS/VFW/FOURCC
|  + Maximum cache: 0
|  + Lacing flag: 0
|  + Track UID: 3651288726
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Default track flag: 1
|  + Track type: video
|  + Default duration: 00:00:00.033367806 (29.969 frames/fields per second for a video track)
|  + Minimum cache: 1
|  + Timestamp scale: 1
|  + Video track
|   + Pixel crop right: 0
|   + Pixel crop left: 0
|   + Pixel crop bottom: 0
|   + Pixel height: 360
|   + Pixel width: 640
|   + Pixel crop top: 0
|   + Display width: 640
|   + Display height: 360
| + Track
|  + Codec's private data: size 4276
|  + Maximum cache: 1
|  + Minimum cache: 1
|  + Track type: audio
|  + Track UID: 808415482
|  + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
|  + Default track flag: 0
|  + Lacing flag: 1
|  + Codec ID: A_VORBIS
|  + Name: video_1800
|  + Timestamp scale: 1
|  + Audio track
|   + Sampling frequency: 48000
|   + Channels: 2
| + EBML void: size 209
|+ Segment information
| + Timestamp scale: 500000
| + Multiplexing application: matroska muxer by Alexander Noe, build date Aug 30 2008
| + Duration: 00:04:27.309000000
| + Segment UID: 0x66 0x84 0xb9 0x0d 0xf9 0xe4 0x41 0x5a 0x87 0x49 0x45 0x33 0xef 0x92 0x29 0x4e
| + Writing application: AVI-Mux GUI 1.17.8, Aug 30 2008  12:36:58
| + EBML void: size 303
|+ Tags
| + Tag
|  + Simple
|   + Name: BPS
|   + String: 112024
|  + Simple
|   + String: 112024
|   + Name: BITSPS
|  + Targets
|   + Track UID: 808415482
|  + Simple
|   + Name: FPS
|   + String: 61.6926
|  + Simple
|   + Name: TITLE
|   + Tag language: und
|   + String: video_1800
| + Tag
|  + Simple
|   + Name: BPS
|   + String: 1794470
|  + Targets
|   + Track UID: 3651288726
|  + Simple
|   + String: 1794470
|   + Name: BITSPS
|  + Simple
|   + String: 29.9691
|   + Name: FPS
|+ Cues (subentries will be skipped)
|+ EBML void: size 103
|+ Cluster
There's no spoiler code.
Code:
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 63879196
|+ Seek head (subentries will be skipped)
|+ EBML void: size 147
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Lavf57.7.2
| + Writing application: HandBrake 1.1.0 2018040700
| + Segment UID: 0xab 0xb4 0x61 0x6a 0xdb 0x69 0xd3 0xc3 0xf7 0x29 0x50 0x47 0x27 0x14 0x11 0x53
| + Duration: 00:04:27.300000000
|+ Tracks
| + Track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 1
|  + Lacing flag: 0
|  + Language: und
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Track type: video
|  + Default duration: 00:00:00.033366666 (29.970 frames/fields per second for a video track)
|  + Video track
|   + Pixel width: 640
|   + Pixel height: 360
|   + Interlaced: 0
|   + Display unit: 3 (aspect ratio)
|   + Display width: 640
|   + Display height: 360
|  + Codec's private data: size 53 (h.264 profile: Baseline @L3.0)
| + Track
|  + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
|  + Track UID: 2
|  + Lacing flag: 0
|  + Name: Stereo
|  + Language: jpn
|  + Codec ID: A_VORBIS
|  + Track type: audio
|  + Audio track
|   + Channels: 2
|   + Sampling frequency: 48000
|  + Codec's private data: size 4276
|+ Tags
| + Tag
|  + Targets
|  + Simple
|   + Name: CREATION_TIME
|   + String: 2019-01-12T20:29:26Z
|  + Simple
|   + Name: ENCODER
|   + String: Lavf57.7.2
| + Tag
|  + Targets
|   + Track UID: 2
|+ Cluster
I noticed the default duration being off, and that seems to be the most likely culprit combined with timestamp scale 500000, I still got drops but it became harder to trigger them, I normally trigger them by seeking to an area with smooth video so I can spot the drops easily.

Any recommendations? I can't use techniques like motion interpolation, or rate control here. I could encode to 60fps by duplicating frames but it increases file size and decoding complexity. I feel I am very close now, yet still quite lost.