Jump to content

Auto Bitrate - Not so good


pir8radio

Recommended Posts

pir8radio

Me and my peeps constantly get poor results with the "Auto Bitrate" function...  Most of them don't know how to set manual bitrates, like my parents.  When i setup theirs it was set to 5mbps now it defaults to auto?    Anyway the auto kind of sucks... we constantly get put on AUTO - 144p video setting... which is the lowest I believe..  If i manually set to 10mpbs it plays fine and is a full 10mpbs stream... Which I would expect.   So I think you need a better way to detect bandwidth, something is arye with the current method...    While your working on the per device bandwidth "limit" maybe add a server side hard bandwidth setting per user..  So from the server side I can set them to 5mpbs.   :)

Link to comment
Share on other sites

Jdiesel

I also don't use the auto settings because it always picks the lowest possible quality (800kbps) even when the connection is more than capable of playing +25mpbs streams. The server is hosted a fair distance away but ping times usually range from 80-120ms. My guess is that the test packet isn't large enough to give the connection enough time to ramp up to its actual speed.

Edited by Jdiesel
Link to comment
Share on other sites

pir8radio

this one seems to be very accurate....  its quick...  and its javascript..     http://stackoverflow.com/questions/5529718/how-to-detect-internet-speed-in-javascript

 

May I also suggest maybe this speedtest be ran once on the home screen then put the returned value in html5 browser storage or cookie and not constantly run the speed test like it does now.  Have that storage value clear every 12 to 24 hours or something?   Plus if the value is stored in browser storage i can pull it for reports on my server..   :)

Edited by pir8radio
Link to comment
Share on other sites

rbjtech

Does the bandwidth not need to be constantly reviewed though ?  

 

If I set max streaming bandwidth to say 10Mbit/sec (for all users as I understand it) and somebody starts a single stream - lets say they get all 10Mbit/sec.  However, if a new request/stream starts, then my assumption is each user will now get max 5Mbit/sec.  

 

How is Emby going to know to do this unless it constantly re-evaluates the real-time bandwidth requirements / limitations ? 

 

ps - i agree Auto doesn't work - I just ask the users to set it to a reasonable level of 4Mbit/sec - giving decent 720p viewing with no transcoding where possible, and sharing the upload bandwidth I do have.

Edited by rbjtech
Link to comment
Share on other sites

puithove

Yes, auto is not even close to being reliable and needs to be reviewed.  Having it set to auto even on my hardwired network at home frequently had it picking low bitrates.  

Edited by puithove
Link to comment
Share on other sites

pir8radio

Does the bandwidth not need to be constantly reviewed though ?  

 

If I set max streaming bandwidth to say 10Mbit/sec (for all users as I understand it) and somebody starts a single stream - lets say they get all 10Mbit/sec.  However, if a new request/stream starts, then my assumption is each user will now get max 5Mbit/sec.  

 

How is Emby going to know to do this unless it constantly re-evaluates the real-time bandwidth requirements / limitations ? 

 

ps - i agree Auto doesn't work - I just ask the users to set it to a reasonable level of 4Mbit/sec - giving decent 720p viewing with no transcoding where possible, and sharing the upload bandwidth I do have.

 

Its useless to do so..  Say your max internet bandwidth is 10mbps  user #1 logs on and starts a stream auto bandwidth sets him to 10mbps this one user is consuming your entire bandwidth now while he happily watches a movie...  user 2 logs on what is auto bandwidth going to set him at? even the lowest setting will screw with user 1's stream.   Now say three users come after user 1 what happens?   It doesn't go back and knock down user 1 so other users can stream (I don't want that anyway).   

 

The auto function is only useful if the server has unlimited bandwidth in my opinion..  it will auto set the client to have the best experience with no user input, basically matching the stream rate to the clients available bandwidth.   If the server has limited bandwidth there is no easy way to set auto bandwidth and this option is kind of useless... as a server admin you have to set this manually...  say i have 10mbps upstream internet, I know i never have more than three users streaming at one time, I would set the server bandwidth limit to 3mbps   so when user 1 logs on he gets 3mbps, then user two and three come one they still each get 3mbps..       I kind of have unlimited internet bandwidth in my setup so the auto function would be useful to me however it doesn't work.   

Edited by pir8radio
Link to comment
Share on other sites

I'm sure we can make improvements but I don't think there is any way to get a perfect answer here - which is why we allow you to set it manually.

 

In the case of a mobile device, the available bandwidth could vary from minute to minute so, yes, it does need to be re-evaluated due to the receiving end, not the sending one.

 

Any test we do is subject to so many variables that, if done at the exact wrong time, can produce a bad result.  We do tests with different sized items already to try and get a better read.  I'm sure we can make it better but I'm not sure we'll ever make it perfect.

Link to comment
Share on other sites

pir8radio

I'm sure we can make improvements but I don't think there is any way to get a perfect answer here - which is why we allow you to set it manually.

 

In the case of a mobile device, the available bandwidth could vary from minute to minute so, yes, it does need to be re-evaluated due to the receiving end, not the sending one.

 

Any test we do is subject to so many variables that, if done at the exact wrong time, can produce a bad result.  We do tests with different sized items already to try and get a better read.  I'm sure we can make it better but I'm not sure we'll ever make it perfect.

 

Understood, and that is kind of what I am saying in my post.. So many variables that this feature is only useful in a few instances.  However one of my issues is that the client apps are now DEFAULTING to AUTO instead of something conservative like say 3 or 5Mbps.   This feature becomes a problem the way it is setup today making the server fail with any more than one user streaming, its a great feature for a single client server, and a great feature for an unlimited internet bandwidth server if it worked correctly.    Its not that it runs at just the right time and then sets my clients to 144p   it happens way too often to be a fluke considering it happens to myself quite often, my server has 2Gbps internet, and my home client has 100Mbps downstream with no other traffic.   The only way an auto feature will be useful here is if the client can seamlessly change based on the stream itself.   So if user 1 is at 10mbps user two comes on at say 3mbps, user ones bitrate will seamlessly downgrade to 7mbps on the fly, otherwise the auto function only serves a purpose for cell phones, in home clients, and emby setups with unlimited internet bandwidth and that sure sounds like a minority of total emby clients.  As always thanks for the input @@ebr, its always good to have input from you, luke and everyone else.

Link to comment
Share on other sites

Yes, but choosing any default other than auto will require us to choose something conservative which will then undoubtedly cause transcoding that is unnecessary and, well, then you know what happens... ;).

 

On my production server, the auto setting is rarely a problem but, my dev box does struggle with it.  That is because most of the time I run in the dev environment, my machine is compiling and delivering a package to the device at the same time the bitrate test is happening which then causes an abnormally low reading on it.

 

If there are processes running on your machine (includeing ffmpeg I would guess) that are taxing the CPU in bursts most of the time I can see how this could also be a problem with the auto setting for you.  At this point, the best plan of action is for you to set your clients to the fixed setting that makes the most sense for them.

Link to comment
Share on other sites

pir8radio

Yes, but choosing any default other than auto will require us to choose something conservative which will then undoubtedly cause transcoding that is unnecessary and, well, then you know what happens... ;).

 

On my production server, the auto setting is rarely a problem but, my dev box does struggle with it.  That is because most of the time I run in the dev environment, my machine is compiling and delivering a package to the device at the same time the bitrate test is happening which then causes an abnormally low reading on it.

 

If there are processes running on your machine (includeing ffmpeg I would guess) that are taxing the CPU in bursts most of the time I can see how this could also be a problem with the auto setting for you.  At this point, the best plan of action is for you to set your clients to the fixed setting that makes the most sense for them.

 

 

True...  I forget most people do not like transcoding... Most of my movies that I rip now-a-days are remuxes so they have very high bitrate, I seldom see internet clients not transcoding.       

 

As for my CPU bursts, trust me I have looked and looked for a reason this could be caused by me... but i manage my bandwidth and cpu (ffmpeg) usage pretty well... Seldom seeing peaks above 70% CPU.   SOOOooo I shall do as you say... Teach my mother how to set this manually  :lol:  wish me luck......

 

58cd463cc4cb8_chart.png

Link to comment
Share on other sites

Luckily, it should be a one-time event :D.

 

We are always looking to improve things so hopefully this will too.

Link to comment
Share on other sites

legallink

As an FYI, I've also seen this and I have to set the users to 10mbps so that it doesn't transcode as lower than that or auto content will transcode for a reason I can't divine, as there is clearly enough bandwidth.

  • Like 1
Link to comment
Share on other sites

rbjtech

Its useless to do so..  Say your max internet bandwidth is 10mbps  user #1 logs on and starts a stream auto bandwidth sets him to 10mbps this one user is consuming your entire bandwidth now while he happily watches a movie...  user 2 logs on what is auto bandwidth going to set him at? even the lowest setting will screw with user 1's stream.   Now say three users come after user 1 what happens?   It doesn't go back and knock down user 1 so other users can stream (I don't want that anyway).   

 

The auto function is only useful if the server has unlimited bandwidth in my opinion..  it will auto set the client to have the best experience with no user input, basically matching the stream rate to the clients available bandwidth.   If the server has limited bandwidth there is no easy way to set auto bandwidth and this option is kind of useless... as a server admin you have to set this manually...  say i have 10mbps upstream internet, I know i never have more than three users streaming at one time, I would set the server bandwidth limit to 3mbps   so when user 1 logs on he gets 3mbps, then user two and three come one they still each get 3mbps..       I kind of have unlimited internet bandwidth in my setup so the auto function would be useful to me however it doesn't work.   

 

I think we are agreeing ;)

 

Services such as BBC Iplayer (here in the UK) and Amazon Prime must also do some form of bandwidth analysis - as even though I have 230 Mbit down, I still see 'low quality' for the first 2 or maybe 3 seconds while I assume the app is testing my bandwidth. Maybe starting low and ramping up is the way to go ..

 

An interesting topic. :)

  • Like 1
Link to comment
Share on other sites

legallink

But

 

I think we are agreeing ;)

 

Services such as BBC Iplayer (here in the UK) and Amazon Prime must also do some form of bandwidth analysis - as even though I have 230 Mbit down, I still see 'low quality' for the first 2 or maybe 3 seconds while I assume the app is testing my bandwidth. Maybe starting low and ramping up is the way to go ..

 

An interesting topic. :)

But isn't this the point of max streaming limit?  I think that is a key component here.  If you set the max streaming component, then there shouldn't be an issue of 1 user using all the bandwidth, because as the server admin you should have done that analysis before the request for playback from the user came in.

Link to comment
Share on other sites

rbjtech

But

 

But isn't this the point of max streaming limit?  I think that is a key component here.  If you set the max streaming component, then there shouldn't be an issue of 1 user using all the bandwidth, because as the server admin you should have done that analysis before the request for playback from the user came in.

 

Sure, and I did, but the question on how bandwidth is shared once more users 'join' after a bandwidth negotiation has previously happened is to me unclear.  I *think* all users get an equal share if there is not enough to satisfy the requirement, even if that means downgrading the previous users.  Infact I'm going to test this and I'll report my findings ..

Link to comment
Share on other sites

pir8radio

But

 

But isn't this the point of max streaming limit?  I think that is a key component here.  If you set the max streaming component, then there shouldn't be an issue of 1 user using all the bandwidth, because as the server admin you should have done that analysis before the request for playback from the user came in.

 

Yea but the issue is my server is hosted off site, so if i set the bandwidth limit to say 5mbps then I try to watch a full HD remux at 40mbps on my home emby theater, I cant..   This is where the other post topic out there "per user bandwidth setting" would fix a lot of issues...  I can set most of my users to MAX 10mbps and set my home theater user to not have a max limit.    But like ebr said, constant improvements...    Hopefully the team gets something out of this topic.

 

 

Sure, and I did, but the question on how bandwidth is shared once more users 'join' after a bandwidth negotiation has previously happened is to me unclear.  I *think* all users get an equal share if there is not enough to satisfy the requirement, even if that means downgrading the previous users.  Infact I'm going to test this and I'll report my findings ..

It does not downgrade..  its a one time test then stream start...

Edited by pir8radio
  • Like 1
Link to comment
Share on other sites

rbjtech

It does not downgrade..  its a one time test then stream start...

 

ok - so just tested this on two 4G phones using packet data to get external connection.

 

Set server to 1 Mb/sec limit.

 

1st stream - as expected 1Mbit/sec transcode

then 2nd stream added - and not as expected, 1Mbit/sec transcode same as the first.  Interestingly, the 2nd stream was very low quality for maybe 10 seconds, then sorted itself out - this could have just been the 4G, not sure.

 

.. so 2Mbit/sec in total (UTM confirmed this) - so this setting is per stream, not max as I though it was !

 

So pir8radio it appears you are spot on, it will keep adding streams in the 'max' increment until you run out .. ;)

Link to comment
Share on other sites

.. so 2Mbit/sec in total (UTM confirmed this) - so this setting is per stream, not max as I though it was !

 

Correct and there is a long discussion about this but the short of it is that doing it the other way would require every single app to support some sort of on-the-fly bitrate adjustment during playback.

 

That isn't really practical when some of the apps could be direct playing your content and Emby isn't even in the equation.

 

Also, do you really want your home theater to be knocked down to a low bitrate transcode because another person started watching something on their phone?

 

The best course of action here is for the server admin to manage this based on their knowledge of the devices in use and that is what the system we have now allows you to do.  I'm sure it can be improved in some ways but the way it is now puts the power in the hands of the admin and doesn't make any arbitrary decisions about existing streams.

Link to comment
Share on other sites

Guest asrequested

I've had this happen in my own network, so it's not exclusively to do with internet. I have a very robust network with very low latency and high bandwidth. So the game is afoot (I just felt like saying that). Having said that, it hasn't happened for a bit.

Link to comment
Share on other sites

  • 1 month later...
Jdiesel

Just wanted to report that the auto quality setting has been working a lot better for me lately. Streams are now direct playing like they should be.

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