3 ms·
> Because if hosting videos were easy, YouTube wouldn’t be the only game in town. Is self-hosting video still difficult, today in 2025? My intuition is that t
by simonw 1y ago
> Because if hosting videos were easy, YouTube wouldn’t be the only game in town.
Is self-hosting video still difficult, today in 2025?
My intuition is that there are less formats to worry about today, and serving video from static hosting that supports HTTP range headers may be enough for most devices to work.
What are the remaining hard problems? Maybe mechanisms to negotiate lower resolution for slower connections?
UPDATE: Looks like this offers some answers to my questions: https://help.micro.blog/t/micro-blog-studio/4081 https://help.micro.blog/t/micro-blog-studio/4081
The hardest bit appears to be HLS - HTTP Live Streaming - the thing where a video gets divided up into lots of little .ts segment files and served via a m3u8 playlist.
- skydhash 1y agoI believe the bit where HLS is needed is when you want to change the format or the resolution on the fly. But browsers and othe players are perfectly capable of buffering and seeking single video files. For most media, 1080p is fine enough. Add 720p and you have enough for 99% of the world.
- jshen 1y agoThe other issue is that it's expensive. You can put a video on youtube for free and they carry the cost and cover it with advertising. If you self-host and your videos get a LOT of traffic it gets expensive quickly.
- skydhash 1y agoLOT of traffic is a big if. A lot of videos only have 1k+ views and I will believe those are mostly drive-by viewing. Using a CDN can help you if you go viral.
- simonw 1y agoCloudflare egress is (somehow) free.
- chrismorgan 1y agoI feel people are often unreasonably scared by this sort of thing, so here are some numbers to give perspective and aid in decision-making. Bunny CDN charge $5/TB for their volume network, which should be pretty good for video distribution, reducing after 500TB/month. At a bitrate of 5Mbps (respectable for 1080p, significant overkill for more static types of content, as technical stuff will tend to be), 1TB is 444 hours. If, like OP, you publish 90-second videos, that’s 17,777 complete watches per terabyte. Depending on your situation, that might sound like not much or like a lot. Put the other way round, at 5Mbps and $5/TB, each watch-hour costs $0.01125, a bit over one cent, and it takes 3,555 people watching your 90 second video to cost one cent. For the sort of scale that most people are dealing with, it’s simply not an issue. I don’t know if bots upset this balance. They may. If you actually are spending more than a terabyte per month on it, then for technical audiences at least, I suspect that if you invited donations to specifically cover hosting costs (something along the lines of “I host these videos myself because ads and relying on YouTube are both bad for society; if you feel inclined, you can donate to help cover the cost, currently about $X/month”) you’d very quickly get a surplus. Or for longer-form content, charge something for 4K video (which costs 4.5¢ per watch-hour at 20Mbps and $5/TB) and let that subsidise the free 1080p (costing 1.125¢ per watch-hour) stream. (On the $5/TB figure: my $5/month Vultr VPS includes 1TB per month, and charges $10/TB after that. Some VPS providers include a lot more; a Hetzner €3.49/month VPS in Europe includes 20TB then charges €1/TB. But remember, if you host video from one point only, that it is unlikely to work well for people halfway round the planet. See another of my comments in this thread for description.) As for storage: each 90-second 5Mbps video is 56.25MB, and at a rate of $0.01/GB/month, each one will cost you $0.00675 per year to keep. Were you to post one 90-second video every single day and keep them all online, your monthly bill would grow by about $0.20 each year.
- jshen 1y agoYou're showing it's expensive to get a lot of views on a video, or as you say, it's not expensive if you get a small amount of views. I want the fediverse and open web to be viable, and we need a solution to hosting high view count videos.
- djhn 1y agoAnother way to estimate upper/lower bounds for hosting videos is by considering the grey market adult video industry. It seems like there are hundreds, if not thousands of websites providing access to video, and from a unit economics perspective I remember reading those advertising CPMs are on the order of $0.01-$0.05 even for the biggest and least illegal websites like the Mindgeek properties. So I would assume the more shadowy websites operate at a budget of less than $0.01 per thousand views in revenue. I’m assuming their CDNs are just specialised low cost hosting providers as opposed to p2p IoT botnets, but you never know. I wish someone had the time and motivation to do an investigatory technical deep dive into the infrastructure they use.
- chrismorgan 1y agoUnfortunately, proximity can be important. I grew up in Australia, and more recently moved to India. Both are well away from the USA, where we who visit find the internet to be bafflingly fast just because of low latency (since most developers aren’t at all careful about avoiding request waterfalls, so even ignoring restricted bandwidth, 200ms of added latency makes the page load take several seconds longer). Australia wasn’t great for playing high-bitrate videos hosted in the USA. With a high-quality 4G broadband link (rural western Victoria, clear line of sight to the tower 400m away that might host under 300 subscribers; at least 55/25Mbps via cheap phones when I measured it eight years ago), somehow you couldn’t actually download them at more than a few megabits per second at best. I think this is mostly latency effects, even though TCP is supposed to speed up. India is terrible for playing high-bitrate videos hosted in the USA. A 100Mbps fibre connection can be completely undermined by what I imagine to be terrible peering arrangements on all broadband ISPs I’ve interacted with (Hireach, Airtel, Vybe), and files hosted in the US may trickle across at half a megabit per second or even less. Right now I can copy a file from my VPS in Australia at 1.6Mbps. And so CDNs are, very sadly, rather valuable.
- skydhash 1y agoThat’s solved by CDN.
- hamdingers 1y agoSo it remains an unsolved problem for self-hosting.
- embedding-shape 1y agoDepends on what exactly you mean with "self-hosting". As in you can run your own dedicated servers across the world, with one or more providers, and run all the software yourself, have your own CDN. Varnish works great for that. If you're limited to "self-hosting as in hosted in my home" then yeah it gets harder. Maybe P2P/P2P-like thing could help if you're dealing with public content, like PeerTube?
- 1y ago
- bradgessler 1y agoI just setup private video for https://beautifulruby.com https://beautifulruby.com and can confirm the trickiest part is setting up and hosting HLS. I extracted a RubyGem at https://github.com/beautifulruby/hls https://github.com/beautifulruby/hls that I use to point at a folder full of videos, then my scripts converts them into HLS and uploads them to a private Tigris S3 bucket. I then have to rewrite playlists from the server with pre-signed S3 URLs. It’s not that it’s difficult per se, but it does require a meticulous attention to detail to put all the pieces together.
- deleted 1y ago[deleted]
- RobotToaster 1y agoWhy would you do this instead of just using html video tags?
- simonw 1y agoThe video tag needs something to link to, so you still have to solve the hosting problem somehow. The weird m3u8 trick gets you better streaming and seeking performance, plus different video quality depending on the device and network connection.