ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
968 stars 380 forks source link

Adaptive bitrate streaming for on-site videos #10026

Open FazlyMR opened 1 year ago

FazlyMR commented 1 year ago

Videos from sites such as YouTube are provided in multiple resolutions to be able to adapt to a user's internet connection and are only a small part of it are buffered at any one time instead of loading a video in it's entirety immediately, but videos provided internally on-site (mainly those from assets.ppy.sh) are only provided as a single, usually high resolution and bitrate, video regardless of a user's internet connection.

So would it be a good idea for the osu! site to have it's own video player instead of relying on a browser's built-in player, that could allow for adaptive bitrate streaming by providing a video in multiple resolutions each with an appropriate bitrate (not too high where it's wasteful but not too low that it looks bad for a given resolution)?

In addition, by having it's own video player, it could be customized to better fit with the site's theme.

nanaya commented 1 year ago

FWIW browsers don't download video in entirety by default. Not even when actually playing it back - it'll only download enough for buffering.