Then, when a user wants to watch a video, they could use HTTP range requests to download just the data they want to view from the megafile, in the format they need. If, midway through watching, their internet gets a bit slow, the browser could auto-switch to a different lower-res format. The megafile would have the necessary indexes etc to know which timestamps of which audio and video feeds are at which byte locations, and where keyframes are for easy switching.
Things like youtube have proprietary code to do this. But the opensource world doesn't have much comparable - at least nothing widely deployed to be able to just send a video to a friend, and know that whatever device and internet connection they have, they'll have a good experience.
You are going up against a probably 1000s strong team of equally techy people whose job it is to do what you are trying to cobble together. Unless there is a niche use case that you are trying to workaround, it is hard to solve a mainstream problem that isn't solved better by one of the Big Corps.
It would probably end up a mess like Wordpress plug-ins. But Wordpress works and it easyish for non technical people to set up..
This struck me... Us techy people should be able to use our knowledge to get more out of our tech setups.
But lately I've felt that opensource tooling has been falling behind. My mum can post a video to YouTube for everyone to see in seconds, but if I try to do the same with opensource tools, I will probably still be battling a bad transcode from ffmpeg that glitches on some family members phones and doesn't have sound for other viewers...