Streaming Brain - too conservative ?

Hi, i’ve been looking into how all the streaming brain stuff works with Plex . i get it , it makes sense in the logs and i understand the decisions its makes … but is it too conservative with allowing what can be direct played ?

Here’s my scenario. i’m using a Raspberry PI that has about 150 MB of cache . now i have about 20 Mbps upload speed., the file i’m playing has an average bitrate of 10 Mbps . i understand that movies peak and go way above that number . plex logs show at some stages it may even jump to 46 Mbps

Now i’ve watched about 50 movies with this setup , any movie i have that has an average bitrate over 12000 Kbps i transcode as i know that with the peaks in movies up upload may struggle . but otherwise that setup has served me well with my movies

Now i recently messed with the upload setting, setting it to 25 mbps . just so that i would saturate the upload as i know it uses 80% ( i know i shouldn’t , but i wanted to see what it was capable of )

Now with this new setup that movie i mentioned first with 10mbps average will transcode . In the logs it shows as

Streaming Resource: Bandwidth exceeded: 20584 kbps > 20000 kbps

so that’s why it trancodes . i’m guessing the 20584 number is made up out of a number of factors , buffer, network etc etc . i get it. although i played with the buffer sizes on my raspberry pi and i could see in the logs that they were higher, but the 20584 number didn’t change… not sure on that one.

I’m pretty confident however that that movie using my old setup would direct play without a hitch using the 150 MB cache for when things got a little crazy., maybe i’m wrong on that , but as i said i’ve played 50 + movies and its been fine . so going back to my previous question… is it too conservative //

This is also more of a request than a question. or maybe a bit of both . but lets say i start watching a movie that uses 18 out of the 20 mbps upload . if someone else starts a show or a movie now it’ll automatically transcode that down to 2 mbps for that person… would it be possible sometime in the future to have it share the connection between the people ? so my stream would dynamically change to 9 mbps and they would also get 9. and if a 3rd joins in , it would again scale between 3 so it would be 6 mbps each … that would be pretty great and very versatile.

Sounds like you’re suggesting Adaptive Bandwidth Limiting?

Essentially… is that something that’s even possible here? i’m just spit balling .

Just to confirm here, your RPi is remote as in it is using your upstream bandwidth?

As per the buffer, many clients are not yet reporting the buffer used to the server. When they do, the server will select the bandwidth required for that file for the provided buffer size. The larger the buffer, the lower the bandwidth required (up to a point).

Yes it is remote, I’m running 1.7.1 of rasplex, had a little chat with those guys they mentioned they had added it in

If you think it it still being too conservative, we can investigate further. Please include the item XML with &includeBandwidths=1 added to the end of the normal URL. Also some server logs would be helpful too.

XML and server log attached

OK, you are running into a bug in version 1.3.3 of the server that we fixed a while ago and will be in the next release.

The bug causes it to not read the bitrates in the deep media analysis when the analysis is version 2 (the current version). As a result, it is taking the media’s average bitrate, 11577kbps, and doubling it (heuristic to go from average to a guesstimate of the peak bitrate) to get 23154kbps, which is the number in the logs.

I simulated the decision on the next version of the media server and there it will see a deep media analysis bitrates again and thus use computed 12387 + media overhead to get about 13Mbps. So with the next release you should be good.

Ah there it is . thanks for looking into that for me, i was going a bit mad when i couldn’t figure how it was getting that number