Jump to content

Browsing through media library works but playback does not start with app


Recommended Posts

SigHunter
Posted (edited)

Hi,

I have an Emby Server running since about 2 years basically without a problem.
It is using Microsoft IIS as reverse Proxy with a Let's Encrypt certificate and which forwards plain http to https.

Recently I noticed that external connections do not always work. I think I've narrowed it down to the Emby app.

Example:
my phone is on mobile network, I open Emby app, it connects to server and I can browse the media,
but when I press play it just sits there and spins, never starts to play.

On the same phone, still on mobile network I open Firefox and browse the URL of the Emby Server,

i can browse the media and the same video plays without a problem and immediately.

Just not on the app.

 

I then switch to Wifi and I retry playback with the app and it also works in the app.

 

Meaning:

Connections from LAN work from app and browser
External connections only work from browser, not with app.

I've looked at IIs logs, emby logs in debug mode, android logcat, but I can't figure out the problem.

When spinning, the app shows in android debug logs:

04-09 12:04:04.382 15710 15906 V mpv     : [ffmpeg:warn] https: HTTP error 404 Not Found
04-09 12:04:04.383 15710 15906 V mpv     : [stream:error] Failed to open https://[my Dyndns Hostname]:443/emby/videos/141762/stream.mkv?DeviceId=[removed for privacy deviceID,MediaSourceID,SessionID,api Key]
04-09 12:04:04.383 15710 15906 V mpv     : [cplayer:v] Opening failed or was aborted: https://[my Dyndns Hostname]:443/emby/videos/141762/stream.mkv?DeviceId=[removed for privacy deviceID,MediaSourceID,SessionID,api Key]
04-09 12:04:04.383 15710 15906 V mpv     : [cplayer:v] Running hook: ytdl_hook/on_load_fail
04-09 12:04:04.383 15710 15906 V mpv     : [ytdl_hook:v] full hook
04-09 12:04:04.437 15710 15906 V mpv     : [ytdl_hook:error]  
04-09 12:04:04.437 15710 15906 V mpv     : event: tracks-changed
04-09 12:04:04.437 15710 15906 V mpv     : [ytdl_hook:error] youtube-dl failed: not found or not enough permissions
04-09 12:04:04.437 15710 15906 V mpv     : event: idle
04-09 12:04:04.437 15710 15906 V mpv     : [cplayer:v] finished playback, loading failed (reason 4)

What does the app do differently than a browser would?
I've spent days trying to figure this problem out but I'm stumped and at a loss.
Maybe someone can help me?

The Emby Server is 4.5.0.5 but I also tried latest stable 4.4.1 without luck.
Emby apps are the latest version from play store, I only tried the android app on 4 different phones, same result.
But it always works with browser.

 

I attached the part of iis and emby log at the time when I tried a connection with the app over mobile

I can provide further logs if needed

 

Thanks!

 

 

emby.log

iis.log

Edited by SigHunter
Posted

Hi, so you're trying from the Android TV app?

SigHunter
Posted

no from the normal android mobile app

SigHunter
Posted (edited)

just got my hand on an iphone, works with Emby for iOS 1.9.6 but not with any of the android apps on all my android phones (Emby for Android Mobile 3.1.14)

 

I also tested older android apps (3.0.56 and 3.0.47) and they also did not work, which makes it a emby server issue I think

Edited by SigHunter
Posted

Are you able to play with the web app on the same device?

SigHunter
Posted

Are you able to play with the web app on the same device?

if you mean via browser, yes

maegibbons
Posted

How from your diagnostic analysis, which was quite thorough, have you concluded this is an emby issue?

 

The very fact that you have tested it on the LAN and have proved the app works should tell you that it has everything to do with your external configuration.

 

In the first instance, by pass the reverse proxy and just port forward to your emby server to prove working.

 

Then introduce your reverse proxy.

 

Krs

 

Mark

 

Sent from my SM-N976B using Tapatalk

SigHunter
Posted (edited)

How from your diagnostic analysis, which was quite thorough, have you concluded this is an emby issue?

 

The very fact that you have tested it on the LAN and have proved the app works should tell you that it has everything to do with your external configuration.

 

In the first instance, by pass the reverse proxy and just port forward to your emby server to prove working.

 

Then introduce your reverse proxy.

 

Krs

 

Mark

 

Sent from my SM-N976B using Tapatalk

I concluded that the reverse proxy works because the playback works from remote via browser (firefox) and just not with the emby app.

or at least a browser does something different than the app, which I don't know.

also, there is a jellyfin instance on the same reverse proxy that works just fine.

 

If it weren't a windows server I'd switch the reverse proxy to nginx, which seems to be the only more or less supported config by emby, but I am bound to MS IIS (because of lets encrypt ACME and stuff)

 

is there a way to get old emby server versions? somehow all the old packages are immediately purged from downloads.

I'd like to try if this was introduced with some emby server version in the past, to narrow it down

 

 

 

In the first instance, by pass the reverse proxy and just port forward to your emby server to prove working.

 

Then introduce your reverse proxy.

I will do that

 

 

 

Edited by SigHunter
SigHunter
Posted

as I suspected, it works without reverse proxy.

since nginx is not an option for me I tried caddy and it just works without much configuration.

from remote via app, like a charm. so IIS was the problem, not sure why app behaves different than a browser though

Posted

Even though you're not using nginx, I would still suggest comparing to @@pir8radio's nginx setup.

pir8radio
Posted

as I suspected, it works without reverse proxy.

since nginx is not an option for me I tried caddy and it just works without much configuration.

from remote via app, like a charm. so IIS was the problem, not sure why app behaves different than a browser though

 

without looking at your logs,  I would take a guess that its some headers you are not passing...  Are these MP4 files? and what IP address shows up in the emby dashboard?   Yes app and browser will react totally different on playback.      Look into making sure you are passing your real ip to emby, and look at the range and if-range headers...   also make sure your proxy is connecting to 127.0.0.1 not "localhost"   ipv6 screws up using localhost on some proxies. 

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