When dealing with more than 10s or 100s concurrent viewers the required bandwidth on your server will be high and putting a CDN in front may be required.
[0]: https://github.com/Dash-Industry-Forum/dash.js [1]: https://github.com/video-dev/hls.js
Let's be more concrete. How many people will you lose today from your audience if you just offer 720p? Hard numbers please!
I was referring to (small and medium sized) personal blogs and websites (like the one in this post), i.e. not a digital commodity on a market. If you're out there to make money I realize you have to be more fancy with what you put out there.
If you want a good video streaming experience for all your viewers, you need something called Adaptive Bitrate (ABR). Some protocols that you may have heard of the implement ABR include HTTP Live Streaming (HLS) and MPEG Dynamic Adaptive streaming over HTTP (DASH).
ABR allows the stream to adapt to the bandwidth capabilities of the viewer. If you don't do this, some users will experience buffering, and some will have to sacrifice on quality.
Unfortunately most browsers don't support an ABR format natively, so you need to use Media Source Extensions, and a more complex player to support these protocols in a browser.
Obviously it's not going to be YouTube/Netflix-level anyhow.
So, by doing this, you make sure your content can reach more people. Which, to me, seems to be the whole point of making and putting it online in the first place
User choice and smart defaults would go a long way.
So if your income depends on people not rage-quitting your page, you'll have to provide something that satisfies their "needs", or more appropriately "desires".
Or you will just get a lower resolution and you can start watching in an instant.
Yeah that's a hard no.
Not everybody in this world has such a good internet connection. There are still enough people that would be happy to even have internet...
I'd still try HLS but this may be good enough for v1, depending on what you're building.
Around the 1:14 mark he goes into why you can't just use the html video tag. It was one of the best explanations I've heard around HLS and what it takes to stream video efficiently.
I have Plex (like a self hosted Netflix) on my home-server and some other people are also using it and on many different devices and connection speeds. It has to transcode the video on the fly and cache it depending on the client to have a good experience. You can't just serve 4k video to everyone.
With the HTML5 video tag it's not much more complicated than serving an an <img>. You still "need" two formats, I know that sucks (but av1 will hopefully become the solution). A small to medium sized blog can just upload the files to shared hosting (or even archive.org if space is sparse). No JS, no CDN needed.