18 ms·
DIY Video Hosting
- LeoPanthera 6y agoIf your videos are less than 512MB each, you can serve them through Cloudflare's free plan.
- tmikaeld 6y agoNo, that's against their ToS.
- bhhaskin 6y agoCan you still say that you are hosting the content yourself if the content is still on a 3rd party CDN? I guess that is just semantics. Great article none the less!
- celsoazevedo 6y ago> [...] I still store my large app downloads and videos on S3 and then have Bunny (and previously MaxCDN) pull from AWS as an origin server. [...] He hosts the videos on S3, the CDN fetches the files from S3 and caches it. He's using the CDN for the cheap traffic/more pops. This would work without S3 and without a CDN too.
- throwawaysea 6y agoThe issue is that a CDN is still involved - and they, like YouTube and others, can ultimately choose to deplatform you. LBRY (decentralized video sharing) might be a better alternative, perhaps? https://itsfoss.com/lbry/ https://itsfoss.com/lbry/
- robjan 6y agoI don't think they need a Blockchain solution to serve a few, likely uncontroversial, marketing video files.
- ethanwillis 6y agoUncontroversial content gets taken down all the time because, as Googlers who show up in those threads like to say, moderation is not webscale.
- bigiain 6y agoSure. "All the time" across Youtube's userbase of people who can make enough social media noise that we hear about it (so probably an order of magnitude more often than all the cases we hear about, but still very rarely for any one individual business or person. If a client or project's content is mainly intended to be viewed and/or discoverable via the project website, I'm happy enough to have a plan along the lines of "We'll publish/host the video on Youtube (under an account that's exclusively for it and definitely not in any way linkable to any important Adworfds, gSuite, or Android dev accounts), and if the shit hits that fan there and they shut it down, we'll make sure we can reupload the videos to Vimeo or DACast or S3/Cloudfront or wherever, and just flip the video.example.com CNAME to match." If you're relying on Youtube/Vimeo/Instagram/whatever for _discovery_, then you've got a totally different problem. (And, as far as I can tell, one without any good mitigation strategy. If you build all your brandvalue in a youTube channel, you're totally at the mercy of shitty cotent monitoring algorithms, automated copyright or DMCA takedowns, and 4Chan brigade attacks...)
- robjan 6y agoThis is about a CDN though, not Google.
- ethanwillis 6y agoYoutube is owned by Google. The parent comment to you was talking about using decentralized solutions to avoid takedowns on CDNs and platforms like Youtube.. which they explicitly mentioned.
- yingw787 6y agoCDNs are the best thing since sliced bread. Found this out both from ease of setting up frontends and the pain of setting up backends. I wonder if there's a way to build a database on top of a CDN, or a webapp backend (might just be something like serverless, but instead of function definitions you have files+config a CDN automatically knows how to run). Something like Plan9 for the web.
- mrmonkeyman 6y agoFiles+config=functions=code, just in a weird, inconvenient format.
- vhiremath4 6y agoRelevant to post: I would highly suggest keeping the same CDN as the cloud/storage offering you work within. You get dinged quite a bit on transfer costs otherwise. So, if you're on AWS, stick to Cloudfront, etc. Potentially relevant to post: Note: I am the founder of Loom, so this is obviously extremely biased. With Loom (https://www.loom.com https://www.loom.com) you will soon be able to upload unlimited videos (as well as record since we have recorders) to a plan for $10/month. No caps on viewing or storage.
- tfe 6y agoI’d like to point out that this still has deficiencies compared to Vimeo or YouTube, who transcode the source file into multiple bitrates and adaptively serve an appropriate quality based on the viewer’s available bandwidth and screen size. This manifests as buffering on slower connections, where YouTube or Vimeo would just downgrade the user to a lower bitrate transparently (or nearly transparently). An end user today will expect that behavior and have very little tolerance for buffering if their connection is unable to smoothly play the one bitrate the creator published (no matter how fast the CDN is). Edit: I’m aware that it’s possible to do adaptive bitrate streaming outside of using Vimeo or YouTube (as several commenters have explained below) however this isn’t what TFA describes and I think it’s important to note this deficiency in the author’s described approach to serving their own video.
- gingerlime 6y agoWould cloudflare stream solve this problem though?
- tfe 6y agoLooks like it would!
- kvz 6y agoAdaptive delivery could easily be added by converting the files with a video encoding service. Transloadit’s community plan is free and should have enough traffic included for these use cases. Full disclose: I’m a transloadit founder
- 0xbkt 6y agoI hope you can enable doing the vice versa some day. I mean HLS/DASH to single file containers like MP4. It seems that you can't pull segments from remote URLs in M3U file for the time being.
- kvz 6y agoConvert HLS/Dash to a single file, what's the use case? Most of the times you'd still have the original after creating segments from it you'd think?
- gingerlime 6y agoWe were on the Vimeo business plan, which was supposedly unlimited. Until you hit a certain threshold... we run a fairly popular education site with lots of videos and reached that cap. Our bills went up 10x or so. For our business I guess it’s still worth paying, but worth being aware that not all unlimited is really so.
- lalo2302 6y agoYou can checkout mux.com. Idk about if the pricing would be cheaper or expensive. But a regular develop should be able to integrate them fair easily.
- nickjj 6y agoOne nice feature of Vimeo is you can prevent a video from being accessible (streamed, embedded, etc.) on anything but a list of domains of your choosing. Mux doesn't have this feature (yet). The best you could do is sign every video and have it expire after X time. This can get quite complicated and is less secure since it's only restricted by time (IP address isn't an option either), but due to the nature of how it works, you need to make the video accessible for a bit longer than the duration of it. If Mux were to add domain restricted security features, I think I would switch to them because having the option of using a custom player is nice for niche content.
- gingerlime 6y agoMux and cloudflare stream are on my list of potential alternatives. We do use this domain restriction of Vimeo. It’s not fullproof but definitely stops casual downloads.
- nickjj 6y agoWhat can you do to bypass their domain restrictions, besides things like recording your screen during playback and distributing a separate video.
- dannyw 6y agoI use a $20/month VPS with unlimited, unmetered 10gbit bandwidth (no, I do not use outrageously priced "public clouds"). I have no troubles serving 4K video (with a 720p low-bitrate transcode) with a simple <video> tag, and I do not pay for bandwidth. This month, I've egressed 11TB for $20, and I could easily triple that at no additional cost. I can stream 4K without buffering fine and I've never had a user complain, so it works.
- red0point 6y agoMay I ask from which provider you are getting this VPS? 20USD for unlimited 10Gbit/s bandwidth sounds a bit too good to be true.
- deleted 6y ago[deleted]
- dannyw 6y agoI was able to get a custom 10gbit unmetered plan from Virmach a couple years ago. Definitely real, and I've been pulling double-digit-TB egress for months without issue. I see on their website you can upgrade to 10gbit metered for an extra $2/month but I don't know what they'd charge for the unmetered options now. There are lots and lots of providers if you are happy with 1gbit unmetered though: I'm a happy customer of BuyVM (starting from less than $2 a month!) and Scaleway (bandwidth depends on your plan). If you are happy to spend a bit more for your own dedicated box, OVH, Hertzner, Online.net are great options. All of them offer unmetered BW I believe.
- Blaine0002 6y agounfortunately after doing research into all of those, their terms of service allows them to charge more or cancel your account after what they consider to be 'excessive' bandwidth usage, so i wouldnt consider them truly unlimited or unmetered. It doesnt seem virmach offers unmetered anymore, but I may reach out to them
- 6y ago
- PetitPrince 6y agoMy usecase involves sharing private video with access control for my sports club. For that I use https://mux.com/ https://mux.com/ which take care of hosting, CDN and all the conversion shenanigans. On top of that I've build a Django app which uses video.js as a player.
- emmanueloga_ 6y agoPrices appear to be a bit steep, no? What's your experience? https://mux.com/pricing https://mux.com/pricing
- mkl 6y agoIt's comparable to Cloudflare Stream: https://www.cloudflare.com/products/cloudflare-stream/ https://www.cloudflare.com/products/cloudflare-stream/ Streaming is more, storage is less.
- PetitPrince 6y agoI have very few users, so it is still within my budget.
- speedgoose 6y agoI didn't know that HandBrake also supported command line. It's much easier to use than ffmpeg directly.
- ex3ndr 6y agoYou should try uploadcare.com they are ready to use solution for hosting images and videos.
- hellofunk 6y agoThis is interesting but I’d have to assume that the actual cost Vimeo is charging is not an important factor here. The developer time spent setting this up would quickly exceed the annual fee for Vimeo in just an afternoon. That excludes the ongoing maintenance and inevitable edge cases you would encounter over time. Still fun, but I don’t think Vimeo’s price justifies this effort alone.
- simongr3dal 6y agotime=money assumes you are taking time away from something else, if there is no other work to be done that generates money then spending some time to save a little money might be a valuable way to spend time. Most likely it's just to satisfy some sort of nerd-ocd.
- nkozyra 6y agoOpportunity cost definitely falls in the "something else" range. On the other hand, there is a ROI on building things either way. Always tough to measure
- varbhat 6y agoFirst of all,you can use HTML video element and host the video yourself. (This works in non-js browsers too. You can enhance it by video js scripts though for js enabled browsers.). I think that peertube will be another good option. You can self host it and there are also many available public instances of it. This is particularly useful if your userbase is very large because it uses Bittorrent(webtorrent) p2p to reduce load on servers and it increases availability of content if viewerbase is huge.
- INTPenis 6y agoI strongly believe in Peertube for media creators who want to take control back from Youtube. Regarding the seeding I was thinking that you could put a few dollars into seed boxes to bolster some older or rarely watched videos.
- anaganisk 6y agoAn avg video creator wants the money, not control. Its the reason why youtube is so hot right now. Avg user just doesn't care.
- INTPenis 6y agoWell you can't be average to run a good peertube instance. I was thinking more of people like Joe Rogan and Linus Tech Tips. People who've built a company around their content creation hobby and are capable of paying for ops and potentially seed boxes if needed. It wouldn't be hard to host, but you'd have to be confident in your service provider or consultant. Of course I doubt Linus would ever be censored by Youtube, he was just an example.
- amelius 6y agoOk, but this doesn't solve discoverability.
- Deukhoofd 6y agoProbably not an issue for the writer of the blog, as he's just using videos to embed in blog posts.
- ffritz 6y agoDoes anyone know if Cloudflare is cool with audio files? I know they don’t want you to serve video. Or any similar fast CDNs allowing for audio files.
- chmod775 6y agoI think they just don't want you to serve large stuff, because their CDN isn't optimized for that. I serve all kinds of files <10mb via CF, that includes audio, video, images etc. Files over >10mb I handle myself. Around 100TB is handled by CF each month and around 700TB by my own servers (4 Hetzner dedicated servers). The whole setup costs me around 300 euros/month paid to Hetzner, and 20 to CF. That means I pay around 40 cents / TB. So far CF hasn't complained, and I've been using them for years. Though they try to pitch me their higher priced plans now and then.
- salex89 6y agoI've never used Cloudflare, so I got to ask, do they prohibit serving large files or discourage by some quota?
- chmod775 6y agoI've only heard stories of people getting terminated over abusing their CDN like that, and I don't fancy being next.
- 0xbkt 6y agoThey suspend accounts (after months if not immediately) that abuse serving disproportionate amount of non-HTML content, videos specifically. However there is still ambiguity (or lack of detail) in their terms if you can use their Workers, a paid FaaS, to stream blob data.
- poxrud 6y agoI thought this only applies to their free accounts, and that they have no issues with serving any size files as long as you pay them.
- oceankid 6y ago+1 with author on BunnyCDN. Low latency, good value and great support! I'd pay them more if they handled adaptive bitrate automatically.
- Infiltrator 6y agoI couldn't agree more. BunnyCDN is founded and managed by some of the most passionate and caring people I've had the pleasure of interacting with. I would recommend BunnyCDN every time without hesitation.
- kristopolous 6y agoI've been thinking about a "meta cloud" stack - essentially something with the convenient interfaces of various common SAS but then backed up by a user configurable transport. So you could "migrate" existing apps to say, use some machine at a colo instead of a variety of s3 services without much effort and thus unshackle yourself from a vendor. Maybe you are making gobs of money and don't care, but a lot of people aren't and saving, say, a few hundred a year sounds very tempting. Not every competent person is rich
- Lammy 6y agoIt’s called OpenStack :) https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-assets-prod/openstack-map/openstack-map-v20191001.pdf https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619...
- kristopolous 6y agoWhat is all of this technical jargon? This is not the solution at all. If it's equally hard and an equivalent amount of effort than starting from scratch then it's completely a non solution. It's just another giant mountain to climb. I'm looking more into it. It looks very complex and sophisticated. It's also built on a cloud "marketplace" where you're still doing SAS, now just in a way more complicated way with some wonky exchange system like you're a municipal energy broker. Apparently they even sell multi-tier training sessions to understand all the jargon and complexities. There's no pretense that it takes anything less than months or years of study to use the thing No, this is not it at all. I'm talking about a worry free, drop in, simple replacement, an hour max. Set it, forget it, walk away. Not a multi year career path.
- Lammy 6y agoIt turns out infrastructure is hard. Who knew?
- kristopolous 6y ago
- t0mas88 6y agoIf the author is concerned about bandwidth costs, it sounds counterproductive to encode the videos as 60fps where 30 is plenty for everything but high speed action shots. Given that it sounds like he is doing demo videos / screencasts etc, it there is a lot to gain here in just getting the encoding settings right.
- abdusco 6y agoCompression rate would be quite high for a mostly static video where nothing much changes from frame to frame, regardless of framerate.
- deanclatworthy 6y agoI don't get it. You can unlist your video on youtube, disable the comments, disable related videos etc. and that solves every problem the author talks about. You can even disable monetisation so a user will never see an ad. You can also go one step further and deliver youtube video through an entirely custom player: https://github.com/videojs/videojs-youtube https://github.com/videojs/videojs-youtube
- PinguTS 6y agoThat was the first thing that came to my mind too. For some people there are maybe many different reasons no to go with Google. But the reasons the author put up, are no reason to go with Youtube. It is the cheapest way to host video and then to embed it into your site.
- alecco 6y agoUntil they randomly take down your video at the worst time for copyright or some other account problem.
- deanclatworthy 6y agoYou could say that about any hosting platform you pay for too. The majority will comply with copyright infringement cases.
- lixtra 6y agoYou can pick a for pay platform that has a customer service that helps you to resolve such issues quickly.
- wongarsu 6y agoMost platforms don't actively give rightsholders tools to find offending content, nor do they give "rightsholders" financial incentive to claim content (with no repercussions if they claim more than they own).
- nix23 6y ago
- alecco 6y agoImagine if HTTP was truly distributed and servers from different organizations could pool their bandwidth to serve static content. Similar to Bit Torrent.
- deleted 6y ago[deleted]
- unicornporn 6y agoWhy are people overcomplicating web video so much? 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.
- GeneticGenesis 6y agoGreat question, it's actually not quite that simple. HTML5 was indeed supposed to bring trivial video to the browser, and it almost did. 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.
- pas 6y agoWhat's wrong with buffering? Just let the client download it in full, provide a progress bar, and then allow it to watch/enjoy. Obviously it's not going to be YouTube/Netflix-level anyhow.
- black_puppydog 6y agoWell, people do expect YT/NF level. And sadly we've trained everyone to expect that everything starts playing instantly. 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".
- pas 6y agoI'm not saying people shouldn't do more for user experience, but the cost-benefit seems to be bimodal. Do the minimum, or pay YT/NF/Vimeo (or CF or AWS Streaming, or get ready to bankroll your own).
- the-dude 6y agoTo everybody claiming a <video> should be enough for everybody : are you really sure? Because I distinctly remember random iOS devices would not play certain files or fail to sync. This is why you use YT or Vimeo and the like.
- celsoazevedo 6y agoIt won't work on all devices, but a h264 video encoded with the baseline profile should play fine on any phone or tablet sold in the past 5 years (maybe even older). On desktop, assuming the browser supports HTML5, it should be fine too. Just to be sure, offer at least one version of the video with VP8 just to cover weird cases where h264 isn't supported. You can also encode 480p, 720p, and 1080p versions for users on slow connections. Now, will it load on the original iPhone or IE 6? Maybe not - they'll see a link to the video file instead of a player - but not everyone needs to support legacy devices and browsers. YouTube, Vimeo, and other similar services are nice because they handle everything for you, but sometimes they become too expensive or are blocked. Depending on the type of user you have, <video> with a h264 video is cheaper and works well enough.
- jahewson 6y agoUnfortunately Chromium on Linux (and for those who have desktop apps - Electron on all platforms) doesn’t support h264. Chrome does.
- celsoazevedo 6y agoMozilla recommends[0] WebM (VP8 and Opus) and MP4 (h264 and AAC) for good compatibility. That's why I suggested suggested having a VP8 version of the video for cases like this. I guess OGV could be used for even better support, but it doesn't compress as well. [0] https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs#Choosing_a_video_codec https://developer.mozilla.org/en-US/docs/Web/Media/Formats/V...
- unnouinceput 6y agoQuote:"So that's how I moved off Vimeo and started hosting my video content myself" No, no and no. You still don't host your video content yourself. You simply found another cheaper service and despite your claim this isn't some paid ad (quote: "This really isn't any sort of paid or sponsored content crap for Bunny."), it's exactly that.
- cxr 6y agoThat looks like a few too many "no"s in response to the quote. See http://blog.bellebcooper.com/leaving-microblog.html http://blog.bellebcooper.com/leaving-microblog.html for a good breakdown of two different viewpoints about how people think of ownership. Whether they're paying someone else for infrastructure is hardly remarkable. Almost no one is completely off the grid. (Do you have your own power substation?) The author controls his own namespace, so he can swap it out any time and do so seamlessly. Contrast to Vimeo or YouTube where you have no control at this level.
- lizardmancan 6y agodiy would be a 5 euro usb2 drive and a torrent
- celsoazevedo 6y agoHe seems to be using them as a CDN, not to host the video files. There's no reason for this not to work without a CDN (I do it on one of my sites, where a CDN isn't really needed). Regarding Bunny, it may be a paid ad, but they do have very cheap prices. CDNs starting at 0.005/GB with pops in NA, Europe, and Asia are hard to find.
- jedimastert 6y ago> "If you wish to make an apple pie from scratch, you must first invent the universe." - Carl Sagan At what point would you call it self-hosting? Keeping it on his own servers? Rolling his own CDN? Bare-metal in a server farm?
- jedimastert 6y ago(separate comment for separate discussion) > despite your claim this isn't some paid ad (quote: "This really isn't any sort of paid or sponsored content crap for Bunny."), it's exactly that. I don't understand this comment. Do you have some sort of proof that the CDN reached out to the author, or even knows he exists outside of a CMS? I've seen this sentimentality a lot, where people aren't allowed to talk about a service or a product positively without some sort of money being involved or sneaky guy-in-a-trenchcoat bs. I really don't understand it.
- homero 6y agoHave you tried cloudflare hosted video?
- nix23 6y agoOne project comes to my mind: https://github.com/Chocobozzz/PeerTube https://github.com/Chocobozzz/PeerTube it uses web-torrent so you safe allot of bandwidth.
- LockAndLol 6y agoI was fully expecting this to be a video about peertube too. Kind of surprised it wasn't.
- ekianjo 6y agoIt's not all rosy though, most instances strictly limit the amount you can upload, and also police the type of content. (I use peertube).
- vorpalhex 6y agoIf you're at the point of spinning up your own CDN and such, it doesn't seem like it'd be too rough to run your own peertube instance if you have enough of a fan base...
- chrismorgan 6y agoDoes anyone have a source for the claim that it saves a lot of bandwidth, actual figures? The only PeerTube videos I’ve ever looked at are saving absolutely nothing, because it’s only the original server seeding it. Admittedly they haven’t been hot-off-the-press videos that are getting a large number of views immediately, which is the main time when you may have more seeders, as I understand it.
- ficklepickle 6y agoYou are absolutely right about the lack of seeds. Webtorrent was just added to libtorrent, so hopefully it will be coming to standard torrent clients soon. I'm hoping this will lead to more seeders and wider adoption of webtorrent. There is also the problem of seeding from battery-powered mobile devices being impractical. Hopefully that can be worked around somehow.
- 6y ago
- k__ 6y agoHalf-OT: any good solutions for DIY audio streaming? While I bought radio streaming licences in the past, my streams always got shut down on platforms like YouTube.
- m01 6y agoicecast has been around for a long time, would that serve your needs?
- nuker 6y agoWhateverCDN will be same game as WhateverVPN, i'm afraid.
- walidhayyar 6y agoamazing
- pteraspidomorph 6y agoEvery time I access Vimeo, with no exceptions, I'm forced to solve a recaptcha v2, then expected to wait for longer than 30 seconds before being allowed in. Result: I don't use Vimeo. Any alternative is better. I don't have this problem with any other website (that I have noticed), including any video and streaming services.
- nickjj 6y agoDo you get this on sites that use Vimeo to embed videos? I'd be curious if you get a captcha here: https://laracasts.com/series/laravel-6-from-scratch/episodes/1 https://laracasts.com/series/laravel-6-from-scratch/episodes...
- celsoazevedo 6y agoNot OP, but yes, I do get a captcha: https://i.imgur.com/Paocsee.png https://i.imgur.com/Paocsee.png I'm using a VPN, maybe that's why. It's annoying as not only you need to fill the captcha, but it takes 30s to 1 minute for the video to load.
- Craighead 6y agoAnd if you're not on vpn do you get captcha?
- celsoazevedo 6y agoNo: https://news.ycombinator.com/item?id=23897807 https://news.ycombinator.com/item?id=23897807
- nickjj 6y agoAh, using a VPN seems like it would likely be the culprit for 30+ second load times. What happens if you don't use that VPN?
- celsoazevedo 6y ago
- torresjrjr 6y agoPeerTube is an easy solution to video hosting and comes with many features. https://JoinPeerTube.org https://JoinPeerTube.org
- talkingtab 6y agoThis is very helpful for anyone trying to understand how to avoid using YouTube or Vimeo. Many people find those choices fine, but many of us find them unacceptable for a variety of reasons. While the author's answer may not be perfect or precisely tailored to your situation, they cover all the bases IMHO. A must read. And several of the comments add to the discussion. [edit: ufind -> us find]
- huslage 6y agoThis is a nice write up, but don't forget that YouTube isn't just about hosting. It's about distribution. If you host your own videos, you are 100% relying on your own means of getting people to watch it. In the use-case that is state here, that's probably just what the author ordered. But not everyone has that luxury.
- surround 6y agoIf you’re willing to publish your video under a free license, you can upload it to the Internet Archive and embed it on your website. https://archive.org/help/video.php https://archive.org/help/video.php
- wortelefant 6y agoThe best homegrown platform I have seen so far is https://media.ccc.de/ https://media.ccc.de/ , where the video and audio files from Chaos Computer Club events are stored. I don't know how willing they are to share the code though.
- detaro 6y agoits on Github: https://github.com/voc/voctoweb https://github.com/voc/voctoweb
- calvinmorrison 6y agofor non commercial use I have used github to host my website for a long time, and I have had some instructional videos on there. For small purposes like this, or maybe how-tos on open source software, I can't see github having a problem with or noticing the bandwidth