Buffering Issues on Nvidia Shield TV Pro for High Bitrate 4k files

Server Version#: 1.29.2.6334
Player Version#: 9.11.0.36424 (c1355c16)

Background:

  1. I have an Unraid server that hosts movies (mainly 4k remuxes) on x4 HGST HUH721212ALE600 drives using a Plex server primarily. It is wired directly to the Orbi router that has wireless backhaul to the other 2 satellites.
  2. I also have my main client as an Nvidia Shield TV Pro that is wired into one of the Orbi satellites.

So the issue is that when I am streaming one of the higher quality 4k remuxes (~80Mbps for 4k hdr + ~5Mbps for lossless audio) I am constantly running into buffering issues even though I am not doing any transcoding. I have tried the Plex app for Android, I have also recently played around with Kodi and it’s various add ons for Plex (Plex for Kodi, Composite, and PlexKodiConnect) and the issue always seems to be present.

While streaming, the Unraid server shows as uploading ~90Mb/s with spikes up to 120Mb/s. I have installed the docker container for an open-source self-hosted speed test on the Unraid server and have run a test from my Nvidia Shield and it yields less than 3ms of ping, 0.3 jitter, around 600Mb/s download and around 350Mb/s upload. I also installed a disk benchmark utility than scan the speeds at the various fill levels of the drive, and when the drives are empty, they have a read speed of about 300MB/s and when nearly full they go down to about 120MB/s.

I have no clue how any of this adds up to me having buffering issues, the drives should be able to read plenty fast and the network should be plenty fast to transmit the data.

So I thought it has to be a software issue on the shield tv side (potentially to do with buffer sizes) so I messed around with the advanced settings of Kodi (installing the OpenWizard add on) and used their high-end device network preset which makes the readfactor 15, buffermode 1, and the memory size to 3GB iirc and the same issue is present, it is arguably worse now…
Reference:
https://kodi.wiki/view/Advancedsettings.xml#cache

Does anyone have any experience in this realm or have any other ideas on ways to troubleshoot? I am simply at a loss since it seems the shield tv is just refusing to ask for more bandwidth when it definitely can. All of the hardware tests to my eyes says this should not be a problem.

I then tried testing using the Unraid samba mount and VLC installed on the Nvidia Shield TV Pro and although it is hard to prove a negative, at the spots where it reliably buffers in the plex or kodi apps, VLC does not have any issue.

I have contacted Nvidia directly and gave them device logs and this is their reply:

From your logs, it looks like the Plex app is not filling audio track buffers so its a Plex app issue. Likely we are looking at corner case, we don’t have any report of this from other users. I’d recommend you to contact Plex support and see if there is any patches or possible solution that could help with this situation.

Plex network logs from Nvidia Shield TV Pro:
logging.txt (4.3 MB)

3 Likes

It looks like your file(s) are badly muxed and require excessive IO seeking in order to playback. If the audio and video packets are spaced too far apart, in order to playback the player will need to run lots of IO seeks back and forth which can be very slow.

I can see in your logs that the player is constantly having to run IO seeks every few milliseconds, which will lead to playback that needs to constantly pause and buffer before it plays.

You could try to resolve it by running the files through FFmpeg; ffmpeg -i YOURFILE.mkv -c copy OUTPUTFILE.MKV (you can also use the Plex Transcoder; /path/to/PlexTranscoder -i YOURFILE.mkv -c copy OUTPUTFILE.MKV).

Unfortunately there’s no way for Plex to fix it as we can’t increase our IO cache anymore (on the Android side) due to the constraints of the Android OS. It most likely works better in VLC as they use their own demuxer (and have less UI overhead so can increase the IO cache size), where as Kodi and Plex for Android both use FFmpeg.

1 Like

Hi

I have the same issue. Files are mkv created by makemkv. I have never had issues before so it seems weird that this is happening all of a sudden… How can I check my log to see if the above is also my problem?

1 Like

I generated the logs by turning on network logging, reproducing the issue, then pulling the logs from my browser:

https://support.plex.tv/articles/201573117-android-android-tv-fire-tv-logs/

1 Like

The thing I don’t understand is that this issue is not always present, between movies of similar quality or even within the same movie. It is only present at certain parts of certain movies.

1 Like

Would you be able to create a sample that has the issue with part of the video that has the problem? Maybe there’s extra data in that part of the file that we have to seek over.

PlexLog.zip (2.9 MB)

Here is a log from when I played Top Gun. Took almost 5 minutes before I saw the issue

Just upgraded to server version 1.29.2.6364. Still the same problem. I get the first issue at 7:50 minutes into the movie

There are a variety of movies that have this issue, but the one I have been using as a benchmark is the final scene of 13 Hours when they are talking amongst themselves while waiting for the plane to pick them up.

If you remux them does that fix the problem files? You can easily do this with MKVToolNix by just dragging the file in and hitting the Start Multiplexing button.

If it’s still broken after remuxing then that would at least eliminate that possible problem and solution.

The file I’m testing with is Top Gun - Maverick. It’s roughly 69 GB, Dolby Vision and Dolby Atmos. I tried to remux using mkvtoolnix. It reduced the size a tiny bit but result is exactly the same. Between 6 and 8 minutes into the movie it stalls for about 10 seconds and you see the orange circle turning. After that it continues to buffer (or whatever the issue is) every few minutes.

1 Like

FWIW I tried a Kodi build that can do Dolby Vision and that works without issues. I like the Plex interface better though so it would be great to get it fixed

1 Like

How did you get your plex content into Kodi? Which plugin did you end up using? The reason I ask is because when I use Kodi plex plugins, the issue is still present, but when I manually mount the disk versus going through the plugin, the issue is not present. So that tells me that it is a plex problem, since it works both in VLC and native Kodi, but plex plugin Kodi and Plex app have the problem.

Okay, great, that means we’ve eliminated that as a possible solution. Thanks for testing.

I have tried this as well and it did not help, buffering happened in the same place as always.

I simply added an SMB folder in Kodi to test. I have tested with Plex Addons as well. These are my fidnings:

The official Plex addon doesn’t work. I guess it uses the Plex player which means buffering and very slow response overall

I then tried the PlexKodiConnect addon found here: GitHub - croneter/PlexKodiConnect: Plex integration in Kodi done right. That works very well. It was a bit of a PITA to get it to work. Some helpful tips here: Configure PKC on the First Run · croneter/PlexKodiConnect Wiki · GitHub
Overall that works as expected. Remember to use the Maven Kodi version that Kodinerds have forked. The official Kodi version doesn’t support Dolby Vision. I have watched the first 15 minutes of Top Gun: Maverick and everything is good with the exception of 2 small audio dropouts at around 10 and 12 minutes. I assume exceptionally high bitrate

So will probably use the Kodi solution for now unless someone at Plex is keen to troubleshoot. And will use the disk versions when I have guests coming over to avoid any issues :wink:

1 Like

OK, I have done some more testing. I guess I wrongly assumed that load on the Windows PC I use for my Plex Media Server was not relevant when I direct play video and audio. I turned off a DLNA server (Serviio) and some threat protection I had running and I have had zero buffering since then. I also did a factory reset of my Nvidia Shield to make sure but that didn’t make any difference.

So hopefully my problem is actually solved. I will of course keep testing. Still curious how Direct Play actually works then…

Thread hi-jack, since @sixones has been paying attention here :wink:

Could we please get ExoPlayer r2.18.1 implemented? Been out since July. Thanks!

1 Like

Glad it is working for you, but that does not make sense since, and correct me if I am wrong, but you managed to not buffer when directly playing from your server versus going through Plex, even when you had that dlna server enabled.

This is a weird bug for sure and I am wondering why more people are not running into it.

Just saw this thread…I’ve run into this twice over the past week. All were Direct Play on my Ethernet connected Nvidia Shield. Got about halfway through the movie and then nonstop buffering. Had to completely back out from the movie and watch something else.

Also, had audio sync issues with my The Martian 4K Remux, but then discovered it’s a known separate issue that has yet to be resolved.