2

Ask HN: Anyone hosting their own videos?

 2 years ago
source link: https://news.ycombinator.com/item?id=32808126
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Ask HN: Anyone hosting their own videos?

Ask HN: Anyone hosting their own videos?
20 points by worldofmatthew 2 hours ago | hide | past | favorite | 32 comments
Hello,

I am preparing to soon upload all new video's I produce on to my own website instead of a platform.

I am asking if there is any one else who has done such a thing, so that I can look into subscribing to their RSS feeds and having things to watch that are not hosted on YouTube.

Hi, yes, I'm doing it on https://tube.jeena.net by using PeerTube. I've been hosting it on a NUC, first in my kitchen in Sweden, then at my parents house in Germany and now I'm in the process to move the NUC to my home office in South Korea. I'm bridging the time by having moved the whole installation to a server hosted by Hetzner, but it's too expensive in my opinion, and the NUC doesn't use so much power and is fast enough. I even made a video about my reasoning: Sustainable Private Cloud Server - Environment and Cost - https://tube.jeena.net/w/tYbrbqBMkexTwXTrjsN14a
Do you count using a cloud provider as hosting your own?

The most basic pipeline for doing it is going to look something like this:

1) Upload the original video to a storage bucket.

2) Have some compute service transcode the video file to create other renditions.

3) Store those renditions in a different storage bucket.

4) Put a CDN service in front of the transcoded renditions.

Get ready for a nice bandwidth bill if anyone actually watches your videos!

s.gif
> Get ready for a nice bandwidth bill if anyone actually watches your videos!

This 100%

I looked into it before and understandably, the badnwidth you can be using up for a relatively small amount of videos is always going to be pretty expensive. It is also not always easy to know in-advance, and do you want to suddenly get a 10x bill or have to cut-off your users when it gets expensive?

If you can afford to charge, then obviously it's different, otherwise YouTube's annoying advertising is paying for you...

s.gif
Using Cloudflare is one option - sample pricing[0]:

Streaming a library of 500 GB of HD videos over the course of one month with approximately 72,000 minutes of viewing time to a global market.

Total cost: $78.00/month

[0] https://www.cloudflare.com/en-gb/products/cloudflare-stream

s.gif
This is how we did it at the FT. We looked at on demand HLS or DASH via our CDN as well but this didn't become a requirement during my time there.
My own personal webpage, which I made 5 years ago and which no one really ever looks at, is fully static. I just dropped mp4 files on my server, along with the other files and embedded them through HTML5's regular media tags. The whole thing gets served through apache. Works like a charm.

The only reason it would need to get more complicated than that, in my mind, is if you're serving largish amounts of traffic.

Is this just about not being on YouTube or in general any platform? Otherwise I'd check out Vimeo for pure video hosting without the "social" part. There's a good reason that these platforms exist as they deal with all the encoding edge cases and different devices your users may use.
s.gif
This. Not all video hosting platforms are social networks.

Vimeo (mentioned), JWPlayer, Mux, there's tons of options.

You could get away by hosting an mp4 file on S3, but you lose seeking, support for bandwidth-responsive quality/resolution, support for every device under the sun, and metrics.

And it may not be cheaper. I got a surprise AWS bill when someone hotlinked to test video files I was hosting so people can download them and use locally. That one oops could've paid for Vimeo Pro subscription for a lifetime.

s.gif
Vimeo pivoted recentlish to big enterprise. They explicitly don't want smallish creators.
I’m not sure if this will help you much, but I followed this tutorial a few weeks ago to build what I believe you’re describing. It uses a MERN stack to build a “YouTube Clone.”

I am in no way affiliated with its this creator.

https://youtu.be/CCF-xV3RSSs

I host my own videos, 206 is the HTTP code I implemented in my own web server to get that to work, an example: http://talk.binarytask.com/task?id=4064110776042269443
There's quite a few tech people using peertube as either the only or an alternative for hosting. You still need to host the original, but if people watch your stuff, maybe you'll save some bandwidth on the p2p distribution.
s.gif
Peertube is often very hard to load within MPV and you are exposing all of the visitors IPs to each other.
s.gif
That's the tradeoff. Who do you trust to be able to something nefarious with your data?

One random person on the internet being able to see 1% of the videos you watch (the ones where you peered with them) VS one giant conglomerate being able to see 100% of the videos you watch?

s.gif
> you are exposing all of the visitors IPs to each other.

For whom it may concern: This would most likely be a violation of the GDPR for users from Europe. You'll have to state this in a cookie notice if you can't change it.

s.gif
That notice is already built into peertube. It was mainly developed in France.
s.gif
PeerTube shows a banner the first time you use it.
I use Azure Storage + BunnyCDN...

Pretty cheap/easy.

s.gif
Just make sure to use the "volume" network as its much cheaper and latency matters far less for video.
s.gif
AV1 codec in a .mp4 container. That's the first time I seen that.
I have NO idea of how media or video works. So I'm just going to post this here in case someone knows better and helps me understand.

I guess you could just upload all your videos to S3 and serve them over cloudfront. But Video seems to be tricky because there's the whole idea of encoding, adapting quality (detecting a poor connection and serving a low quality video, etc).

What I chose some time ago was Mux, they had a very good and developer friendly service.

s.gif
Upload your high resolution MP4 to S3, and open it to public only allow them to download.

To mimic what Youtube is doing, then yes you will need to transcode it to streamable chunk, in multiple bit rate, and then storage them. Assuming you are not applying your own DRM here.

As you can see, this is rather storage intensive and there aren't any free solution on this.

s.gif
AFAIK, the only two good options these days are MPEG Dash (fMP4), or HLS.

Bento4 has tools for manipulating the containers depending on your needs, and its not difficult to setup, though you most likely will need to have a certificate and hosting infrastructure setup to allow the player to load the video (i.e. CORS).

Mh, I think you should clarify you target:

- if the target is making money than you are tied to very popular platforms, because it's only there the largest public (unfortunately);

- if the target is a selected audience you already know and they equally know you a feed publishing just new video URLs and files just dropped in a webserver suffice, you users only need to click the link to see, no web-crapplications nor WebVM (improperly named and known as browsers for legacy reasons) needed;

- if the target is personal nothing beat a storage media in your pocket...

Just have to nitpick: videos. Plurals don't have an apostrophe.
s.gif
OP might be dutch.

In dutch, nouns that end in the single vowels '–a', '-i', '-o', '-u', '-y' get a "-'s" when forming the plural. The apostrophe is added to keep the long single vowel at the end long.

That's why dutch speakers frequently make this mistake.

I do, I'm running WordPress with CDN for videos. But please don't feel offensive by the contents https://www.xfriedrice.com/
s.gif
Not feeling offended by pornography titles like "i was raped ..." is quiet hard, honestly.

I have no issues with pornography itself, but that's extreme trigger material.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK