Jump to content

Emby on Nvidia Shield TV Pro client direct play intermittent freezes


tattler

Recommended Posts

tattler

Hi good evening (NL time), I have some issues with direct playing recently. Emby server is running on Nvidia Shield TV Pro 2019 model (Android 8 version, not updated to Android 9 experience). The movie was being direct played from my QNAP NAS server to Formuler Z8 Pro (running emby app version 2.0.55g) connected to my LG TV. The movie would play for a while and somehow it would freeze for a few seconds. It totally disrupted my viewing pleasure! So I went for troubleshooting on my end:

  • deleted all my libraries and delete Emby Server from Nvidia Shield TV Pro
  • Reinstalled Emby Server version 4.6.7.0
  • Reimported all libraries and metadata
  • changed the player buffer to Large
  • verified that no resource intensive processes were running on the NAS
  • verified that NVidia Shield is connected to NAS with smb version 2.1
  • verified that Emby's cache, metadata were relocated to attached USB drive

After all these actions, I still have intermittent freezes when direct playing. I turned on debug mode in the Emby app on Formuler Z8 Pro and sent the log. Is there anything else that I need to do to get this issue solved? Thank you for your time!

Eric.

Link to comment
Share on other sites

FrostByte

Is there a reason you don't have the latest ATV 2.0.70?  You may need to sideload it because of an issue with Google store.

Was the movie transcoding?  If there are any remux or transcode logs on the server it may help to post those also.

ebr will need to know the time and user logged on for the app log.

Edited by FrostByte
Link to comment
Share on other sites

tattler

Hi FrostByte, thanks for the fast reply! I downloaded the latest version from the Android TV page. Isn't that the newest version? Where can I find version 2.0.70? I have run some more tests and can verify that the freeze moments only occurred with high bitrate movies (more than 30 mbps). And it happened across all devices I am using: web player and on my Android phone. When I lowered the bitrate (caused transcoding) it played well without any freezing. It plays well in VLC from my laptop though. This led me to think that the samba implementation on the Shield is not optimal. Nvidia Shield is connected to my NAS shares using smb 2.1. To troubleshoot I set the max samba version on the NAS to version 2.0. Rebooted Shield and checked that it is now connected with samba version 2.0. Tested again with the same movie file and now it is direct playing without any freeze moments (as of now).

I will keep this setting and monitor it if it stays stable this way. Will give new feedback after running on this setup for a few days! Thank you for your help!

Link to comment
Share on other sites

FrostByte

Version .70 was released to the Google store on 7 Mar.  However, there is a problem with the store now so I know you can download it from the link below.  @ebrcan maybe check why the download page doesn't have the latest if that's where you got it.

Maybe it just needed the reboot.  If it happens again maybe try VLC as an external player on your Shield?  However, if it's working now it may not help.

Link to comment
Share on other sites

tattler

Hi FrostByte, thank you for the link. All other clients (web player and Android app) are playing the movie fine now without any freezing moments (after changing Shield to use smb version 2.0), except on the Formuler Z8 Pro with version 2.0.55g. The movie would start for a few minutes, then the dreaded spinning wheel appeared and Emby threw a direct play error in Dashboard and decided to transcode. The movie began to stutter and ended up locking and crashed the app. I am sure my wired connection can handle 30mbps so it is kind of weird. Just sideloaded the new version on Formuler and now it is direct playing the movie and not remuxing (transcoding) anymore. Preliminary test now shows that the movie is direct playing smoothly so far! I will try later today to see if it is stable. I use Shield as Emby server and Formuler Z8 Pro as the client to stream the movies.

Just a question: is it known that smb version 2.1 can cause connectivity issues with Shield? I used to watch movies on Kodi with nfs shares and never had this issues at all. I know that smb has a lot of overhead but the required network speed of 3.7 megabytes per second (30 mbps) per movie is minimal and should be fine right? Formuler Z8 Pro has wired ethernet and not wifi. I am not even playing 4K movie! This baffles me a bit.

Link to comment
Share on other sites

Hi.  It sounds like you are likely running into some sort of bottleneck when running both the server and the playback on the same Shield.  Is your NAS not powerful enough to run the server?

Link to comment
Share on other sites

FrostByte
54 minutes ago, tattler said:

Hi FrostByte, thank you for the link. All other clients (web player and Android app) are playing the movie fine now without any freezing moments (after changing Shield to use smb version 2.0), except on the Formuler Z8 Pro with version 2.0.55g. The movie would start for a few minutes, then the dreaded spinning wheel appeared and Emby threw a direct play error in Dashboard and decided to transcode. The movie began to stutter and ended up locking and crashed the app. I am sure my wired connection can handle 30mbps so it is kind of weird. Just sideloaded the new version on Formuler and now it is direct playing the movie and not remuxing (transcoding) anymore. Preliminary test now shows that the movie is direct playing smoothly so far! I will try later today to see if it is stable. I use Shield as Emby server and Formuler Z8 Pro as the client to stream the movies.

Just a question: is it known that smb version 2.1 can cause connectivity issues with Shield? I used to watch movies on Kodi with nfs shares and never had this issues at all. I know that smb has a lot of overhead but the required network speed of 3.7 megabytes per second (30 mbps) per movie is minimal and should be fine right? Formuler Z8 Pro has wired ethernet and not wifi. I am not even playing 4K movie! This baffles me a bit.

I believe SE8 added smb3 and my NAS is set at smb2 min and sm3 max and I don't have any smb issues that I'm aware of

Link to comment
Share on other sites

rbjtech

You are lucky to still be on Android 9 for the Shield (don't upgrade unless you HAVE to, you will lose DFA for starters if you ever wanted to use it as a Client..).

With the clients being on Android 7 (?) - (on the Formuler Z8 Pro) - then Direct File Access is still available to you on the ATV Apps  and will eliminate much of the unnecessary traffic flow.

Set your emby libraries to include the optional UNC path to your shares on the NAS (same as you did for the Shield to the NAS)

Ensure the NAS name is in CAPITALS - see my example below

image.png.c5c95bb25f844969011fb4551cec95b0.png

On the Shield, you need to map the NAS shares. https://support.emby.media/support/solutions/articles/44002058112-shield-tv-direct-file-access

Then in the Emby Android TV Client - in Playback (I think), set it use use Direct File Access (DFA).  Ensure the Client has permissions to access the NAS Directly using this optional path.

When you now play - the Emby client will be using 'FILE' instead of HTTP - and your client will actually be bypassing the Emby Server/Shield altogether - and playing directly from the NAS via SMB.

(I'm still using SMB v2 - zero issues with multiple high bitrate Remux's @ 80-90Mbit/sec each) - a 1Gig connection should be able to support 8-9 of these streams before it max's the ethernet capacity.

 

Edited by rbjtech
Link to comment
Share on other sites

tattler
16 hours ago, ebr said:

Hi.  It sounds like you are likely running into some sort of bottleneck when running both the server and the playback on the same Shield.  Is your NAS not powerful enough to run the server?

Hi @ebrI only use the Shield as Emby server to stream media to Formuler Z8 Pro and other devices. My NAS is too old to run Emby server anyway. Serving files thru SMB is more than adequate.

Link to comment
Share on other sites

tattler
16 hours ago, FrostByte said:

I believe SE8 added smb3 and my NAS is set at smb2 min and sm3 max and I don't have any smb issues that I'm aware of

Hi @FrostByteI set my NAS now to use max SMB2.0 (not 2.1) and the performance is better now. I also turned on opslocks to eliminate stuttering during direct play.

Link to comment
Share on other sites

tattler
14 hours ago, rbjtech said:

You are lucky to still be on Android 9 for the Shield (don't upgrade unless you HAVE to, you will lose DFA for starters if you ever wanted to use it as a Client..).

With the clients being on Android 7 (?) - (on the Formuler Z8 Pro) - then Direct File Access is still available to you on the ATV Apps  and will eliminate much of the unnecessary traffic flow.

Set your emby libraries to include the optional UNC path to your shares on the NAS (same as you did for the Shield to the NAS)

Ensure the NAS name is in CAPITALS - see my example below

image.png.c5c95bb25f844969011fb4551cec95b0.png

On the Shield, you need to map the NAS shares. https://support.emby.media/support/solutions/articles/44002058112-shield-tv-direct-file-access

Then in the Emby Android TV Client - in Playback (I think), set it use use Direct File Access (DFA).  Ensure the Client has permissions to access the NAS Directly using this optional path.

When you now play - the Emby client will be using 'FILE' instead of HTTP - and your client will actually be bypassing the Emby Server/Shield altogether - and playing directly from the NAS via SMB.

(I'm still using SMB v2 - zero issues with multiple high bitrate Remux's @ 80-90Mbit/sec each) - a 1Gig connection should be able to support 8-9 of these streams before it max's the ethernet capacity.

 

Hahaha... @rbjtech When I bought the Shield Pro this year, it updated automatically to SE 9 and it was a nightmare! Nothing worked and when it worked it wasn't stable at all! I was busy fixing Plex Server for more than 2 months before I decided to block the ota update from Shield in PiHole. Downgraded the firmware to the stable version 8.2 but Plex updated the server and client version again during that timespan and rendered it useless! I never got it to playing any movie file anymore! So I switched to Emby server and everything has been rock solid, except for the issues I had recently with intermittent freezes which got nothing to do with Emby but my network. Now it is solved! I managed to watch a high bitrate movie last night (38 mbps) and it was smooth without any stuttering and freezes! It was direct playing instead of direct stream! Startup and seeking is magically fast! 😉

I tried to find the DFA option in the Emby client on Formuler Z8 but could not find it. It is only available on the Emby client on Shield. Plex has the ability to automatically stream the file directly from the network instead of http (I saw it in the log) and there is no extra user input to achieve this. I think it is quite easy to do this in Emby since all clients in the local network have direct access to the shared files. If you can do it automatically it is a more elegant way in my opinion instead of using the UNC path solution since not all users are familiar with this.

Thank you guys so much for the fast replies! I am so happy with the support! Please keep it up! Kudo's to the Emby support team!

 

  • Like 1
Link to comment
Share on other sites

vdatanet

Since I upgraded to Experience 9, I had to disable Dolby audio processing in my Shield Pro for 4K smooth playback.

Edited by vdatanet
Link to comment
Share on other sites

tattler
48 minutes ago, vdatanet said:

Since I upgraded to Experience 9, I had to disable Dolby audio processing in my Shield Pro for 4K smooth playback.

Has Nvidia not solved the Experience 9 issues yet? The new version also broke Plex's hardware decoding. It is really a shame that Plex and Emby does not work well on the new version and they still haven't completely resolved it. That's why I blocked the OTA. Newest is not always the best! 😉

Link to comment
Share on other sites

rbjtech

Yea you can just disable the upgrade in the Shield itself, but you also need to disable the notifications service as well or you'll get nagged to do it even though you have upgrades turned off.  I blocked the update server on my firewall as well just to make sure - but I have no plans to upgrade.  SE8 has worked for years with Emby with Direct File Access - so if it ain't broke, don't try and fix it .. ;)

1 hour ago, tattler said:

I tried to find the DFA option in the Emby client on Formuler Z8 but could not find it. It is only available on the Emby client on Shield.

  ah-ha - right ok. So it's something exclusive to the Shield - with you.  Thanks for the update.

Link to comment
Share on other sites

FrostByte
4 hours ago, tattler said:

Hi @FrostByteI set my NAS now to use max SMB2.0 (not 2.1) and the performance is better now. I also turned on opslocks to eliminate stuttering during direct play.

Nice, I totally forgot about setting opportunistic locking.  That has been known to help others. 

Link to comment
Share on other sites

rbjtech
15 minutes ago, FrostByte said:

Nice, I totally forgot about setting opportunistic locking.  That has been known to help others. 

Interesting .. due to the nature of the Emby file reads vs buffer size (which became very clear when I was doing the DFA network packet Analysis), I can see where NOT having Oplocks would cause some very jittery / performance killing behaviour. 

I believe Windows shares have oplocks enabled by default (effectively part of SMB protocol) so I'm wondering why they are not set as standard on NAS devices ?   (maybe they are and the OPS turned them off for a specific reason). 

Edited by rbjtech
Link to comment
Share on other sites

tattler
55 minutes ago, FrostByte said:

Nice, I totally forgot about setting opportunistic locking.  That has been known to help others. 

I had it turned off when I was using Plex. Streaming was slow and I found advice in the Plex/Nvidia forum to turn it off!

Link to comment
Share on other sites

tattler
42 minutes ago, rbjtech said:

Interesting .. due to the nature of the Emby file reads vs buffer size (which became very clear when I was doing the DFA network packet Analysis), I can see where NOT having Oplocks would cause some very jittery / performance killing behaviour. 

I believe Windows shares have oplocks enabled by default (effectively part of SMB protocol) so I'm wondering why they are not set as standard on NAS devices ?   (maybe they are and the OPS turned them off for a specific reason). 

This is interesting! It's the other way round for Emby! I had it turned off and now it's on. By default it is ON! If I am not using DFA, it is okay to leave it ON?

Link to comment
Share on other sites

rbjtech
21 minutes ago, tattler said:

This is interesting! It's the other way round for Emby! I had it turned off and now it's on. By default it is ON! If I am not using DFA, it is okay to leave it ON?

So the question is why did you turn it off - was there a specific reason ?

It's effectively read caching, and for a media server, you read a lot and write very little - so it makes sense to have oplocks turned on .. ?

Edited by rbjtech
Link to comment
Share on other sites

FrostByte

Mine is off and I just started having stuttering problems when I turned it on.  However, my Shield connects with smb3 to Synology.  Could that make a difference?

Link to comment
Share on other sites

tattler
27 minutes ago, rbjtech said:

So the question is why did you turn it off - was there a specific reason ?

It's effectively read caching, and for a media server, you read a lot and write very little - so it makes sense to have oplocks turned on .. ?

I turned it off because Plex somehow had some issues with it (I read it in a forum).

Link to comment
Share on other sites

tattler
2 minutes ago, FrostByte said:

Mine is off and I just started having stuttering problems when I turned it on.  However, my Shield connects with smb3 to Synology.  Could that make a difference?

I have no idea. My stuttering issue was resolved with smbv2 (not smbv2.1) and oplocks ON!

Link to comment
Share on other sites

rbjtech
26 minutes ago, tattler said:

I have no idea. My stuttering issue was resolved with smbv2 (not smbv2.1) and oplocks ON!

ok - Oplocks ON is the default - I'm really not sure why in Plex they would advise turning these off ... anyway - sounds like it's resolved. 👍

Link to comment
Share on other sites

rbjtech
34 minutes ago, FrostByte said:

Mine is off and I just started having stuttering problems when I turned it on.  However, my Shield connects with smb3 to Synology.  Could that make a difference?

Do you get the stuttering with SMB2.x ?

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...