New to HLS.js and trying to make my streams as performant as possible! #7443
Replies: 3 comments
-
I wouldn't bother adding
If you do that, you need to limit how many active player or hls.js instances are allowed at once. Deferring calls to |
Beta Was this translation helpful? Give feedback.
-
Hey Rob, thanks for the reply.
I may be misremembering - I'm away from my set up right now - but I think I added this to optimistically "force" the stream to a certain quality, avoiding the pixelated start (because it's a hero video). I thought testing the bandwidth and startlevel -1 might let it change quickly if that optimistic guess was incorrect. Like I said, I'm new, so there's a good chance this is completely wrong and not how I should be doing things!
Interesting, thanks. I've an Basically I've videos further down the page, but more importantly I've 4 in a hero bento grid, and only want the first to play, with the others only playing when expanded. This sounds like the right option, but if you've got any more advice I'd greatly appreciate it! Thanks again, Nick
|
Beta Was this translation helpful? Give feedback.
-
You can also suspend segment loading (audio, video, and subtitle data) using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Sorry for the noob questions, but I'm just trying to get into HLS.js and just want to make sure I'm setting my streams up to be relatively performant.
Currently I've 1 hero video that's hosted on bunny.net, and in its original format is 238mb and 60 seconds long. I'm loading it like this:
Here are my (probably incorrect) reasons for the above:
testBandwidth - to adapt to either mobile or desktop
abrEwmaDefaultEstimate: 5000000 - maybe too high an initial guess for bandwidth?
startLevel: -1 - uses the initial estimate to automatically pick a stream quality
the buffer properties - seem a bit aggressive for this size video? i'm basing that on absolutely nothing XD
Also - for videos further down the page, what's the best way to defer loading/streaming? Should I get every video to load their first chunk and nothing else, and use something like ScrollTrigger (i'm using gsap anyway) to trigger it to start streaming the rest? (if that's even possible). Or should I be conditionally/lazily loading in the components (I'm using react)?
Like I said, sorry for the 20 noob questions, I'm just trying to build up a mental model of how this works :)
Thanks,
Nick
Beta Was this translation helpful? Give feedback.
All reactions