Jump to content

Video Stutter when using Dolby TrueHD or DTS-MA


fcorona76

Recommended Posts

fcorona76

I just bought into a new nvidia shield for it's ability to decode high bitrate audio from my local emby server. The problem is that it stutters video horribly when using high band width audio (DTS-MA, TrueHD,  and even multi-channel PCM when I disable passthrough) but the audio plays fairly smooth. The stutter is not constant but it is consistent at certain points of a movie. All of my media is self made MKV's, from my own blu rays, using Handbrake with HEVC video (less than 10mbps ususally) and uncompressed pass-through audio tracks (DTS-MA, TrueHD, and AC3 for fall back so Emby wont have to transcode). As soon as I switch back to the AC3 track the stuttering goes away. If I start with Ac3 there is never a stutter.

This is not in the source as I can watch it from my phone or PC with no statter at ll, regardless of audio track selection. I do not have problems when playing this exact same media through VLC on the Shield so I don't believe it to be an HDMI or, router of wiring problem.

I have already gone through and tried a lot of the other solutions for similar forum posts. I have side loaded the latest Android Emby with no change. Cleared cache and data with no change. Made all of the shield changes to audio processing and all of the emby client changes too with no change to the problem. If I setup the AndroidTV client to use an external player the problem does go away but this is not the solution I want as it breaks the user experience of integration in Emby.

 

I already sent a log so hopefully you can find it.

Nvidia Shield Pro (2019) - Brand new and two days out of the box. All up to date and wired gigabit ethernet

UnRaid 6.12.6 on an AMD 5900x, 32gb ram, NVME cache drive, etc and little else running on it. No CPU ever when streaming from emby.

Emby server running in a docker and always up to date (4.7.14.0 currently)

 

 

Log sent 01-27-24 around 6:00-6:15CST

Watching The Dark Knight.MKV The stutter is consistent around the 00:00:55 to 00:01:15 mark

The User name is User in server UnRaid

darkknight.jpg

Link to comment
Share on other sites

Quote

I have side loaded the latest Android Emby with no change.

 

Hi, what version number did you try?

Link to comment
Share on other sites

fcorona76
8 minutes ago, Luke said:

 

Hi, what version number did you try?

There was no improvement with the standard Android package.

 

I tried that this afternoon and downloaded direct from:

https://emby.media/emby-for-android.html

 

The package name is below but I don't recall the version number. It's whatever was up there 7 hours ago.

emby-android-google-arm64-v8a-release.apk

Link to comment
Share on other sites

Hi, 

can you obtain an android app log by following the instructions here:

Thanks.

Link to comment
Share on other sites

fcorona76
8 hours ago, Luke said:

Hi, 

can you obtain an android app log by following the instructions here:

Thanks.

Absolutely! I removed the Emby for Android TV, reinstalled the latest Emby for Android build (from yesterday) and ran the log per your instructions. I stopped the log about 20 seconds after this particular hiccup corrected itself. Again, the stuttering starts around the 55 second mark and runs through to about 1 minute and 10 seconds give, or take, a couple.

emby_android_1706452033963.txt

Edited by fcorona76
added info
Link to comment
Share on other sites

fcorona76

I watched a few other movies today and found that this stuttering is happening with *all* multi-channel tracks including standard Ac3 in both the Android and AndroidTV versions of Emby. None of the problems exist in VLC or MX player on the Shield.

I also found that enabling "Playback correction" in the AndroidTV app did not help at all.

I had NONE of these problems using Emby on the Roku 4K stick, on WiFi, just a few days ago though it would automatically downscale the formats down to Dolby Digital or plain DTS.

I watched my ethernet port usage on the UnRaid server and, aside from a startup buffering where the shield pulled down about 300-400mbps for a brief moment, the upload speed never exceeds 10-15mbps even during the stutters.

I'm going to try a new encode of the exact same source with the TrueHD track converted down to Stereo Audio MP3 320kbps, with no other tracks, and another with no audio track at all to see if the multi channel is a problem or just the video/encode in general.

Link to comment
Share on other sites

fcorona76

All of this is using Emby Android TV from the play store.

After encoding the exact same source, with the exact same profile, I saw zero stuttering when there was no audio track present. Audio Output is set to auto.

When there was only a stereo encoded audio track there was also no stuttering. Audio Output is set to auto.

When I try to play DTS or TRUEHD that was passed through it stutters. Audio Output is set to auto.

When I try to play AC3(Dolby Digital 5.1) that was passed through from the source it stutters. Audio Output is set to auto.

When I try to play DTS or TRUEHD that was passed through but set Audio Output to "Convert" it does not noticably stutter.Enabling Stats for Nerds still says it is playing a DIRECT TrueHD stream. My Denon reciever says it's being passed, and playing, a Dolby Digital 5.1 stream. Emby server shows that it is definitely transcoding audio even though the client says it's not.

Link to comment
Share on other sites

Hi.  Have you tried toggling the "Dolby processing" option in the Shield settings?

Link to comment
Share on other sites

rbjtech

How are the devices physically connected ?

--

Emby Server - Unraid NAS > Ethernet > Shield Pro 

Emby Client - Shield Pro (HDMI Out) > HDMI 2.0 > AVR (HDMI In)

AVR (HDMI Out/Monitor) > HDMI 2.0 > TV (HDMI In - Doesn't matter if it's ARC/EARC or not - you are not using ARC - infact you are not using Audio as it terminates on the AVR, you are just passing Video at this point)

--

Shield itself should be set to 'Auto' on all the Audio Passthrough options - you can invididually set them if you like but I have mine set to Auto and passthrough all HD Codecs just fine.  Untick Dolby processing as @ebrsays above.

Edited by rbjtech
Link to comment
Share on other sites

fcorona76
10 hours ago, rbjtech said:

How are the devices physically connected ?

--

Emby Server - Unraid NAS > Ethernet > Shield Pro 

Emby Client - Shield Pro (HDMI Out) > HDMI 2.0 > AVR (HDMI In)

AVR (HDMI Out/Monitor) > HDMI 2.0 > TV (HDMI In - Doesn't matter if it's ARC/EARC or not - you are not using ARC - infact you are not using Audio as it terminates on the AVR, you are just passing Video at this point)

--

Shield itself should be set to 'Auto' on all the Audio Passthrough options - you can invididually set them if you like but I have mine set to Auto and passthrough all HD Codecs just fine.  Untick Dolby processing as @ebrsays above.

Dolby processing is off in the shield settings.

Pretty close on the hardware connection...

Emby Server - Unraid NAS > Gigabit Ethernet > Shield Pro 

 

Emby Client - Shield Pro (HDMI Out) > HDMI 1.4 > AVR (HDMI In) (Denon AVR-300 that does support all of the audio formats that I am working with)

 

I'm only dealing with 1080p content, for now, so the avr using HDMI 1.4 shouldn't be an issue with my lower but rate video feed paired with the passed through, uncompressed, audio. 

 

Also as I stated:  if I change nothing on the shield, other than set Emby to use VLC as an external player, all of the audio codecs do what they're supposed to and there is no video stutter.

 

I'm going to try double, and triple, check all of the shield settings to make sure there's nothing weird set by accident.

  • Thanks 1
Link to comment
Share on other sites

rbjtech
7 hours ago, fcorona76 said:

Dolby processing is off in the shield settings.

Pretty close on the hardware connection...

Emby Server - Unraid NAS > Gigabit Ethernet > Shield Pro 

 

Emby Client - Shield Pro (HDMI Out) > HDMI 1.4 > AVR (HDMI In) (Denon AVR-300 that does support all of the audio formats that I am working with)

 

I'm only dealing with 1080p content, for now, so the avr using HDMI 1.4 shouldn't be an issue with my lower but rate video feed paired with the passed through, uncompressed, audio. 

 

Also as I stated:  if I change nothing on the shield, other than set Emby to use VLC as an external player, all of the audio codecs do what they're supposed to and there is no video stutter.

 

I'm going to try double, and triple, check all of the shield settings to make sure there's nothing weird set by accident.

That's all setup fine.

How about an official 'demo' file from the likes of https://www.demolandia.net/cinema/dolby-demo-trailers-hd/page-8.html

Do these play ok ?

Link to comment
Share on other sites

13 hours ago, fcorona76 said:

Dolby processing is off in the shield settings.

For kicks, try turning it on and see if anything changes.

Link to comment
Share on other sites

fcorona76
8 hours ago, ebr said:

For kicks, try turning it on and see if anything changes.

No help. I even went the route of a full factory reset and only installed Emby. It still stutters using the Emby player.

Link to comment
Share on other sites

fcorona76
15 hours ago, rbjtech said:

That's all setup fine.

How about an official 'demo' file from the likes of https://www.demolandia.net/cinema/dolby-demo-trailers-hd/page-8.html

Do these play ok ?

They all work incredibly well in Emby using the stock settings on the shield after a factory reset. My receiver and TV handled all of the audio formats just fine from every one of them.

 

But not all of my media is having a problem either. So far I've found a handful of very repeatable sections that all drop frames in Emby but do not in other media players. They also do not drop using Emby with an external video player setup. Just the Emby stock player.

Link to comment
Share on other sites

rbjtech
9 hours ago, fcorona76 said:

They all work incredibly well in Emby using the stock settings on the shield after a factory reset. My receiver and TV handled all of the audio formats just fine from every one of them.

 

But not all of my media is having a problem either. So far I've found a handful of very repeatable sections that all drop frames in Emby but do not in other media players. They also do not drop using Emby with an external video player setup. Just the Emby stock player.

ok - so it is a reasonable known fact that Exoplayer is far less tolerant of corrupt frames than say VLC, but the fact your setup plays the demo files without issue - suggest to me there is nothing wrong with your setup, nor emby (in playing non-corrupt files that is ..).

If you have a repeatable section that always drops frames, then maybe extract just that section (5-10 seconds worth) and post here or via pm (use mkvtoolnix etc).  It's possible that in doing so, you fix the issue (as it will re-write the frames) but if that's the case, then a remux on the full file may fix it anyway.

  • Like 1
Link to comment
Share on other sites

fcorona76
1 hour ago, rbjtech said:

ok - so it is a reasonable known fact that Exoplayer is far less tolerant of corrupt frames than say VLC, but the fact your setup plays the demo files without issue - suggest to me there is nothing wrong with your setup, nor emby (in playing non-corrupt files that is ..).

If you have a repeatable section that always drops frames, then maybe extract just that section (5-10 seconds worth) and post here or via pm (use mkvtoolnix etc).  It's possible that in doing so, you fix the issue (as it will re-write the frames) but if that's the case, then a remux on the full file may fix it anyway.

See attached clip. I encoded this segment a dozen ways. This clip is using the settings as shown in the attached screen shots for the video and it's what I have used for all of my Bluray collection for some time. It works well for me and my old eyes. If I encode this movie with no audio I get NO stutter. If I encode this movie downmixed to stereo I get NO stutter. Audio is just passthrough so I can't really adjust anything there other than re-encode. I'm currently running this segment through in x264, x265, 10bit, various profiles, etc to see if anything changes.

Let me know if you have the same dropped frames, or none at all. I appreciate any help in solving this.

handbrake_settings.jpg

handbrake_settings_audio.jpg

0_stutter_fcorona76_clip1.mkv

Link to comment
Share on other sites

rbjtech

I concur that its not happy and stuttering (not constantly but mid way through the clip) on all but the very first audio track.   1st Track seems ok to me.

Stat's for Nerds below - this is via Direct File Access on a Shield 2019 Pro with AVR passthrough.

It's likely the hevc encoding settings that Exo/Shield combo does not like (likely the hevc profile) - because it plays fine via Emby Theatre ..

4th track - AC3 Stereo - stutter

Screenshot_20240131-124132.png.32565385a618be4d33079460e316072a.png

3rd AC3 Track - Stutter

Screenshot_20240131-124047.png.432e28951c8c5a90d67257b545c1218b.png

2nd track - THD - Stutter

Screenshot_20240131-124001.png.41957b05e71112842fc29f5f37821317.png

Emby Theatre on PC - no issues on any track (but no passthrough) ... 🤔

image.thumb.png.cb50b230b51b066455e320e4e77d7d30.png

 

Edited by rbjtech
Link to comment
Share on other sites

rbjtech

To Add - this is a Main L5.2/High HEVC file - there really is no need for this @ 1080p at this bitrate - Main L4 is more than sufficient.   So maybe have a play around with those - or use the Auto defaults that handbrake gives you as a test.     

edit - Yes, handbrake on 'Auto' using HEVC 8Bit @ 1080p uses Main L4 Main - so try that with your bespoke encoding params - you may need High to cover some of those options.   Where did the bespoke parameters come from ?

image.png.f4791e8d7c51085377397fc4e49376b3.png

Edited by rbjtech
Link to comment
Share on other sites

fcorona76
14 minutes ago, rbjtech said:

To Add - this is a Main L5.2/High HEVC file - there really is no need for this @ 1080p at this bitrate - Main L4 is more than sufficient.   So maybe have a play around with those - or use the Auto defaults that handbrake gives you as a test.     

edit - Yes, handbrake on 'Auto' using HEVC 8Bit @ 1080p uses Main L4 Main - so try that with your bespoke encoding params - you may need High to cover some of those options.   Where did the bespoke parameters come from ?

image.png.f4791e8d7c51085377397fc4e49376b3.png

The extra settings came from perceived increases to quality with lower video bit rates. It may be due to the video but if I encode that exact segment with no audio it plays smooth as butter. With audio UnRaid spikes at about 15mbps up to the shield so I highly doubt it's a bandwidth problem. I did more searching for x/h265 problems with Emby for android and found a lot more similar problems going years back.

Link to comment
Share on other sites

rbjtech

Agree it's not bandwidth - frankly, using 50% of the available bitrate for Audio seems a strange choice, but that's your prerogative ;)

I have 4K 120Mbit/sec with 3 or 4 HD Audio tracks (TrueHD+DTS-HD etc) playing on the Shield and they all play perfectly - so as I said above - I suspect it's your encoding settings/hevc profile interlaced with audio that Exo does not like.     As a next step, I'd suggest using one of the hevc Handbrake templates with Audio passthrough - and see if it still does it - I suspect it won't - and you then have your answer... 

 I'll leave it for emby to answer, but I highly suspect Google/Emby are unlikely to 'fix' an issue based on an edge case caused by bespoke encoding params.. ☺️

Edited by rbjtech
Link to comment
Share on other sites

fcorona76
7 minutes ago, rbjtech said:

Agree it's not bandwidth - frankly, using 50% of the available bitrate for Audio seems a strange choice, but that's your prerogative ;)

I have 4K 120Mbit/sec with 3 or 4 HD Audio tracks (TrueHD+DTS-HD etc) playing on the Shield and they all play perfectly - so as I said above - I suspect it's your encoding settings/hevc profile interlaced with audio that Exo does not like.     As a next step, I'd suggest using one of the hevc Handbrake templates with Audio passthrough - and see if it still does it - I suspect it won't - and you then have your answer... 

 I'll leave it for emby to answer, but I highly suspect Google/Emby are unlikely to 'fix' an issue based on an edge case caused by bespoke encoding params.. ☺️

I'm old. My ears are far better than my eyes! 😂

 

I'll try a prepackaged HB profile for x265 and see what happens...I do not want to re-encode an entire library because a player is broken.☹️

  • Haha 1
Link to comment
Share on other sites

rbjtech
10 minutes ago, fcorona76 said:

I'll try a prepackaged HB profile for x265 and see what happens...I do not want to re-encode an entire library because a player is broken.☹️

It may also be worth trying the Android app (sideloaded) - that may process things differently vs the AndroidTV App ?

https://emby.media/emby-for-android.html

Edited by rbjtech
Link to comment
Share on other sites

signde

Feel free to boo me out of the room but I was curious so I tried the sample.

Shield TV Pro 2019 
Emby Android TV - stuttery
Plex - plays fine

Amazon Fire Stick 4K Max 2023
Emby Android TV - plays fine
Plex - plays fine

All were direct play, my AVR showed full passthrough audio.

  • Like 2
  • Agree 1
Link to comment
Share on other sites

rbjtech
14 minutes ago, signde said:

Feel free to boo me out of the room ..

We have no reason to do that.  Thanks for taking the time!   I don't work for Emby, I'm just trying to help as well ;)

So yes, it may well be a 'Shield/Exo/Emby App/hevc profile' combo problem indeed if other hardware plays it just fine.

I'll try the Android (non TV) App on the Shield Pro myself later - should have tried that when I tested first time ..

  • Agree 1
Link to comment
Share on other sites

fcorona76
12 hours ago, rbjtech said:

It may also be worth trying the Android app (sideloaded) - that may process things differently vs the AndroidTV App ?

https://emby.media/emby-for-android.html

I've done that and there was no improvement using the latest Android build direct from Emby.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...