Jump to content

Emby Android TV issues for certain videos when using reverse proxy


FunkadelicRelic

Recommended Posts

FunkadelicRelic

I use HAProxy - though some of that post is relevant and I have effectively the same configuration. I've also compared my configuration in my other forum post with other users of HAProxy and there doesn't seem to be an issue with my configuration. If there was, I would expect the Emby Android TV client to fail with the external player selected too. I'm sure that would also effect my other clients.

 

How does the Android TV client handle URLs inside the app? Does it try to do something fancy internally by building up the video address manually? Is something hardcoded there to a port or protocol that may be causing issue?

Link to comment
Share on other sites

CBers

How does the Android TV client handle URLs inside the app? Does it try to do something fancy internally by building up the video address manually? Is something hardcoded there to a port or protocol that may be causing issue?

 

That'll be something for @@ebr to answer.

Link to comment
Share on other sites

The "crashes" you are seeing are happening when you return from the video and we try to refresh the screen after playback.  In that instance, it appears we have lost all context for the connection.  Frankly, this is something I've never seen before and I don't understand how it could be happening.

 

The reason the item is attempting to play in VLC is because it is trying to do the necessary audio mixdown on the client instead of the server.  What do you have your audio setting set to in the app settings?  Is it "Downmix to Stereo"?  If so, can you try "Direct"?

 

You said that playback correction worked but the app crashed after a while, but, when you further explained that, it sounded like it worked fine until you backed out of the player... is that correct?

Link to comment
Share on other sites

FunkadelicRelic

Thanks @@ebr - I just tried your suggestion but it was set to Direct already. I tried Downmix to Stereo out of interest and still no joy. I just submitted the logs again from the app just in case.

 

The playback correction works in the sense that the video starts to play, but it is very laggy and jumpy, and I can usually back out and start another in the same way but usually after this the app becomes completely unresponsive and I have to force quit using the Wait/Quit option.

Link to comment
Share on other sites

CBers

The playback correction works in the sense that the video starts to play, but it is very laggy and jumpy, and I can usually back out and start another in the same way but usually after this the app becomes completely unresponsive and I have to force quit using the Wait/Quit option.

 

You are playing your content locally and your device is hard-wired ??

 

What is your bitrate setting set to in the app ??

Link to comment
Share on other sites

FunkadelicRelic

So I've tried various bit rates, auto, 100mbps, 40mbps etc. I'm on Wi-Fi (5Ghz) - again, think the connection speed is OK as it works with the external player and if I connect to the server bypassing the reverse proxy.

 

I'm still seeing this in the logs for failing videos though. Where does the log get this URL from (The host= URL)? My client should be connecting to the reverse proxy on 443 but should be handed off to 8096. All other lines in the logs show http://emby.domain.com:8096 - it's just this one that is the odd one out.

Info HttpServer: HTTP GET http://emby.domain.com:8096/emby/Videos/guid/stream.mkv?DeviceId=guid&Static=true&Tag=guid&MediaSourceId=guid. Host=emby.domain.com:443, Accept=*/*, Accept-Language=en_US, User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git, Range=bytes=0-, X-Forwarded-Proto=https, X-Forwarded-For=10.8.30.109, Connection=close
Edited by FunkadelicRelic
Link to comment
Share on other sites

CBers

And if you turn off your reverse proxy, everything works OK as it should ??

 

FYI, a wired connection to your device would be the preferred connection.

Link to comment
Share on other sites

FunkadelicRelic

Yes that's correct as long as I add the server to the client manually again and point it to correct port ie 8096.

 

Agreed with the wired approach, but no possibility on the TV in the location it is in. Remember though, media streams fine in other scenarios so I think in my case it wouldn't be the issue here [emoji3]

Link to comment
Share on other sites

FunkadelicRelic

Me too [emoji21] thanks for trying though mate. Really appreciate your help. Just don't know where to look next.

Link to comment
Share on other sites

FunkadelicRelic

Ah - as I was replying a video that I clicked on about 10 minutes ago began to play (VERY laggy!) - it's crashed out now but in the log file I now have this a bunch of times:

Error HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.. Exception.Message: The header part of a frame cannot be read from the data source.

Does that help?

Link to comment
Share on other sites

FunkadelicRelic

So just to summarise as I'm still experiencing this issue:

  • The issue is unique to Android TV (ATV) Client running through the reverse proxy (HAProxy)
  • If the ATV Client is configured with the Emby Server directly, bypassing the reverse proxy, everything works.
  • All other clients work perfectly though the reverse proxy. I've tested the iOS client, Android client, Web Browser client on both and Windows 10, Roku 3 client. All fine.
  • If I play a video on ATV, it hangs with a spinning circle for about 10 minutes. After that, the video plays, but is extremely choppy. After a few minutes, the ATV client will ask to be force closed.
  • During the time when the ATV client is spinning or trying to play the video, I get this in the log: Info HttpServer: HTTP GET http://emby.domain.com:8096/emby/Videos/guid/stream.mkv?DeviceId=guid&Static=true&Tag=guid&MediaSourceId=guid. Host=emby.domain.com:443, Accept=*/*, Accept-Language=en_US, User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git, Range=bytes=0-, X-Forwarded-Proto=https, X-Forwarded-For=10.8.30.109, Connection=close
  • If I set the ATV client to use an external player, such as MX Player, then it works perfectly and all videos play.

I'd love to get the native player working through the reverse proxy as I miss the resume feature and it just feels like a much nicer experience.

 

If anyone has any suggestions I'd love to hear them.

 

Big thanks to everyone who has helped so far - your help is much appreciated and is one of the reasons I'm still persevering with Emby as the response from the community is just fantastic.

Link to comment
Share on other sites

  • All other clients work perfectly though the reverse proxy. I've tested the iOS client, Android client, Web Browser client on both and Windows 10, Roku 3 client. All fine.

 

In all of those other tests, was the video transcoding or otherwise involving ffmpeg (i.e. was an ffmpeg log generated)?

  • Like 1
Link to comment
Share on other sites

FunkadelicRelic

Some transcode - I have ffmpeg logs for those clients and it worked well. The ATV client is direct for most of the videos I tried, although I did lower the bitrate in the client to a tiny amount in order to force transcoding but it still failed.

Link to comment
Share on other sites

Can you re-confirm the same problem when you force the item to transcode?  Also, can you produce an example of one of the other apps playing the exact same way (with that 'static=true' parameter in the url) and not having a problem?

Link to comment
Share on other sites

FunkadelicRelic

Can you re-confirm the same problem when you force the item to transcode?  Also, can you produce an example of one of the other apps playing the exact same way (with that 'static=true' parameter in the url) and not having a problem?

Sure thing. Let me try and do that now.

Link to comment
Share on other sites

FunkadelicRelic

@@ebr - Thanks mate. Attached is a new log. I played Turtles 1x01-02 at about 13:47 which failed with the native player. I then switched to VLC external and played episode 1x03 which worked.

 

There are some exceptions above about 30 minutes earlier but this is probably due to me updating my HAProxy config and restarting it so safe to probably ignore.

 

/Edit.

 

Would help if I attached the log.....

emby.txt

Edited by FunkadelicRelic
Link to comment
Share on other sites

@@ebr - Thanks mate. Attached is a new log. I played Turtles 1x01-02 at about 13:47 which failed with the native player. I then switched to VLC external and played episode 1x03 which worked.

 

There are some exceptions above about 30 minutes earlier but this is probably due to me updating my HAProxy config and restarting it so safe to probably ignore.

 

/Edit.

 

Would help if I attached the log.....

 

Um, okay, but that's not what I asked for, right...? :)

 

 

Can you re-confirm the same problem when you force the item to transcode?  Also, can you produce an example of one of the other apps playing the exact same way (with that 'static=true' parameter in the url) and not having a problem?

 

I'm talking about one of our other apps playing it statically.  Not using an external player.  I think this is related to your reverse proxy and our server delivering the file statically over http as that seems to be the common denominator.

 

Also, confirm that the problem is still there if you force the item to transcode (set the bitrate down or use the playback correction).

 

Thanks.

Link to comment
Share on other sites

FunkadelicRelic

@@ebr - Sorry - was in the process of cleansing my next log file.

 

Attached is a log from playing the video on the iPhone client. This one does transcode but it plays perfectly. You can also see here that the Host= bit doesn't add the port on the end like the Android TV client, so on the iPhone, I get Host=emby.domain.com whereas on the ATV client I get Host=emby.domain.com:443. Might be nothing but just something I spotted.

 

I'll try and get the next log (force transcode on ATV) next.

 

/Edit: 14:48 is when that happens in the log.

emby2.txt

Edited by FunkadelicRelic
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...