Jump to content

Playback is very slow to start only on Android TV app


Charlie117
Go to solution Solved by rbjtech,

Recommended Posts

Charlie117

I've recently set up a new Emby server to replace another one. 

So far everything is running smoothly, except for playback on the Android TV app. All other apps (e.g. iOS or Web) run completely fine.

The issue when using the Android TV app (on a Nvidia Shield TV) is that when opening the app it needs about 30 seconds to get past the start up loading screen. Then when starting playback of a movie it again needs about 30 seconds to actually start playback, showing the loading icon gif on a black background in the meantime. It will then proceed to correctly direct play (no transcoding) without any issues, so it's just very slow to start the actual playback.

I've tried reinstalling the Android TV app and wiping any saved data, but this has not resolved the issue.

The Android TV app is manually set up to connect to a custom domain name which points to the static IP address of my server.

Attached is an Emby server log, which should include my attempt at direct playing a movie from the Android TV app.

embyserver.txt

Link to comment
Share on other sites

rbjtech

If you use the IP address instead (presumably the 192.168.178.37 address) - does it connect ok ?

You have multiple IP's - so it's possible AndroidTV is having trouble resolving to a working IP - and it's actually timing out before trying a different one - which then connects.

AndroidTV is actually the fastest App to connect - so I know it's not the App itself.

Link to comment
Share on other sites

Charlie117
9 minutes ago, rbjtech said:

If you use the IP address instead (presumably the 192.168.178.37 address) - does it connect ok ?

You have multiple IP's - so it's possible AndroidTV is having trouble resolving to a working IP - and it's actually timing out before trying a different one - which then connects.

AndroidTV is actually the fastest App to connect - so I know it's not the App itself.

Thanks for the help rbjtech.

The issue is the same when I use the IP address instead, which is the WAN IP of my network my domain name also points to. The IP address you mentioned is the local IP address of the server running the Emby server (192.168.178.37).

My Android TV playback device is not on the same network as the Emby server, so it's a remote connection. My Emby server is running in a Docker container on an Unraid server OS, which might explain the issue with multiple IP addresses. I'll double check the configs for any misconfigurations in Unraid. 

Link to comment
Share on other sites

rbjtech
14 minutes ago, Charlie117 said:

Thanks for the help rbjtech.

The issue is the same when I use the IP address instead, which is the WAN IP of my network my domain name also points to. The IP address you mentioned is the local IP address of the server running the Emby server (192.168.178.37).

My Android TV playback device is not on the same network as the Emby server, so it's a remote connection. My Emby server is running in a Docker container on an Unraid server OS, which might explain the issue with multiple IP addresses. I'll double check the configs for any misconfigurations in Unraid. 

ok - so is the client actually external (ie WAN) - or is it just not on the same local network ?

If there are internal routes to the local emby server - then it's usually much better the use the local LAN IP.    If there are no routes - or you wish to force it to be external - then using the external is fine - but this is then dependent on local loopback within the router - ie the traffic doesn't really go external, but gets passed through on the lan without going to the ISP first.

Re the multiple IP's on the emby server - then in the network/config - you can force it to bind to just the IP you want emby to use (maybe the 192.168.178.37 address) - the other IP's 'may' be causing some routing issues with unraid, docker etc etc.

Edited by rbjtech
Link to comment
Share on other sites

Charlie117
1 hour ago, rbjtech said:

ok - so is the client actually external (ie WAN) - or is it just not on the same local network ?

The client is on a completely different network (different ISP also).

If there are internal routes to the local emby server - then it's usually much better the use the local LAN IP.    If there are no routes - or you wish to force it to be external - then using the external is fine - but this is then dependent on local loopback within the router - ie the traffic doesn't really go external, but gets passed through on the lan without going to the ISP first.

Yeah it's all external, so I think using the WAN IP is my only option to connect.

Re the multiple IP's on the emby server - then in the network/config - you can force it to bind to just the IP you want emby to use (maybe the 192.168.178.37 address) - the other IP's 'may' be causing some routing issues with unraid, docker etc etc.

I've set both the internal and external IP/domain name in the network/config tab. The issue still remains unfortunately. 

Is there a way to see what is happening on the Android TV client device in terms of connections to the server? I have submitted a bug report from the device itself during playback.

It's odd that it works just fine on every other device and app, but not the Android TV app. 

Link to comment
Share on other sites

Charlie117
1 hour ago, Luke said:

Hi.  Can you try sideloading our standard android app on the same device and see how that compares?

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

Thanks.

 

Thanks for the help Luke.

I've sideloaded the standard Android app onto my Nvidia Shield TV:

  • Startup/login is very fast and as what I would expect.
  • Playback delay is improved, but still not as fast as it should be. Starting a 4K movie has a delay of about 20 seconds, while the Emby Android TV apps has delay of about 30 seconds when comparing the two apps using the exact same movie file. Both are direct playing without any transcoding. 
Edited by Charlie117
Link to comment
Share on other sites

rbjtech
1 hour ago, Charlie117 said:

Thanks for the help Luke.

I've sideloaded the standard Android app onto my Nvidia Shield TV:

  • Startup/login is very fast and as what I would expect.
  • Playback delay is improved, but still not as fast as it should be. Starting a 4K movie has a delay of about 20 seconds, while the Emby Android TV apps has delay of about 30 seconds when comparing the two apps using the exact same movie file. Both are direct playing without any transcoding. 

Is it just 4K that has the delay (are these large 4K remux files - 80-100Gb each?) - or is everything slow to start ?

If it's not transcoding - it should not make any difference tbh.

I still think it's connectivity based - as anything I play from AndroidTV - even 4K remux's is pretty much instantaneous - even remote - with transcoding its maybe a 1-2 second delay.

 

Link to comment
Share on other sites

6 hours ago, Charlie117 said:

I have submitted a bug report from the device itself during playback.

Hi.  If you mean you used our "send logs" feature, please provide this information:

Quote
Then add the following information to your report in the forum:
 
  • Exactly what you were doing and what happened.  Include the name of whatever you played if it is a playback problem
  • The time you sent the log (in Eastern Time please - UTC -5)
  • The name of the Emby user on the local server that was logged in at the time

 

Link to comment
Share on other sites

Charlie117
2 hours ago, Luke said:

Great, are you happy continuing to use that?

Not really to be honest. There are 7 Android TV based devices connected to my Emby server and I would rather not have to get them all sideloaded. Also, while the playback delay is improved with the standard Android app, it's still a 20 second delay to watch anything. It's always been near instant on my previous Emby server setups. 

I do realise this is likely not an issue caused by the Emby server/client, but rather with my server itself. I guess what I'm trying to find out is what is happening in the Android TV client so I can maybe understand the underlying issue with my server. As mentioned earlier, playback on my iPad or Macbook is near instant so it's just the Android client that is having difficulties connecting to my Emby server. 

1 hour ago, rbjtech said:

Is it just 4K that has the delay (are these large 4K remux files - 80-100Gb each?) - or is everything slow to start ?

If it's not transcoding - it should not make any difference tbh.

I still think it's connectivity based - as anything I play from AndroidTV - even 4K remux's is pretty much instantaneous - even remote - with transcoding its maybe a 1-2 second delay.

 

It's happening for all content, from 100GB 4k remux files to 500MB TV episodes. They all take about 30 seconds to start playback. 

Direct play and transcoding also have the same amount of delay before playback starts.

I agree with you that it seems to be connectivity based. My previous Emby server setup always did near instant playback, even for those 100GB files.

It's just odd that it works fine for other clients. 

37 minutes ago, ebr said:

Hi.  If you mean you used our "send logs" feature, please provide this information:

 

Thanks, I will resubmit the log tomorrow from my Android TV device and then post the info here.

Edited by Charlie117
Link to comment
Share on other sites

Quote

Not really to be honest. There are 7 Android TV based devices connected to my Emby server and I would rather not have to get them all sideloaded.

We are working on getting it into the store for TV devices. Once this happens then what do you think?

Link to comment
Share on other sites

47 minutes ago, Charlie117 said:

Thanks, I will resubmit the log tomorrow from my Android TV device and then post the info here.

Please do.  Not too long ago, we had a recent report and the log showed that some calls were taking unusually long to respond.  I believe the issue was tracked down to a VPN or router setting but I can't find it right now...

Link to comment
Share on other sites

Charlie117
15 hours ago, ebr said:

Please do.  Not too long ago, we had a recent report and the log showed that some calls were taking unusually long to respond.  I believe the issue was tracked down to a VPN or router setting but I can't find it right now...

I have submitted the report from my Nvidia Shield TV running the Emby Android TV app.

  • Exactly what you were doing and what happened.  Include the name of whatever you played if it is a playback problem

I started playback of a movie with the filename "Oppenheimer.2023.mkv". It took 30 seconds for the movie to start playing. I submitted the report a few seconds after the actual playback had started. 

  • The time you sent the log (in Eastern Time please - UTC -5)

The log was sent at 08:51 (UTC -5).

  • The name of the Emby user on the local server that was logged in at the time

The name of the user was "Charlie".

Link to comment
Share on other sites

Charlie117

Also, I made some changes to my Emby docker config, reducing the number of network interfaces to the following when checking the docker app:

image.png.4f58fc3584ed19346310f51c31a90124.png

This hasn't solved the issue, but perhaps someone else might see an issue with the above network interfaces. 

Link to comment
Share on other sites

1 hour ago, Charlie117 said:

I have submitted the report from my Nvidia Shield TV running the Emby Android TV app.

The Android TV device is using a domain name to access your server.  Everything is trucking along fine and then it appears to take 20 seconds for the item to be buffered into the player enough to start playback.

It is a 65Mb/s item going across some sort of remote network but I'm not sure what would be different between apps other than, perhaps IP address vs. domain name.

  • Thanks 1
Link to comment
Share on other sites

Charlie117
34 minutes ago, ebr said:

The Android TV device is using a domain name to access your server.  Everything is trucking along fine and then it appears to take 20 seconds for the item to be buffered into the player enough to start playback.

It is a 65Mb/s item going across some sort of remote network but I'm not sure what would be different between apps other than, perhaps IP address vs. domain name.

Thank you for checking ebr.

I've just removed the Emby server from the Android TV device and reconnected it using the IP address instead of the domain name.. and now it works flawlessly. I'm not sure exactly what has changed since the last time I tried to connect using the IP address, but it may have been a reinstall of the app that did the trick.

So it seems the issue lies with my domain name, which works fine for non-Android apps but causes issues when used with the Android (TV) apps. 

  • Like 1
Link to comment
Share on other sites

  • Solution
rbjtech
34 minutes ago, Charlie117 said:

So it seems the issue lies with my domain name, which works fine for non-Android apps but causes issues when used with the Android (TV) apps. 

Yup - I've seen it before - hence my original reply to try the IP.  :)  Maybe worth trying your emby domain in an Android browser (on the Shield) and see if it instantly resolves the FQDN via DNS.

Edited by rbjtech
  • Thanks 1
Link to comment
Share on other sites

Charlie117
16 hours ago, rbjtech said:

Yup - I've seen it before - hence my original reply to try the IP.  :)  Maybe worth trying your emby domain in an Android browser (on the Shield) and see if it instantly resolves the FQDN via DNS.

Yeah you were absolutely right. I should've double checked the connection through the IP address.

I've been able to fix the issue with the domain name by installing a reverse proxy on my server which points the domain name to the internal IP/port of the Emby server. Now everything is instant again when starting the app or when starting playback. I guess without this, the domain name doesn't properly resolve for Android based devices. 

If anyone else ever experiences this problem while using a custom domain name running Emby server in a docker container on unRAID OS, then you could give this guide a try to install a reverse proxy: 

Big thanks to rbjtech, ebr and Luke for the help!

  • Like 1
  • 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...