Riddler84 54 Posted October 3, 2024 Posted October 3, 2024 Can someone explain how this auto-quality algorithm works from a technical perspective? I'm a bit confused. It seems like there's a hardcoded limit for web browsers when connecting remotely. No matter whether I use Chrome or Firefox, the quality doesn’t go above 7 Mbit/s. Even Emby Theater for Windows seems to have the same limitation. What puzzles me is that I can manually set the quality much higher without any issues. I’ve even tested this on my smartphone outside my home network, and it defaulted to just 64 Kbit/s, which is ridiculously low. I manually adjusted it to 20 Mbit/s, and it worked perfectly. So why does the algorithm miscalculate my connection so badly? Oddly enough, when I use the Android app on a Fire TV remotely, the quality reaches the global server limit without any issues. So why is it inconsistent across different devices?
Carlo 4560 Posted October 3, 2024 Posted October 3, 2024 Hi, This is something that needs to be adjusted for each client you use. Does that help, Carlo
Happy2Play 9780 Posted October 3, 2024 Posted October 3, 2024 Would need to see server and ffmpeg logs but the answer is yes Auto has a hard coded speed it will/can fall back to on remote connections. There are serveral topics on it and would appear auto falls backs for almost everyone. There are a few that have no issues with it. On average I believe most clients are coded to fallback to 1080p 4Mbps. But if you feel the coded value is to low it is recommended to manually set it to a higher value as there can never be a correct answer and Emby would prefer is just work instead of it works for some and not others at a higher value. Personally have all remote users set clients to max and throttle per the user profile.
ebr 16169 Posted October 3, 2024 Posted October 3, 2024 Hi. The Fire TV app does an actual bandwidth test to your server to determine the limit. It can do this because it can assume your connection will remain fairly stable since it is on a non-mobile device. The other apps have to make other assumptions and try to be safe to be sure that playback will be good. If you know your particular situation can handle more, you can set it manually - which is why we have those options. Does that make sense? 1
yocker 1247 Posted October 3, 2024 Posted October 3, 2024 36 minutes ago, ebr said: Hi. The Fire TV app does an actual bandwidth test to your server to determine the limit. It can do this because it can assume your connection will remain fairly stable since it is on a non-mobile device. The other apps have to make other assumptions and try to be safe to be sure that playback will be good. If you know your particular situation can handle more, you can set it manually - which is why we have those options. Does that make sense? Why does the Samsung, LG and Emby for Android TV not do these tests? I can't think of any Tizen or WebOS mobile devices and Emby for Android TV is clearly made for TVs. At least those clients defaults to 6 Mbps for me.
Riddler84 54 Posted October 3, 2024 Author Posted October 3, 2024 43 minutes ago, ebr said: Hi. The Fire TV app does an actual bandwidth test to your server to determine the limit. It can do this because it can assume your connection will remain fairly stable since it is on a non-mobile device. The other apps have to make other assumptions and try to be safe to be sure that playback will be good. If you know your particular situation can handle more, you can set it manually - which is why we have those options. Does that make sense? Are you saying the Fire TV app is the only app that is being able to do a connectivity or speed test? If that's the case, maybe it would be a good idea, showing some kind of notification in other clients, so people know, that the auto option did fall back on a hardcoded value, because it couldn't test the connection. And speaking of hardcoded values. In what world is 64 kbit/s on mobile devices anything that should even be considered as a viable option for a default bitrate? It's making everything unwatchable. But what about the web client? Why is there no connection check? There probably aren't a lot of people who are using a web browser to access Emby on their phone. They would use the app. And yes, I would just pick a higher quality, but there is one person with access to my server, who just don't do that. He watches everything with 6 or 7 mbit/s, because that's what the auto quality is setting for him, even though he could easily direct stream most of my media, without the need to transcode anything. Sometimes it even goes down to 2 or 3 mbit/s and he doesn't care, but it just annoys me. If I compare this to other streaming services, they handle this much better. So, I have no idea how hard it would be to program a better algorithm for this, but when I think about YouTube for example, they do these checks, and they do them regularly during the playback, so they can live adjust the quality up or down according to your current internet connection speed. So I won't compare you with YouTube, they obviously have much more resources, but I'd just wish you would improve this somehow. Changing from checking once, when a video starts, to regularly throughout the playback would be a good start in my opinion.
yocker 1247 Posted October 3, 2024 Posted October 3, 2024 4 minutes ago, Riddler84 said: And yes, I would just pick a higher quality, but there is one person with access to my server, who just don't do that. He watches everything with 6 or 7 mbit/s, because that's what the auto quality is setting for him, even though he could easily direct stream most of my media, without the need to transcode anything. Sometimes it even goes down to 2 or 3 mbit/s and he doesn't care, but it just annoys me. Same with all but one user for me. They all have new 4K DV/HDR TVs but stay at what auto is because "it's easiest, don't know any better,. must be whats best and/or what their connection can handle). My GPU is glowing red hot from all the transcoding that their setup could handle with ease. 8 minutes ago, Riddler84 said: If I compare this to other streaming services, they handle this much better. So, I have no idea how hard it would be to program a better algorithm for this, but when I think about YouTube for example, they do these checks, and they do them regularly during the playback, so they can live adjust the quality up or down according to your current internet connection speed. Youtubes auto detection can go %¤#% it self (Yes i hate it that much!), if i remove the plugin i have to keep it at 4K it will go from 4K and steadily down to the lowest quality possible in increments after a while. It's always been like that no matter the device i play on or the connection used. 1
Jdiesel 1431 Posted October 3, 2024 Posted October 3, 2024 I think calling it Auto is confusing and not representative of what a user expects it is. When I see auto I expect the maximum quality my internet can handle, not the lowest common denominator that will work for the average user without issue. Just show the quality the app defaults to rather than the ambiguous "Auto". If the app is going to default to 1080p 4Mbps just show that. If a user sees a low quality by default they are more inclined to increase it, but if they see auto they assume they are already getting the best quality. The mobile apps already have separate settings for Home Network and Internet quality. A streaming device or TV app shouldn't worry about internet connection quality and consistency. 1 4
Happy2Play 9780 Posted October 3, 2024 Posted October 3, 2024 (edited) 40 minutes ago, Riddler84 said: If I compare this to other streaming services, they handle this much better. Well I guess if you keep 10 plus copies of everything then you could potential have it also but Emby does not have any Adaptive anything. So once something starts playing it will not change any values. So 99% of the time it is going to do what will work for everyone, not just someone with a fast connection. Realistically mobile and remote connection will have bandwidth issue or should say most of the world does. Just like I know my mobile network can be less than a Mbps to 100+Mbps depending on the time of day and were I am. So in the end the only advice will be Auto will not be what you expect it to be or do and will need to be set at the user's discretion. Edited October 3, 2024 by Happy2Play
Jdiesel 1431 Posted October 3, 2024 Posted October 3, 2024 Perhaps Emby could show the actual speed Auto is in brackets for that app. For example Auto (4 Mbps -1080p). They would eliminate the confusion of why Auto isn't functioning as expected. Bonus would be to give server admins server side control to modify device quality settings.
rbjtech 5284 Posted October 3, 2024 Posted October 3, 2024 2 hours ago, ebr said: Hi. The Fire TV app does an actual bandwidth test to your server to determine the limit. It can do this because it can assume your connection will remain fairly stable since it is on a non-mobile device. The other apps have to make other assumptions and try to be safe to be sure that playback will be good. If you know your particular situation can handle more, you can set it manually - which is why we have those options. Does that make sense? QQ - Does the replacement Android app do this when in TV Mode ?
ebr 16169 Posted October 3, 2024 Posted October 3, 2024 1 hour ago, yocker said: Emby for Android TV not do these tests? Emby for Android TV behaves the exact same way as the Fire TV app. 1 hour ago, Riddler84 said: If I compare this to other streaming services, We are not a streaming service. 1
yocker 1247 Posted October 3, 2024 Posted October 3, 2024 12 minutes ago, ebr said: Emby for Android TV behaves the exact same way as the Fire TV app. Cool! I could have sworn that it went to 4-6Mbps with auto but glad i'm was wrong. Guess i should change Emby version on my dads old Android satellite box then. He always changes it to auto even when i set it juuuuuust right and tell him not to. 1 1
Gilgamesh_48 1240 Posted October 3, 2024 Posted October 3, 2024 43 minutes ago, yocker said: Cool! I could have sworn that it went to 4-6Mbps with auto but glad i'm was wrong. Guess i should change Emby version on my dads old Android satellite box then. He always changes it to auto even when i set it juuuuuust right and tell him not to. Parents just don't listen when the kids talk, even if the kids are correct. It is somehow in the genetic coding for humans at this stage of development. The cycle goes like this: When the kids are under 12 the parents know everything and the kids know nothing but are usually trying to learn. Between 12 and 18-20 the kids just can't hear the parents so the communication is minimal. and the parents get stupid. As the kids get older after that the parents begin to get smarter but they also develop partial deafness when their kids talk. At some point the parents finally acknowledge that the kids just might be smart but by then it is often the case that communication becomes increasingly difficult due to the the problems of interspecies communication. My parents, many years ago, asked me to upgrade their home entertainment system including TV and I did and I made a detailed set of instructions of how to use the system and even get it reset back to the start if needed. But they never used many of the features and they continued, until they passed, to watch exactly three channels and had to call me to play a tape. When I was cleaning out their house I found the instructions I gave them in a drawer under a bunch of magazines. it looked like the never used those instructions after the first few days. Also I never entered their home and saw the clock on the VCR showing anything other than a flashing 12:00. 2
Riddler84 54 Posted October 3, 2024 Author Posted October 3, 2024 1 hour ago, ebr said: We are not a streaming service. I know that. But Emby streams media from a server to a client, so from the technical side it's not much of a difference. That's what I was referring to. Thought that was clear from the context. But is that all you have to say about that? 1 hour ago, Happy2Play said: Well I guess if you keep 10 plus copies of everything then you could potential have it also but Emby does not have any Adaptive anything. So once something starts playing it will not change any values. So 99% of the time it is going to do what will work for everyone, not just someone with a fast connection. I can change the quality manually while the video is playing with only a small pause. So why can't this be automatic? I know it's probably not that easy, and you can't just switch qualities on-the-fly, because it starts a new transcoding process everytime. But maybe it would be a good start to actually do a connection speed test, at least when you first start the video and then go a little lower in quality for safety. Before today, I thought this was already the case, but turns out, it isn't. It shouldn't be called auto, when there is no actual mechanism behind it in most cases. There should be at least some notification, that the current auto quality setting is probably far below the capacity of one's internet connection and that it should be checked manually.
Carlo 4560 Posted October 3, 2024 Posted October 3, 2024 1 hour ago, ebr said: We are not a streaming service. And by that we mean that we don't 10 to 12 versions of each movie/show carefully created that allows the client software to switch versions being used on the fly. I.E. if the playback buffer isn't able to be kept full, we need to switch to a lower bitrate version. And the opposite where the buffer is being kept full with time to spare so the client software can switch up to a higher bitrate version. Streaming service normally have all these files in HLS or DASH format (segmented streaming files) while Emby normally has one progressive media file can either be direct played or transcoded on the fly. It can't easily work the same way as the "typical" streaming service as the media isn't pre-created for streaming as previously mentioned. Emby can't easily switch transparently on the fly with bitrate changes as there is no "alternate" file that can be used to pull the next segment. So, the point is that Emby clients have to check the bandwidth available to the client Many users running Emby Servers don't have the luxury of having high-bandwidth internet available to upload with so the number of streams or available bandwidth on the server side comes into play as well. Emby has a lot more to deal with and handle overall. With that said, can the bandwidth algorithms used by Emby be improved? Maybe, and it something always being looked at. Carlo 1
yocker 1247 Posted October 3, 2024 Posted October 3, 2024 1 hour ago, Gilgamesh_48 said: Parents just don't listen when the kids talk, even if the kids are correct. It is somehow in the genetic coding for humans at this stage of development. The cycle goes like this: When the kids are under 12 the parents know everything and the kids know nothing but are usually trying to learn. Between 12 and 18-20 the kids just can't hear the parents so the communication is minimal. and the parents get stupid. As the kids get older after that the parents begin to get smarter but they also develop partial deafness when their kids talk. At some point the parents finally acknowledge that the kids just might be smart but by then it is often the case that communication becomes increasingly difficult due to the the problems of interspecies communication. My parents, many years ago, asked me to upgrade their home entertainment system including TV and I did and I made a detailed set of instructions of how to use the system and even get it reset back to the start if needed. But they never used many of the features and they continued, until they passed, to watch exactly three channels and had to call me to play a tape. When I was cleaning out their house I found the instructions I gave them in a drawer under a bunch of magazines. it looked like the never used those instructions after the first few days. Also I never entered their home and saw the clock on the VCR showing anything other than a flashing 12:00. Very good explanation and i know precisely what you are talking about. My mom tends to listen but my dad on the other hand always thinks he knows best, when things go wrong asks me to fix it and then blames me for it doing wrong in the first place. Every single note with instructions i make end up in a shredder, i swear some day i'm going to the nearby quarry and put that shredder under some of the heavy machinery. Kinda makes me happy i've chosen not to get kids for if/when i get to be like that!
Gilgamesh_48 1240 Posted October 3, 2024 Posted October 3, 2024 6 minutes ago, yocker said: Every single note with instructions i make end up in a shredder, i swear some day i'm going to the nearby quarry and put that shredder under some of the heavy machinery. You "could" use that quarry more constructively; You could cut out a few stone slabs and then carve your instructions into them, sort of like the commandments from a middle eastern mountain. 1
yocker 1247 Posted October 3, 2024 Posted October 3, 2024 58 minutes ago, Carlo said: And by that we mean that we don't 10 to 12 versions of each movie/show carefully created that allows the client software to switch versions being used on the fly. I.E. if the playback buffer isn't able to be kept full, we need to switch to a lower bitrate version. And the opposite where the buffer is being kept full with time to spare so the client software can switch up to a higher bitrate version. Streaming service normally have all these files in HLS or DASH format (segmented streaming files) while Emby normally has one progressive media file can either be direct played or transcoded on the fly. It can't easily work the same way as the "typical" streaming service as the media isn't pre-created for streaming as previously mentioned. Emby can't easily switch transparently on the fly with bitrate changes as there is no "alternate" file that can be used to pull the next segment. So, the point is that Emby clients have to check the bandwidth available to the client Many users running Emby Servers don't have the luxury of having high-bandwidth internet available to upload with so the number of streams or available bandwidth on the server side comes into play as well. Emby has a lot more to deal with and handle overall. With that said, can the bandwidth algorithms used by Emby be improved? Maybe, and it something always being looked at. Carlo There's most likely a good reason why it isn't made like this but... Maybe it could be made so Emby and it's clients would made so that when installing a client and starting it for the first time you would be asked if it was on a fixed or mobile connection. If on fixed it would then download a test file and note the speed for auto. Of cause with giving people the possibility to retry it later or just overwrite it. Two test file downloads would most likely be needed, one for the internet and one for what ever server connected to. On the server side make more use of the max bit rate per stream and max overall bit rate as to not overload the servers connection. As said, there's probably a reason for it not made like this but for me at least i think it would solve some problems.
C.S. 93 Posted October 4, 2024 Posted October 4, 2024 Seems like this has always been a problem, and the solution has always been to let servers force clients to whatever bitrates we choose. Perhaps in addition to the current server-side bitrate upper limits, we could set minimum bitrates. (Globally and individually)
rbjtech 5284 Posted October 4, 2024 Posted October 4, 2024 14 hours ago, rbjtech said: QQ - Does the replacement Android app do this when in TV Mode ? @ebr ? If not, then I'll add to this Thread as not having a reasonable mechanism on fixed devices to use available bandwidth is imo very wasteful on server resources. Thanks. 1 1
ebr 16169 Posted October 4, 2024 Posted October 4, 2024 18 hours ago, Riddler84 said: I know that. But Emby streams media from a server to a client, so from the technical side it's not much of a difference Actually, technically, it is very, very different. Kind of explained by Carlo but a streaming service is not transcoding content on the fly to different bitrates or formats and the server the content is coming from is owned and hosted by them, not you... You could create 10-12 different copies of every item you have at different bitrates and then our system will pick the one that most closely matches the current environment on each playback. It won't dynamically switch between them during playback because most people don't do this and so building that isn't of very high value for us right now. We would like to eventually get to an adaptive streaming solution but, in reality, it isn't needed all that much with our typical usage.
Jdiesel 1431 Posted October 4, 2024 Posted October 4, 2024 Just so it doesn't get lost in the discussion I want to make it clear that LARGE majority of us aren't asking for adaptive streaming or expect it from an app like Emby. We realize that it would require multiple versions of every media file or transcoding all the time. What we do want is improvements to the initial quality selection and/or more transparency around what "auto" does. 2 4 1
Carlo 4560 Posted October 4, 2024 Posted October 4, 2024 2 hours ago, Jdiesel said: Just so it doesn't get lost in the discussion I want to make it clear that LARGE majority of us aren't asking for adaptive streaming or expect it from an app like Emby. We realize that it would require multiple versions of every media file or transcoding all the time. What we do want is improvements to the initial quality selection and/or more transparency around what "auto" does. Hi, Keep in mind you can manually change that to a bunch of different resolution/bitrates to fine tune each device if needed. This works really well on "fixed bandwidth" device like you would normally have in your home using Ethernet. It's the dynamically changing bandwidth on devices that typically have an issue due to being on a cell network or using a WIFI AP that will have bandwidth fluctuations as you move around the house and the WIFI signal gets weaker and stronger. Carlo
rbjtech 5284 Posted October 4, 2024 Posted October 4, 2024 1 minute ago, Carlo said: Hi, Keep in mind you can manually change that to a bunch of different resolution/bitrates to fine tune each device if needed. This works really well on "fixed bandwidth" device like you would normally have in your home using Ethernet. It's the dynamically changing bandwidth on devices that typically have an issue due to being on a cell network or using a WIFI AP that will have bandwidth fluctuations as you move around the house and the WIFI signal gets weaker and stronger. Carlo A simple bandwidth test done just before playback simply works - AndroidTV/FireTV has done it for years - and 100% of my remote clients direct play on those devices. Using any other client, Samsung Client, LG Client etc they get transcoded when I know it should direct play with ease. I'm really not sure why Emby can't implement what AndroidTV does .. OR allow the Emby Admin to set a value in 'devices' to assist with the so called 'auto' calculation .. reducing it to 'something low quality but is likely to work' is really not an acceptable technical solution in 2024 imo. 4
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now