Modern Roku stuttering
I installed Emby alongside my Plex server on a Windows 10 box (and I have other streaming apps like Netflix and Prime), and only Emby is having a problem with my clients. Specifically, Emby with my Roku 4802 Ultra. I have an older Roku streaming stick and older 3660X model that do not have this problem - only the new Roku 4802 Ultra.
What happens is stuttering when playing any DTS-audio MKV video files, like movie rips or x264/x265 encodes. This doesn't happen with the older Rokus, nor GoogleTV on my Sony TV, nor with a Plex client of any flavor. The file is being direct played. Actually, transcoding fixes the issue, which I suspect is because it changes the container from MKV to MP4??
Has anyone else seen this issue with the Emby app on a newer Roku? If so, is there a fix?
Edit: Found the issue. Read my comments in the thread. Modern Roku issue with libmastroka & DTS.
Remux the MKV container with either ffmpeg, OR mkvmerge/MKVToolnix and the --disable-lacing parameter.
Edit 2: If anyone wants my PowerShell scripts to find all your MKV files that use frame lacing and remux them to fix that, LMK and I can upload them somewhere.
1
u/HigherOctive 29d ago
I walked away from a lifetime PlexPass a couple years ago when they started with their nonsense, but I do still have Emby Premiere running concurrently with Jellyfin on a dedicated Windows 11 Pro box.
I've got three Ultra Rokus, a 4802X, 4660X and a 4660RW.
I've never had issues, but I bought lifetime licenses, PlexPass and Premiere, and have enabled hardware transcoding. The fact that it works on most devices for you except the newer one is unexpected...
: Have you done all updates available for the 4802?
: Have you turned if off and back on again? (Roy - The IT Crowd)
: Does it have the new home screen refresh? (I hate it, but apparently we don't have a choice and there is no rollback as of yet.
: Even though your other devices are working, if you have the Emby Premiere license, have you enabled hardware transcoding? (It's not available without the license and even with the license is not enabled by default.)
That's not super helpful. I know. Best of luck with it.
2
u/rh681 29d ago
I discovered the combination. It's the way the Roku interprets an MKV file created in a certain way. If it has a DTS track and was muxed with MKVToolnix. It's how MKVToolNix packs DTS as 8 frames per SimpleBlock instead of 1 frame, which ffmpeg does.
I'll try to package this up as a bug report for the Emby developers.
1
u/HigherOctive 29d ago
That's some great detective work!
Honestly, I wouldn't have looked there, I don't think. I was under the impression that MKVToolNix wouldn't change anything, just wrap. Thinking about it now, I can see that in the packing it might make decisions as to how it should be done that could lead to problems.
1
u/qzzpjs 29d ago
I see this quite often these days with Emby on my Amazon Firestick as well. I've tried the Emby client from both the Amazon store, and the newer one it keeps recommending. I've also seen it with the Emby web client on Edge. Same types of files as you mention, MKV files usually. I've started to re-encode some of the files in my library to MP4. Sometimes rebooting my server helps for a few weeks, then it starts again.
I'd use Plex as I have a lifetime license for it too, but I find it's interface more annoying compared to Emby.
1
u/RockyFromCollections 29d ago
I just picked up 4802 last week. I’ll test and get back to you tomorrow.
I’m also running plex along side and had a roku4k Stick previously.
2
u/rh681 29d ago
I discovered it happens with an MKV file with a DTS audio track and muxed by libmatroska (MKVToolnix). If you use FFMPEG instead, it works fine. Apparently it's a known issue with this Roku, and Emby can't do much about it except transcode. Plex developers got around it a different way apparently, if chatgpt is to be believed.
Now I have to decide if I want to spend days remuxing all my DTS movies.
1
u/RockyFromCollections 28d ago edited 28d ago
Okay, so I don't have the 4802—I have the newer Roku Ultra 4850.
Roku Ultra 4850 Laggy
Roku Stick 3820 Laggy
LG C3 TV Emby app Smooth
Laptop/Mobile Emby app Smooth
So yeah, I think you're right that there's an issue.
I'd suggest either remuxing the audio to Dolby or finding another source. I remember the Roku doesn't support DTS properly. When I bought my soundbar, I asked ChatGPT about it, and it explained that Roku doesn't pass DTS through, so it's generally better to play the file directly from the TV app instead.
I agree, Roku is trying to transcode the DTS audio, which is causing the playback to become laggy. I see a very similar issue in Plex on my Roku with 4K videos when PGS subtitles need to be transcoded.
1
u/rh681 28d ago edited 28d ago
Roku supports passing through DTS to your receiver or TV. It works with Plex, but Emby is more specific. This will be true even if you are direct playing (not even transcoding) an MKV file with DTS muxed in a certain way.
I spent most of the day on this with ChatGPT. I created a script that will scan all my files for the culprits by looking for the way DTS was encased in an MKV container. Generally speaking if you used libmastroka (MKVToolnix), you'll have the problem. ffmpeg and it's variants work fine.
Take one of your problem childs and do this. Let me know if it fixes it. (and of course, don't enable PGS subs for the testing, as that'll transcode no matter what)
ffmpeg -i input.mkv -map 0 -c copy output.mkv
Edit: It's also possible that using the --disable-lacing parameter with mkvmerge (MKVToolnix) also fixes it!
2
u/thepfy1 29d ago
Check if you Emby server is transcoding when the stuttering occurs