Streaming Brain - discussion

Hi,

First of all - thank you for finally adding the option for setting limits to streaming and transcoding.
This is log overdue :wink: .

But I have a quick question - right of the top.
Would it really hurt if the option Maximum simultaneous video transcode had a value of ā€œ0ā€ on the list??

No, but it might confuse some people.

What message is shown if you have a transcode limit on lets say 8 transcodes and a 9th player starts transcoding what message is shown to that player(if supported ofcourse) ?

"The Streaming Brain!!!" If anything sounds like a 50s or 60s horror movie that is it. I can hear the radio ads now:

Beware ā€œThe Streaming Brainā€ it oozes into your house and engulfs your data and spreads copious copies throughout the world.
The nefarious evilness of ā€œThe Streaming Brainā€ must be seen to be believed, but be forewarned ā€œThe Streaming Brainā€ is so terrifying that you must sign a waver absolving the theater and all others from liability should you be unable to stop screaming or otherwise damage yourself from convulsions caused by "The Streaming Brain."
You have been warned.

It would be useful if you could apply the maximum bit rate to shared users only and give priority to the server owner (like for my current situation where I’m away from home for a while).

@izeen said:
What message is shown if you have a transcode limit on lets say 8 transcodes and a 9th player starts transcoding what message is shown to that player(if supported ofcourse) ?

Not enough CPU for conversion of this item.

@Elijah_Baley said:
ā€œThe Streaming Brain!!!ā€ If anything sounds like a 50s or 60s horror movie that is it. I can hear the radio ads now:

You forgot IN 3D!!!!

I can’t test the Streaming Brain myself right now, the help article doesn’t seem to answer my question.

Let’s say I set the upload to 10 Mbps and limit remote stream quality to no limit (original).
Remote clients have Original setting enabled.
What happens when a 6 Mbps remote stream is playing and a second one with 6 Mbps is starting? Does it then say ā€œNot enough Internet bandwidth available for this itemā€ or does it intelligently switch the second stream to a transcode (3-4 Mbps)?

@Wiidesire said:
Let’s say I set the upload to 10 Mbps and limit remote stream quality to no limit (original).
Remote clients have Original setting enabled.
What happens when a 6 Mbps remote stream is playing and a second one with 6 Mbps is starting? Does it then say ā€œNot enough Internet bandwidth available for this itemā€ or does it intelligently switch the second stream to a transcode (3-4 Mbps)?

The first will get 6Mbps. The second will be transcoded down to 2Mbps. This is a total of 8Mbps as only 80% of the total upload limit is given to streaming reservations. The rest is to account for network spikes, network variability, and other traffic. This is, of course, assuming the server is capable of transcoding and the transcode slot pref is set high enough that there’s a slot available.

As to what the server tells the client, it actually sends back 3 messages. I’m going to assume that the 6Mbps mentioned above is direct play. The first message is a general message and this would say that it cannot direct play but transcode is ok. The second is the reason the server rejected direct play and this one will say there is not enough bandwidth. The third will be the transcode reason which will say transcode is ok. Additionally it also tells the client how much bandwidth is available in case it wishes to take another action.

On the subject of bitrates, be sure to note the last section in the help article which discusses bitrates. There is a giant difference between average bitrate and max bitrate. The Streaming Brain uses max bitrates for its computations.

Very good question, I would like the answer to it too. Another possibility would be to just use the left over bandwidth for the second client and seems the most likely to me with the current version of Streaming Brain but it’s something that should be configurable by the server admin in the future

Edit : it was answered as I was typing this!

Already having problems after upgrading.

My server is hosted in a DC, 1Gbit WAN port. I set the ā€˜Internet upload speed’ to 1000Mbps and had at least one user getting ā€œNot enough bandwidth for any playback of this itemā€ while not going over 40Mbps in total BW utilization. Weird.

@gbooker02 said:
as only 80% of the total upload limit is given to streaming reservations
This should be added to the help article in my opinion.

@gbooker02 said:
On the subject of bitrates, be sure to note the last section in the help article which discusses bitrates. There is a giant difference between average bitrate and max bitrate. The Streaming Brain uses max bitrates for its computations.
I know the difference between CRF and fixed bitrates, so it makes sense for direct play streams. Does the transcoder use a CRF as well or is it fixed? Should be fixed bitrate, right?
@gbooker02 said:
The first message is a general message and this would say that it cannot direct play but transcode is ok.
Wait, didn’t you just say the second stream will get transcoded to 2 Mbps automatically? Why is a message appearing? Is it only one click like ā€œOkā€ and then the transcode starts or does the user himself need to choose to transcode after the message appeared?

@Hermann said:
My server is hosted in a DC, 1Gbit WAN port. I set the ā€˜Internet upload speed’ to 1000Mbps and had at least one user getting ā€œNot enough bandwidth for any playback of this itemā€ while not going over 40Mbps in total BW utilization. Weird.

Can you post the metadata XML for the item the user was trying to play. Also, if you can reproduce, try following these steps to produce log files around the issue. You can disable debug logging after you’ve reproduced the issue.

Please PM me the logs rather than posting them here.

@Wiidesire said:
I know the difference between CRF and fixed bitrates, so it makes sense for direct play streams. Does the transcoder use a CRF as well or is it fixed? Should be fixed bitrate, right?

The transcoder sets maximum bitrates when it is used. Nothing prevents the transcoder from choosing to go below that bitrate if the situation warrants (such as a very little motion or a black screen) which is why it is a maximum.

Wait, didn’t you just say the second stream will get transcoded to 2 Mbps automatically? Why is a message appearing? Is it only one click like ā€œOkā€ and then the transcode starts or does the user himself need to choose to transcode after the message appeared?

These are messages sent to the client, not what the client displays. In this case, the client will not display a message but instead just start straight into the transcode. During playback, if the client has a mechanism to display why transcode is being used instead of direct play (such as a debug screen), it’ll then display the direct play messages (in this case).

Thanks @gbooker02, now everything is clear.
Haven’t thought about the possibility to use a CRF in combination with a maximum Bitrate cap, makes definitely more sense bandwidth wise.

So since in the past Plex would like to pretty much max out your upload while starting a stream in order to get a nice buffer for the client, does setting say a 9 Mb limit on a 10Mb connection make sure that plex will never ever completely saturate the line? It can be bad when playing online games and suddenly someone starts streaming something and then you get transported to lag city for a while.

Also Plex Team, it would be rad if next we could get stream limits that only apply to certain users. :slight_smile:

@TouchMyBox said:
So since in the past Plex would like to pretty much max out your upload while starting a stream in order to get a nice buffer for the client, does setting say a 9 Mb limit on a 10Mb connection make sure that plex will never ever completely saturate the line? It can be bad when playing online games and suddenly someone starts streaming something and then you get transported to lag city for a while.

Also Plex Team, it would be rad if next we could get stream limits that only apply to certain users. :slight_smile:

It’s stated above that Plex already only uses 80% of the set amount, so it’s up to you if you want to set an even lower amount.

@TouchMyBox said:
So since in the past Plex would like to pretty much max out your upload while starting a stream in order to get a nice buffer for the client, does setting say a 9 Mb limit on a 10Mb connection make sure that plex will never ever completely saturate the line?

Even more than that, it doesn’t saturate the value you give it. Earlier I commented:

only 80% of the total upload limit is given to streaming reservations. The rest is to account for network spikes, network variability, and other traffic.

So, even if you set it to 10, it still won’t use it all. Saturating your upstream is very bad and we try to ensure we don’t do that.

Thanks for the clarification.

@gbooker02 said:
On the subject of bitrates, be sure to note the last section in the help article which discusses bitrates. There is a giant difference between average bitrate and max bitrate. The Streaming Brain uses max bitrates for its computations.

Is there any way to see what Plex has determined to be our files’ max bitrate?

@cameron said:

@gbooker02 said:
On the subject of bitrates, be sure to note the last section in the help article which discusses bitrates. There is a giant difference between average bitrate and max bitrate. The Streaming Brain uses max bitrates for its computations.

Is there any way to see what Plex has determined to be our files’ max bitrate?

If you look at the XML of a piece of media you find it in a line similar to this:

requiredBandwidths="5885,5697,5337,5337,5337,5337,5337,5337"