The Bunny Stream player seems to always choose the highest possible bitrate. After letting the player stream a video for a while on auto quality (default), the player chooses 2160p even though the player’s actual resolution is much smaller. This even occurs when playing the video in portrait mode on an iPhone 15 Pro where the actual screen resolution is 2556 by 1179 pixels (i.e., 1440p should be enough even if the player adapted to the screen resolution and not the player’s resolution).
#Player doesn’t adapt to resolution
1 messages · Page 1 of 1 (latest)
I tried streaming on a Windows computer with exactly 1920x1080 resolution with the same result. The auto setting chose 2160p anyway. With Bunny Stream’s default encoding settings, this will consume five times the bandwidth (25,000 kbps instead of 5000 kbps).
If anyone can get resolution adapting bitrate to work, please let me know.
I wonder if anyone else is experiencing this problem. I'm working on integrating bunny myself, so I hope this get's solved!
Looking into the settings for hls.js, there is at least a setting for limiting the resolution. Ping @copper flume.
capLevelToPlayerSize
(default: false)
if set to true, the adaptive algorithm with limit levels usable in auto-quality by the HTML video element dimensions (width and height). If dimensions between multiple levels are equal, the cap is chosen as the level with the greatest bandwidth. In some devices, the video element dimensions will be multiplied by the device pixel ratio. Use ignoreDevicePixelRatio for a strict level limitation based on the size of the video element.
https://github.com/video-dev/hls.js/blob/master/docs/API.md#hlscapleveltoplayersize
https://github.com/video-dev/hls.js/blob/master/docs/API.md#capleveltoplayersize
I submitted a support ticket.
Bunny Stream just confirmed that this is intentional behavior, not a bug. They’ve configured the solution to only take the visitor’s bandwidth into consideration! This is something you should keep in mind if you upload 4K versions of your videos. Your videos can consume more than 5x the bandwidth that’s actually needed and cost you 5x as much (and waste your visitors cellular data if they are on a bandwidth capped cellular plan).
Player doesn’t adapt to resolution [not bug, intentional design]
Oh dear, thank you for the update
The developers of Presto Player (another Plyr based Player) have confirmed that they will enable resolution based adaptive streaming. Presto Player works pretty well with Bunny but lacks some features, e.g., AirPlay, MediaCage, timeline thumbnails, and chapters (shown as markers instead).
https://wordpress.org/support/topic/player-doesnt-adapt-to-resolution/#post-17999621
Presto Player just released version 3.0.6, fixing this issue. https://wordpress.org/plugins/presto-player/#developers
Please note that issue persists with Bunny Stream’s own player (both based on Plyr Player).
I'll take a look internally.
I don‘t see an issue with this except bandwidth costs. A downsampled 4k video still looks better than a native 1080p video. If you worry about the cost of 4k streaming, don‘t do it or bring your own player 🤷♂️
Or just ask Bunny to switch on resolution adapting streaming since their player already supports it? There’s no reason not to use it.
I've discussed it with engineers and have been testing it locally. We're discussing it some more to check for any potential issues and such before releasing it.
Thanks for the update!
@grizzled wagon Please note that I don’t want to take away the option for users to stream downscaled videos. I’m talking about situations where the cost doesn’t make any sense, neither for us or our viewers on bandwidth capped cellular plans. E.g., streaming in 2160p to a wide-screen video shown in portrait mode on a phone (where even 720p would have to be downscaled).
Got it, makes sense 🙂
Good to know. I was looking into migrating away from nuevo to bunny player but this is the second feature that the bunny player doesn't support.
Which is the other feature Bunny’s own player is missing?
Unconfirmed by staff, but apparently the view count only increases if you use the bunny player.
Interesting. I haven’t thought about that. Fortunately, going by @copper flume’s comment from earlier this month, it sounds likely that they’ll enable resolution adoption. The developers of another Plyr based player (Presto Player) have already enabled it.
Tracking views without our player is very hard to do, we could do it via the HLS playlist on CDN level but that would be unreliable. Hence why we do it on our player as it makes sense to do metrics that way. If you're using a custom player then metrics shoud be handled with plugins or your own code as you can just hook onto the events and send that data to your own server for processing.
We're still discussing this internally but i'll go ahead and see where we are at.
Player doesn’t adapt to resolution
Just checking in to to hear if you’ve reached any conclusions after your internal testings, @copper flume?
Let me check with the team again, I apologize for the delay.
No, problem. Thanks!
Did you hear back from the team?
I didn't get an update, I'll chase with them directly.
I got an answer through the support ticket system. They told me that, unfortunately, there’s still no ETA for when the fix will be released.
Still being discussed since there are some compatibility concerns as this can change behavior for users suddenly. Will suggest a few alternatives to get it unstuck.
Thank you very much.
Are you using our embedded iframe if I remember correctly?
Exactly. Your version of Plyr Player is so much better than Presto Player in almost all other ways than the support for dynamic bitrate.
(Dynamic bitrate depending on resolution.)
I am asking if changing the embed urls to use a query string is a workable solution for you or if should push for a toggle for all videos?
Absolutely. I don’t actually use hardcoded iframes. I wrote a custom WordPress plugin to create the iframes dynamically.
I see, would it be possible to inject query strings to the iframe?
Easy fix!
I'll see what I can push internally then.
Thank you so much!
Just a heads up, I got the team to implement something, will update you the moment it hits production.
Sounds amazing!
Just for my own planning, do you think it will hit production before the end of the year?
yeah it should, i'll chase and ask them them when.
Did you get an answer from your colleagues? 🙂
They said soon, sadly been chasing them here and there but didn't get back a clear answer. I can confirm it will be included though.
Hi, this has been deployed, please add levelCap=true as a query string to your videos.
Example: https://iframe.mediadelivery.net/embed/312653/eab6b046-4cb6-4656-8d28-4fac8bcccfd3?levelCap=true
What is levelCap=true? I must’ve missed a thread somewhere
We make use of HLS's capLevelToPlayerSize and enableDevicePixelRatio parameters which will cap the playlist resolution to what the video player dimensions are.
I had to check my calendar to see if it was Christmas already. Thank you so much!
No problem, I'm sorry about the wait. Let me know if you encounter any issues.
I shall update docs to include this as well.
Works great by the way.