Jump to content

Emby/HLS pausing playback and won't resume


AciDCooL

Recommended Posts

AciDCooL

Hi Guy's,

To be clear this is only with the webapp and presuming this is due to HLS caching problem since there is some proof in the console. Seen allot of threads in this forum about pausing video maybe this might solve a few more of them.

So playback stops randomly (faster with higher bitrate content, which makes sense) and error's out in the chrome console with the errors in the attached screenshot. The only thing that helps is restarting the video, unpausing is not an option since HLS already errored out. 

Also checked my transcoding settings etc. But even without transcoding this happens. And with transcoding I can trick the webplayer with lower bitrate content to keep playing. Oh and I noticed that "H264 encoding CRF" had noticeable impact, I always had it on 18 but going higher (now on 30) helps with this issue. (Or its a placebo effect since I can't measure when the buffer runs out)

Now I've done some digging towards the solution, and I know this is close to blasphemy but here is the link , since it contains a possible solution to the problem.

 

 

chrome_BylIlqgPrT.png

Edited by AciDCooL
Link to comment
Share on other sites

Hi, the crf option will definitely have an impact because a lower value increases the bitrate which means larger segment sizes.

  • Agree 1
Link to comment
Share on other sites

AciDCooL

Ok so the new version changelog states: "Fix web app playback regressions of videos that successfully played in previous server version"

Educated guess that this has absolutely nothing todo with my blasphemes hls.js fix? 😛 (https://github.com/video-dev/hls.js/issues/876)

 

I tried watching stuff on Safari since it has its own player and thus not having any issues, but i'm not really into the idea of using another browser just to watch Emby. And since this is a edge case with high bitrate content I don't encounter it that much, it's just an annoyance with some files. Would be nice to have this fixed, future proofing the 4k bitrate content on the webapp.

Link to comment
Share on other sites

AciDCooL

Yes I did but not yet tested the issue. Was just wondering if that change in the changelog and anything todo with the hls error.

Link to comment
Share on other sites

It was something else, but please give it a re-test as it may have an impact. We did not incorporate the exact change you mentioned because it's not something I would feel comfortable patching directly to the stable release without first spending a little while on the beta channel.

Link to comment
Share on other sites

AciDCooL

Tested during my lunchbreak, here is the result in the screenshot. And I do agree never patch something directly into stable.

I would enjoy a beta release with has this as a test option though, or someway those parameters are exposed. I do have a file which I can reproduce this with. And If I can be of any help then please let me know.

ULysoEgCmA.png

Link to comment
Share on other sites

  • 2 months later...

Hi All, I am getting exactly the problem described here. Playing pausing at higher bitrates and HLS errors in the console logged. If I try to drop the quality to anything under 1080@30Mbps it will then play through fine. This is only happening in the web app, android etc all work fine. I am currently running version 4.6.4. As I am running in Proxmox I cloned out my running server to a test server and upgraded to beta 4.7.0.11 and had exactly the same problem.
Really my question is do you need any more information? I can replicate the issue quite quickly and easily so getting logs and screenshots is not an issue. Should I be tagging on to this post, or should I raise another to get this addressed? I can also clone out and upgrade if any testing is needed on later versions.

Link to comment
Share on other sites

9 hours ago, stonedog said:

Hi All, I am getting exactly the problem described here. Playing pausing at higher bitrates and HLS errors in the console logged. If I try to drop the quality to anything under 1080@30Mbps it will then play through fine. This is only happening in the web app, android etc all work fine. I am currently running version 4.6.4. As I am running in Proxmox I cloned out my running server to a test server and upgraded to beta 4.7.0.11 and had exactly the same problem.
Really my question is do you need any more information? I can replicate the issue quite quickly and easily so getting logs and screenshots is not an issue. Should I be tagging on to this post, or should I raise another to get this addressed? I can also clone out and upgrade if any testing is needed on later versions.

Hi there, yes can we please look at an example? Please attach the information requested in how to report a media playback issue. thanks !

Link to comment
Share on other sites

So I picked a random show that I have in 4k, started playing it fresh and it always freezing play back at 18 seconds, logs of the first time and a screen shot attached. If I then drop the res down to 1080p and the bitrate to 10Mbps it will play through fine. 

I am using an intel 8400 and using quick sync for transcoding. This seems to be ok, transcoding on the dashboard is always ahead of the playback and even continues after the web app playback pauses. The play back will continue if I alter the playback quality but nothing else seems to make play back work. To try to rule out transcoding I have messed about on android app to force transcoding and the playback was flawless. 

Just to rule it out, bandwidth should not be an issue, all local connections and my wan is symmetrical gigabit.

If any other information or tests are need, please let me know.

 

chrome.png

dashboard.png

ffmpeg-transcode-f7947b3c-c62a-469a-94c6-640f3f5bf5f9_1.txt embyserver.txt

Link to comment
Share on other sites

Just to see if this is a browser issue or not try a non-chromium browser such as Firefox.
If that works, I'd try disabling any browser addons and turn off (short time while testing) any security software you may be running on the client computer.

Link to comment
Share on other sites

Thanks cayars for the suggestion. Strange result. If did continue play but still got the HLS errors in the log and the video would stutter shortly after the HLS errors are logged. Clearly chromium is reacting differently to other browsers but as most browsers are chromium based it would be super if this issue could get resolved.

firefox.png

Link to comment
Share on other sites

With the mind set of proving as much clean data for the issue as I could, I cloned out a new instance of emby, set it up to only be local (removing any external URLs etc). Replicated the issue in Chrome and tried in Firefox. Firefox is still getting the HLS errors but it is not freezing the play back. logs and screen shots attached.

chrome.png

firefox.png

firefox - ffmpeg-transcode-f3de0e31-dd6c-459c-b05a-7aadf1a637a1_1.txt firefox - embyserver.txt chrome - ffmpeg-transcode-237fd888-de2f-4d7a-9dbb-570dc46fd80f_1.txt chrome - embyserver.txt

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
stonedog

@Luke it is giving different results. I am not sure it is working 100% but the results are different. I will run some testing over the next few hours and see what happens.

Link to comment
Share on other sites

stonedog

@Luke It seems to work much better. I did get a few glitches but nothing I could replicate. I managed to ply both my earlier samples without issue. At this point do you know the cause is it something in my build causing an issue or is it something that can be patched? if so when a fix might be released?

Link to comment
Share on other sites

I don't know the cause yet but that's a good sign you'll see improvement with the next server release when it will have the same changes.

Link to comment
Share on other sites

  • 1 month later...

@LukeI can confirm this issue persists on latest stable and beta builds.

As a developer, I noticed that Jellyfin has some code to deal with this.

https://github.com/jellyfin/jellyfin-web/blob/742eb88111dfed2552b593d145d66efb85af60ee/src/plugins/htmlVideoPlayer/plugin.js#L395

By manually editing the corresponding file in Emby server, I can confirm that changing maxBufferLength to 6 solved the issue in latest Chrome even with 4k 120Mbps bitrate.

Hope this can be solved in the next release :)

Link to comment
Share on other sites

  • 3 weeks later...

I also confirmed from three user's that this issue persists as well on stable and beta builds or any video that is 4k, starting at 40Mbps.

As a developer as well, I ended up manually edited the basehtmlplayer in the Docker container to change the maxBufferLength, not maxMaxBufferLength, to 6, and this issue was resolved. This seems to be a known issue with hls.js and 4k videos and chrome, so hopefully a fix can be included in the next release :) 

Edited by mantonx
Link to comment
Share on other sites

Happy2Play

@softworkzcan you comment on this as you mentioned the same in the referenced issue from (2017).

                    // Some browsers cannot handle huge fragments in high bitrate.
                    // This issue usually happens when using HWA encoders with a high bitrate setting.
                    // Limit the BufferLength to 6s, it works fine when playing 4k 120Mbps over HLS on chrome.
                    // https://github.com/video-dev/hls.js/issues/876
                    if ((browser.chrome || browser.edgeChromium || browser.firefox) && playbackManager.getMaxStreamingBitrate(this) >= 25000000) {
                        maxBufferLength = 6;
                    }

 

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
LeotheBravest

Same problem ,happans on chrome,while playing 4k 40mbps 

videoplayer stuck after 15 seconds and browser terminal shows "HLS Error: Type: mediaError Details: bufferFullError Fatal: false"

Link to comment
Share on other sites

LeotheBravest

a way maybe can solve the problem 

edit /emby-server/system/dashboard-iu/modules/htmlvideoplayer/basehtmlplayer.js

add the code maxBufferLength:6 after emeEnabled:!1😛

var hlsOptions={manifestLoadingTimeOut:2e4,debug:!1,testBandwidth:!1,emeEnabled:!1,maxBufferLength:6};
  • Agree 3
  • Thanks 2
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...