Jump to content

Direct playback doesn't start and spinner stays on screen


ken-ji

Recommended Posts

Hi been wondering what the exact problem is with my setup

Playing back using LG-G6 (Android 8.0 - Nov 2018 patch)

I'm using EmbyServer 3.5.3 docker under unRAID 6.6.6 with nginx performing ssl - proxying

 

Whenever I try to playback a file which is determined to be ok for directplay, the spinner just sits there spinning

5c298106933bc_Capture_20181231103050.png

 

Its possible to hit back though... and the spinner stays there until you open another video file

 

5c29812be4c2a_Capture_20181231103102.png

 

looking at the logs reveal an error 500 was returned to the client, but no idea why that was so.

 

I don't have this issue using Chrome and Chrome Mobile, Roku, and Emby Theatre to playback these specific files as they get transcoded.

embyserver.txt

Edited by ken-ji
Link to comment
Share on other sites

Hi, can you check and make sure your proxy isn't stripping off any request or response headers? Particularly look at the range headers, which are important for direct file playback.

 

@@pir8radio may have some tips. thanks !

Link to comment
Share on other sites

pir8radio

Post your nginx config..    make sure you have the Range headers like luke said..   Especially if these are MP4 files.  If MKV or something it should play without the Range headers. 

Link to comment
Share on other sites

hmm @@pir8radio... I suppose the relevant section is

server {
    listen 443 ssl;
    server_name emby.way-of-the-blade.com;
    include include-ssl-params.conf;

    location / {
        satisfy any;
        proxy_pass http://192.168.2.70:8096;
        proxy_hide_header X-Powered-By;
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        #Next three lines allow websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        # access_log off;

        proxy_request_buffering off;
        proxy_read_timeout 300;
        proxy_pass_request_headers on;
    }
}

Link to comment
Share on other sites

pir8radio

 

hmm @@pir8radio... I suppose the relevant section is

server {
    listen 443 ssl;
    server_name emby.way-of-the-blade.com;
    include include-ssl-params.conf;

    location / {
        satisfy any;
        proxy_pass http://192.168.2.70:8096;
        proxy_hide_header X-Powered-By;
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        #Next three lines allow websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        # access_log off;

        proxy_request_buffering off;
        proxy_read_timeout 300;
        proxy_pass_request_headers on;
    }
}

 

 

That looks correct, but that is also not the config running on your nginx right now....  

Link to comment
Share on other sites

@@pir8radio

 

I'm hundred percent sure it is. I've tweaked the access log to dump the request from the client

Jan  2 21:21:52 c2d44fa1296e nginx: 112.201.123.160 - - [02/Jan/2019:21:21:52 +0800] "GET https://emby.way-of-the-blade.com/Videos/a49b0d5531bde0621718f96de244145f/stream.mkv?Static=true&mediaSourceId=a49b0d5531bde0621718f96de244145f&deviceId=7f4adc354dbed4ef&api_key=5f82fe948b7b49f2ac3f8b3901cedb00&Tag=0ed7128e58e66d90817e191562f0e0e5 HTTP/1.1" 206 543 "-" "mpv 0.29.1"

and the matching error in the embyserver.txt

2019-01-02 21:21:52.088 Info HttpServer: HTTP Response 500 to 112.201.123.160. Time: 3ms. http://emby.way-of-the-blade.com:8096/Videos/a49b0d5531bde0621718f96de244145f/stream.mkv?Static=true&mediaSourceId=a49b0d5531bde0621718f96de244145f&deviceId=7f4adc354dbed4ef&Tag=0ed7128e58e66d90817e191562f0e0e5

What made you say it wasn't?

Link to comment
Share on other sites

pir8radio

@@pir8radio

 

I'm hundred percent sure it is. I've tweaked the access log to dump the request from the client

Jan  2 21:21:52 c2d44fa1296e nginx: 112.201.123.160 - - [02/Jan/2019:21:21:52 +0800] "GET https://emby.way-of-the-blade.com/Videos/a49b0d5531bde0621718f96de244145f/stream.mkv?Static=true&mediaSourceId=a49b0d5531bde0621718f96de244145f&deviceId=7f4adc354dbed4ef&api_key=5f82fe948b7b49f2ac3f8b3901cedb00&Tag=0ed7128e58e66d90817e191562f0e0e5 HTTP/1.1" 206 543 "-" "mpv 0.29.1"

and the matching error in the embyserver.txt

2019-01-02 21:21:52.088 Info HttpServer: HTTP Response 500 to 112.201.123.160. Time: 3ms. http://emby.way-of-the-blade.com:8096/Videos/a49b0d5531bde0621718f96de244145f/stream.mkv?Static=true&mediaSourceId=a49b0d5531bde0621718f96de244145f&deviceId=7f4adc354dbed4ef&Tag=0ed7128e58e66d90817e191562f0e0e5

What made you say it wasn't?

 

Because when I go to your domain I I'm seeing you running HSTS (which may be in your server block, please include your whole nginx config)  I also see that you are running Nginx version (i think it was 1.14?) in your headers. Yet "proxy_hide_header X-Powered-By" should be hiding that info, but its not which means its not running that line of the config in nginx. 

 

 

Do me a favor, start a video playing, and leave it....  let it sit for an ridiculous amount of time, see if it starts playing (like it has to download the whole video first).  If it starts playing you are stripping some headers somewhere. 

Edited by pir8radio
Link to comment
Share on other sites

I still don't see what you meant, but the entire dump of my nginx config is:

<<REDACTED>>

Also the particular directive you are referring to is only supposed to omit X-Powered-By if it exists anywhere. not the Server: one you are looking at.

 

Tried leaving it alone for a long while and no dice. also, it doesn't work locally either.

Edited by ken-ji
Link to comment
Share on other sites

pir8radio

I still don't see what you meant, but the entire dump of my nginx config is:


Also the particular directive you are referring to is only supposed to omit X-Powered-By if it exists anywhere. not the Server: one you are looking at.

 

Tried leaving it alone for a long while and no dice. also, it doesn't work locally either.

 

Ok you can edit your last post and remove your config... config looks fine.   When you say "it doesn't work locally either" you mean bypassing nginx?

Link to comment
Share on other sites

pir8radio

Also your server looks like its on a different subnet than your clients, anything sit between the subnets or are you just using as one big network?

Link to comment
Share on other sites

pir8radio

Sorry, got confused there... ignore the locally part....

So when you bypass nginx does it work?

Link to comment
Share on other sites

the android client has been accessing the server remotely over the internet

 

Hmm.. let me confirm that over VPN.

Edited by ken-ji
Link to comment
Share on other sites

Looks like it doesn't work... but I'm accessing the server directly over a site to site VPN - so I'm on a different subnet....

2019-01-04 08:35:30.110 Info HttpResultFactory: Setting range response values for /mnt/user/Downloads/.Roku/[HorribleSubs] Black Clover - 64 [720p].mkv. RangeRequest: bytes=0- Content-Length: 56, Content-Range: bytes 0-55/56
2019-01-04 08:35:30.112 Debug HttpResultFactory: Transmit file /mnt/user/Downloads/.Roku/[HorribleSubs] Black Clover - 64 [720p].mkv
2019-01-04 08:35:30.289 Info HttpServer: HTTP GET http://192.168.2.70:8096/emby/Items/a49b0d5531bde0621718f96de244145f/Images/Primary?tag=c799a2aa9383443341c37e666a0f9831&quality=90. UserAgent: Dalvik/2.1.0 (Linux; U; Android 8.0.0; LG-H870DS Build/OPR1.170623.032)
2019-01-04 08:35:30.289 Debug HttpResultFactory: Transmit file /config/metadata/library/a4/a49b0d5531bde0621718f96de244145f/poster.jpg
2019-01-04 08:35:30.290 Info HttpServer: HTTP Response 200 to 192.168.60.210. Time: 1ms. http://192.168.2.70:8096/emby/Items/a49b0d5531bde0621718f96de244145f/Images/Primary?tag=c799a2aa9383443341c37e666a0f9831&quality=90
2019-01-04 08:35:30.549 Info HttpServer: HTTP Response 200 to 192.168.60.210. Time: 1898ms (slow). http://192.168.2.70:8096/emby/Playback/BitrateTest?Size=1000000
2019-01-04 08:35:30.587 Info HttpServer: HTTP Response 500 to 192.168.60.210. Time: 687ms. http://192.168.2.70:8096/emby/Videos/a49b0d5531bde0621718f96de244145f/stream.mkv?Static=true&mediaSourceId=a49b0d5531bde0621718f96de244145f&deviceId=7f4adc354dbed4ef&Tag=0ed7128e58e66d90817e191562f0e0e5

I still see the error 500 response

 

I'll try to get a direct site VPN to my phone running, or visit the server locally

Link to comment
Share on other sites

pir8radio

Oh wait a min...  you said that android device has always been accessing your server over the internet...  but the 500 errors in your initial log showed a local address?  Does the android device not show as a remote wan address?

 

Emby/Advanced  is it set currently if so to what?    Just curious

5c2eb00bb6b27_Capture.png

Edited by pir8radio
Link to comment
Share on other sites

The local address is due to the nginx proxy. - hmmm the nginx proxy is on a different subnet... 192.168.95.129 - maybe that's what causing this?

 

Emby / Advanced is set to the LAN address 192.168.2.0/24

Link to comment
Share on other sites

pir8radio

The local address is due to the nginx proxy. - hmmm the nginx proxy is on a different subnet... 192.168.95.129 - maybe that's what causing this?

 

Emby / Advanced is set to the LAN address 192.168.2.0/24

 

Yea but emby shouldn't see the nginx IP nginx should still see the remote IP and pass it to emby.   so your emby dashboard should show the clients wan address...

 

I dont use docker, but i recall someone else using apache and docker having the same issue, I dont recall the fix....  Ill look for that post.  thought it was something with the nat and setting the container to host...  i don't remember. 

Edited by pir8radio
Link to comment
Share on other sites

You are correct. I tried looking art the current logs and the old log... and it seems the old log were somehow connecting to the server via the LAN IP over the site to site VPN.

 

I've resetup the server connection on the android client to ensure it is connecting to the internet and the logs show the same error with the connection coming from internet IP.

 

for reference my docker is running in custom network mode - which is like host mode - except it gets a different IP from the host.

Link to comment
Share on other sites

pir8radio

new logs showing the same info?

nginx logs would help too.

Edited by pir8radio
Link to comment
Share on other sites

Sorry, been away for a while. the problem still occurs, but I'll need to restart my server, and do controlled testing... I'm confused because I am seeing the LAN IP of the phone, but the settings are supposed to access the server via internet. I'm getting confused probably because I have a site-to-site VPN (the server is remote) - I'll try to get back to this soon.

Link to comment
Share on other sites

With emby 4.0 released. I'll wait until I can upgrade to it and test there.

though I have to ask, does the client perform some form of network connection to see if the server can be reached by the LAN IP? because that would explain the reason the remote LAN IP showing up in the logs.

Link to comment
Share on other sites

Ok. updated to latest stable 4.0.0.2

No issues so far.

 

Tried to access it with my phone LG G6 (running over the internet)

logs attached.

 

Interesting observation now.

Playback of files (direct playback as far as I can tell) doesn't work on a library of type "Home videos & photos"

Playback of files (direct or transcoded) work well on the other library types "Movies" and "TV Shows"

 

Let me know if you need any other test points...

 

embyserver-just-my-lg6-over-internet.txt

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