Jump to content

Weird video playback issue with https


wloot

Recommended Posts

I use cloudflare to reverse proxy my emby server and also for providing https support. I recently have some strange issues on Android app, sometimes video just keep loading never start playing and those are seem to only happen on tls connection. I suspect this has something to do with http/2, but can't confirm it further.

Edited by wloot
Link to comment
Share on other sites

Hi, I would doubt it's http/2 related or we would have lots of people with this issue.  I myself use Cloudflare and Android clients and haven't experience any issues like this.

When you experience this type of issue are you using WIFI or the cell network?
If a cell network it could be carrier related doing throttling or similar.

Can you give us a bit more information to describe the environment and setup you're using?

 

Link to comment
Share on other sites

I have digging this issue for a while in fact, and the log does not seem to see what happend on this problem. But I try to provide more information so that you can reappear it. So this happened during this log record: 1. I started recording logs when I clicked to play the video from the first time, it seemed to play successfully 2. I exited the video stream and then clicked the play button again 3. The problem occurred, and the app threw an error after about a minute of trying.

There is nothing special about the environment, I use cloudflare -> nginx(80 only) -> emby, turning on or off the development mode of cf cache does not help. agian this is happening only with https connection and only on android app (so far i see).

3 hours ago, Luke said:

Hi there, can we please look at an example?

 

Thanks !

 

log.txt

Edited by wloot
Link to comment
Share on other sites

Please attach the complete emby server log from an example, as well as the ffmpeg log if there was one.

Also please see:

5c9b141743595_Untitled.png

Thanks.

Link to comment
Share on other sites

4 hours ago, wloot said:

About more the issues i mean issue"s": sometimes video starts to play but for seconds it just stopped and stucked, etc....

That's often a sign that the bitrate might be too high for the connection and can normally be lowered using the quality setting, but in your case you've restricted user access to video transcoding.

Link to comment
Share on other sites

38 minutes ago, Luke said:

That's often a sign that the bitrate might be too high for the connection and can normally be lowered using the quality setting, but in your case you've restricted user access to video transcoding.

Network speed is not problem. what i mean stopped is stop buffering and playing, so there is no network load at the time.

Link to comment
Share on other sites

45 minutes ago, Luke said:

Please attach the complete emby server log from an example, as well as the ffmpeg log if there was one.

Also please see:

5c9b141743595_Untitled.png

Thanks.

Just have you tried to reproduce my environment and the issues? I think i've made it clear: the same video sometimes is able to play sometimes not, and on http connection it is always able to.

Edited by wloot
Link to comment
Share on other sites

I can't speak for the devs but I doubt any of the Emby team has a setup like your environment.

I myself have Emby running through Cloudflare but I have it setup using port 443 which goes through my firewall directly to Emby setup to use port 443 where I have my domain and cert installed so no nginx for me.

What port do you use for SSL/http2?
Is this handled by Cloudflare for you?

With a few different layers involved we need to see where the packets are stopping if the app/client buffer isn't growing. Are you able to see in nginx if it's still trying to deliver packets to Cloudflare for your Android Client?

Link to comment
Share on other sites

4 hours ago, Luke said:

@wloot what is your cloudfare caching setting configured to?

tl;dr: I have tried cloudflare's cache development mode, did not work, i'd not think cache is causing this issues.


I want to maximize the use of cloudflare caching, so I set up cache everything. But I just ran into trouble at beginning: cloudflare caches all that have no cache-control header responses. In order to fix it, I configured nginx rules to add no-store header for all responses that have no cache-control header. Following it was working fine, only on browsers... then I found that cloudflare removes the accept-range header in the response which brokes streaming on apps even though cache-control no-store header is added. So I had to add a special rule for video stream path to bypass cache level. Finally all devices are able to playback except the issues related to https on android app.

Edited by wloot
Link to comment
Share on other sites

On 9/21/2021 at 1:22 AM, wloot said:

I want to maximize the use of cloudflare caching, so I set up cache everything. But I just ran into trouble at beginning: cloudflare caches all that have no cache-control header responses. In order to fix it, I configured nginx rules to add no-store header for all responses that have no cache-control header. Following it was working fine, only on browsers... then I found that cloudflare removes the accept-range header in the response which brokes streaming on apps even though cache-control no-store header is added. So I had to add a special rule for video stream path to bypass cache level. Finally all devices are able to playback except the issues related to https on android app.

Can you share what changes you made in nginx?

Link to comment
Share on other sites

  • 1 month later...
On 9/21/2021 at 8:21 PM, Luke said:

Can you try disabling cf caching altogether as a test? Thanks 

I found that this issue seems to be related to directplay. When I set the Internet quality to 120mbps, at this time directplay is used, and playback starts to stutter and freeze. 

So these are three conditions to reproduce the problem: 1. connect to server with https 2. make sure using directplay 3. use emby android client

Edited by wloot
Link to comment
Share on other sites

No, I have not. I've seen seen any problems testing over https. Stuttering is usually a sign that the bitrate is too high for the connection, so you might try lowering the quality setting in the app.

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