[BUG][URGENT] ALL VERSIONS - Plex playback exceeds chunk size in increasing circumstances

Server Version#:ANY
Player Version#: ANY

Due to increased data density (8k video starting to be come mainstream) and subsequently higher bitrates, plex is completely unable to keep up to the demands of playback, the higher the latency between the server and client the lower the bitrate ceiling, but even at a 1ms latency ceiling there is a calculable maximum bitrate a plex server can sustain due to an outdated, very archaic method of delivering video streams, not limited to transcoder etc, this is purely a hard software limitation and if plex do not keep up, an alternative in the space eventually WILL.

The problem seems to lie in the implementation of the streaming algorithm that just sits and waits for an RTT between each data chunk sent to the client (Imgur: The magic of the Internet) which between each of those waits causes the video to experience a “micro-stutter” which is better or worse based on the latency of the device.

I was even able to simulate this locally over an very minorly artifically inflated network latency (110ms~)

This seems to only be exacerbated in conjuction with plex determining the connection speed though also, e.g if a slower network is used that has a higher latency, the buffer length is increased and the user instead of receiving short micro-stutters has a longer time between buffer cycles, or in some cases the initial buffer can be long enough to mitigate all subsequent buffers that would’ve occurred.

The image I linked demonstrates this in more than enough clarity. I hope this bug can be categorized and resovled quickly!

I’m not sure how long this problem has existed for (judging from old posts it dates back to at least 4 years ago) but there doesn’t seem to ever have been an official response or notifying that it is a bug that is known/being worked on. I and many other lifetime plex pass subscribers surely would appreciate Plex’s transparency. Thanks!

*edit
To form an opinion based on observations, experience and admittedly a healthy helping of salt I’ve had recently I’d have to say;
Though with the loss of the only large sponsorship spots I’d think I’ve ever seen plex have (from Linus Media Group) and a seeming unwillingness to work on maintaining existing feature sets as well as future-proofing, I can only surmise plex has decided to sunset and are willingly cascading toward catastrophic failure and approaching subsequent bankruptcy in the somewhat near future. To say there’s some blockbuster level of decision making going on would honestly not even cover it.

A media server that can’t reliably and scalably serve media the host is physically capable of processing just fine is very problematic.

1 Like

i just got 65" OLED TV , connect to 300mbps network (plex server on fiber connection with 1gbit/s real connect speed) and i got extreme stops and buffering every 2-3 seconds, its look like plex doest buffer more than 5-8mbytes at once. Its unreal to look any 4k with such problem.

1 Like

It’s a pretty huge bug with plex that literally prevents it’s core usage, I hope the plex staff acknowledge it at least and have the team actually fix it since something like a configurable buffer/chunk size would seemingly just fix the problem entirely even without changing the odd short RTT requirement.

Since I’m established on plex and have used the platform for a good few years I’d like to avoid swapping, but if a media server can’t even serve media properly under reasonably ideal conditions I might actually have to start looking into migrating to an alternative.

Here is a reddit post that more thoroughly explains the issue and seems to have diagnosed it a lot better than me and it’s just as simple as /only/ high latency but a few things in conjunction with each other that cause the failure, they had even spitballed the idea of some potential fixes Reddit - Dive into anything

Also likely related: Is it possible to set size of streamed chunks (m4s files)?

I HAVE DONE IT.

Thank you Plex for stealing other people’s hard work that actually is quite configurable. Shame Plex has no in-app method of configuring these settings and as I originally theorized they would entirely fix the problem…

On a windows PC heading to %localappdata%/Plex and editing the file mpv.conf, appending:

demuxer-max-bytes=1000M
cache-pause=yes

at the bottom should solve all the issues. Mileage may vary and increasing the size above 1GB may be necessary for exceptionally large files.

Please make this a priority Plex! It effects apple TV too

can you please send what its looks like in file?
i got only file mpv.conf.md
is it right one?

what format and where its should be written? as you note
demuxer-max-bytes=1000M
cache-pause=yes

or with some “- `” before?

If you don’t have an mpv.conf you can create one and it should work!

usually there should be a default file with the markdown at the top

# This is a sample mpv.conf file. You may edit this file as you desire to change MPV’s behavior. See the mpv.conf.md file for more info

you can simply add

demuxer-max-bytes=1000M
cache-pause=yes

right below.
If you don’t have the file you can create it with those options in (no - required) and it should work!

I had posted in the other thread where a plex team member was responding and have informed them of a way to reproduce this issue, hopefully that’s enough and they look into solving this and we don’t need to use janky fixes like this going forward though! fingers crossed :crossed_fingers:

  1. i make mpv.conf file in %localappdata%/Plex near to .md one

  2. insert this strings and save

  3. restart HTPC

  4. tried to play video 4k (54.53 GB) Amsterdam and its have the same issue, stop and buffering each few seconds. immediately make speedtest - 750\750 on HTPC and 320mbit on AppleTV

The MPV config is for windows only, the change doesn’t work on apple devices due to it using a different player unfortunately, you’ll have to wait til plex implement a fix for this on apple. Again though we did get some kind of response that seemed somewhat promising, we’ll see how that goes.

1 Like

Not on my planet it isn’t :smiley:

Interesting thread.

I tried reproducing the issues you are seeing and am unable to do so.

Using 8k video files and a couple of high bit rate 4K files.

Server to HTPC

It’s a shame for PLEX not fixing it, problem issued from 2016 as I see on topics

I produced the issue on LAN, merely increase latency over 100ms and the bitrate limits become very noticeable, you can use clumsy to simulate network latency. It’s a pretty common tool to help debugging.

This is an issue that’s existed since at least 2016 though from reading logs provided by some users as mrdiego mentioned.

You’re welcome to reproduce the issue to join the complaining to see if we can get things done about it faster though :joy:.

The fact this is reproducible within a 2x VM’d 10gbe vlan isn’t under dispute here. I’ve categorically proven this is a bug that exists, if you weren’t able to arbitrarily experience it though I feel happy for you to not have to deal with it on a day to day basis, but a lot of us do.

1 Like

This still seems like an issue on my Apple TV with the latest server update. 4K content will start to get out of sync, and video studders. Mashing rewind temporally resolves this. Sopping and restarting doesn’t.

It’s likely due to the same engine that’s determining the buffer, slighty different reasons of either case where the culprit is essentially just under-provisioning, not calculating how long is available for playback in seconds but rather a size limit that’s not applicable for files of varying bitrates

But until we get an update on the status, or if they’ve begun working on a long term fix, or anything we’re just flying blind. Hopefully we get an update soon, but after I provided logs and a test environment to reproduce the issue they’ve gone a little radio silent, not even acknowledging that the issue has been observed, but it’s still early doors yet really, hopefully they respond in the next couple of weeks or so

Likely because this is an edge of an edge case (no, 8K video is not proliferating as suggested in the first post). I’d argue that these types of issues are not often manifest on a typical personal media server. Global travel aside, there’s little reason to share non-regional access to one’s server(s). However, I know of folks on these forums successfully sharing server access between the US and Australia.

In the case where that is needed, I’d argue that more local cloud servers are a better solution. Contrived reproduction examples and dubious use cases are not compelling arguments for the development work required to implement and test this across the breadth of client platforms which Plex supports.

I’m not suggesting that your observations aren’t accurate or reasonable. Only that they are neither a bug nor urgent.

Personally, I’d rather see them implement support for the Stream Control Transmission Protocol (SCTP). Man, when is that protocol ever going to get its due :upside_down_face: ?

I wouldn’t call 110ms latency with bitrates over 10,000 contrived or niche, or local playing 4k media to a Chromecast for the buffer to be underprovisioned due to filesize (requiring the manual rewind for the buffer to reach acceptable levels for playback) it’s not as rare an issue as you’re making out, though I’m glad your friends sharing from aus to us are able to playback content smoothly at 720p, which does end up being the general consensus. Depending on how content is ripped and the latency band however even 1080p can be problematic.

It’s not rare, it’s not an outlier and the expression of 8k being inherently even more problematic doesn’t make high bitrates 1080p and 4k content not problematic. The test case I supplied was well within reasonable parameters and that was by design, I created a scenario that would and does happen in a real world scenario.

This being unintentional/overlooked behavior (bug) in the media decision engine is entirely fixable and should be urgent as it prevents regular uninterrupted usage to a LOT of Plex users. Yes everyone can transcode everything to 720p and watch everything uninterrupted (except for some actual edge cases with exceptionally erratic latency, e.g satellite from a ship at sea)

Though I do agree Plex could do with some big changes to move things into the present, taking advantage of newer, more efficient technologies to expand current and future features and some of which could inherently fix the issues introduced, but Plex has already peaked once and reinvesting in a big way might not encourage new customers, just appease old ones which Plex is still a business and not doing anything is generally going to keep the majority of their old customers anyway, so is the potential to hemorrhage money on a reinvestment actually worth it? Probably not given how some of the bigger moves haven’t paid off very well, the live TV stuff, Plex arcade, the bizarre partner music service that’s twice as expensive as Spotify with fewer features (even one of the most requested features; rich presence)

Again, we’ll just have to wait and see. Hopefully they do fix the problem, even just adding manual config override options to each of the client bases would be sufficient without encroaching too much and could be applied as-needed.

I know a few …without issue. :slight_smile:

1 Like

Must be using the Homing Pigeon with a Large Flash Drive (HPLFD) protocol for a smooth viewing experience. The latency is terrible, and packet loss can be a factor, but when it works…

I imagine like previously mentioned your bitrate probably makes it irrelevant.