I thought the files were simply broken - and MKVToolNix got a re-work in order to fix 'em… I could be wrong, but MKVToolNix (latest version) is definitely the fix. <—if done on the raw, original, broken files. <—I say that 'cause you can’t fix 'em with anything once they go through something that DOESN’T fix 'em… like I did - for about 1400 of them. Don’t do that…lol
MKVToolNix v44 had a bug that somehow prevented/corrupted the creation of the ctts atom when HEVC streams created with it were remuxed to .mp4. v45 corrected that bug.
I think the ultimate “issue” here is that some Plex clients are able to play these ctts atom-lacking files fine, while some are not able to. Having to fix the files themselves is a temporary fix, whereas all clients being able to play said files without any issues is the permanent fix. Someone that has hundreds upon hundreds of these files that have been modified in some way, and therefore unfixable without redownload, can’t feasibly be able to fix their library. In that regard, no, I would not say this issue is resolved yet.
It’s been fixed for me since the cause and remux fix were identified. The Plex workaround in the tvOS Enhanced player also fixed playback of the unmodified broken files for me.
Others keep reopening this thread with reports of other configuration permutations which they claim exhibit the same problem, I’ve been unable to replicate.
Remuxing the original files works fine, at least with regard to the problems I observed with tvOS originally.
I suspect some attempts to fix it have somehow resulted in an invalid/corrupt ctts atom being constructed, and subsequent remuxing merely copies it through the pipeline. A test would be to try stripping the ctts atom from a broken HEVC stream and remuxing it through MKVToolNix / ffmpeg again.
I re-acquired, then fixed over 1400 of the things - and yes, it was very likely the pinnacle of ASS Pain - but it’s done now.
Yep… Xmedia Recode (et. al.) merely makes the bad juju a permanent thing. It was easier to re-acquire, then fix, than it was to re-encode or fiddle - I simply wasn’t in the mood.
Job done now and I’m absolutely certain re-acquiring and fixing over 1400 files was ultimately faster than waiting for Plex. The good news is RARBG is ‘Re-Releasing’ broken files - so getting them anew shouldn’t be a problem…lol
I took your script and added a few lines to have ffmpeg convert the new mkv files back to an mp4, overriding the original and in the process fixed all of my faulty mp4 files. I just discovered my new 2020 roku ultra has an insane stuttering issue with many of my HEVC files and this completely fixed the stuttering issue.
Thank you so much for the script. I know almost nothing about mkvtoolnix, so combining your script with my knowledge of ffmpeg made fixing my faulty HEVC incredibly easy. The default apt install of ffmpeg and mktvoolnix on ubuntu 20.04 is all that is needed to completely repair affected files. I could not be happier.
I prefer mkv files, if only to make sure you don’t confuse fixed files for the messed up videos. Every device I own can direct play them without issue.
I have been suffering with a lot of stuttering, mainly with audio on my Apple TV using Plex. Infuse was a bit better but not perfect. Today I decided to get a Google TV (Chromecast) and give that a try, This is the new self contained unit which works without you having to cast to it. Plex on this plays the same media back without any hiccups at all. I’ve no idea why that should be.
My Apple TV’s all stutter playing all different Plex files but Roku plays everything perfect. Plex devs keep saying this issue is fixed but it definitely IS NOT. I’ve tried every solution known to man. Nothing helps.
No idea if this will be helpful for anyone at this point, but I finally got around to putting my bash scripts into a repo to correct a missing ctts atom, to build a new mp4 file, based on information mostly gained from this thread.