MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.14k stars 805 forks source link

AndroidTv fails to play video #3455

Closed sauerj closed 5 years ago

sauerj commented 6 years ago

Yesterday I purchased Emby Premiere to be able to watch movies from my FireTV-Stick.

I can not play any movie from the App, no error message is displayed on the app. The playback just fails.

This is the log file during trying to play something: embyserver.txt

I run Emby Server 3.5.3.0 and AndroidTv 1.6.15a

I reproduced this with a complete new server instance and configuration in docker and it still keeps happening.

ebr11 commented 6 years ago

Hi. Are you running through a reverse-proxy of some sort?

It looks like some of the payload from the request is being stripped.

sauerj commented 6 years ago

Hey, yes I use Apache as a reverse proxy.

Also tried on PS4, which does not work too. Only on the web client and Android Mobile playback works.

ebr11 commented 6 years ago

Okay, I'm pretty sure that is the problem. Most of the information being sent to the server is being stripped away by something.

sauerj commented 6 years ago

You are correct. A direct connection to Emby is working.

I dug into the Apache logs and compared the failing call from FireTV with a call from the browser.

This is the failing access from the FireTV: [19/Oct/2018:00:19:25 +0200] "POST /emby/Items/0df99876788398a0a26c11f4f22a2709/PlaybackInfo?format=json HTTP/2.0" 400 40 "-" "Dalvik/2.1.0 (Linux; U; Android 5.1.1; AFTM Build/LVY48F)"

Same video from the browser: [19/Oct/2018:00:26:28 +0200] "POST /emby/Items/0df99876788398a0a26c11f4f22a2709/PlaybackInfo?UserId=d7323c4b64614ac6a1ece33db8427aed&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&AudioStreamIndex=1&MediaSourceId=0df99876788398a0a26c11f4f22a2709&MaxStreamingBitrate=140000000 HTTP/2.0" 200 2798 "https://xxx-xxx.org/web/index.html" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"

Maybe the JSON triggeres this? Where should there be any "stripping" of HTTP information?

ebr11 commented 6 years ago

It is the POST data that is getting stripped. I'm not sure by what...

sauerj commented 6 years ago

This is my Apache proxy configuration (stripped rest of vhost configuration)

ProxyPreserveHost On ProxyPass "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket" ProxyPassReverse "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket" ProxyPass "/" "http://127.0.0.1:8096/" ProxyPassReverse "/" "http://127.0.0.1:8096/"

As a work around I will use the direct connection to Emby but it would be nice to know why this is not working.

ebr11 commented 6 years ago

We aren't sure but it is something with the reverse-proxy.

Just FYI - you aren't getting proper playback (your items will always transcode to a generic format) in any of the Emby apps if this information is being stripped.

sauerj commented 6 years ago

I can not confirm this. Android Mobile and Emby Mobile in Firefox can play my media without transcoding over the reverse proxy.

LukePulverenti commented 5 years ago

Is this still an issue?

sauerj commented 5 years ago

I did not re-check it since the report. I do not have changed any settings of the reverse proxy or emby-server so I believe this is still an issue.

LukePulverenti commented 5 years ago

Have you looked through the Emby Community? There are many examples of similar reports as this, and then with a little adjustment to proxy settings there was no longer any problem.

sauerj commented 5 years ago

Have you looked through the Emby Community? There are many examples of similar reports as this, and then with a little adjustment to proxy settings there was no longer any problem.

Sure, but did not find any working solution.

LukePulverenti commented 5 years ago

Can you please try this with the new 4.0 release? thanks.

LukePulverenti commented 5 years ago

Closing due to abandonment. Please feel free to re-open with the requested information and we're happy to help. Thanks !