Cost of Hosting Videos
-
I am building a Moodle site but need a solution to host my paid video courses.
I will first upload videos to the host, and then embed the videos on my Moodle site.I came across the following options:
- Cloudflare Stream: $5 / 1000min storage + $1 / 1000min delivery
- Mux: $3 / 1000min storage + $0.96 / 100min delivery
- Bunny Stream: $10 / TB storage + $5 / TB delivery
- PeerTube + Hetzner: $44 / TB storage + $1 / TB delivery + 20TB of bandwidth (included in every plan)
- PeerTube + Cloudflare R2: $15 / TB storage + $0 delivery?
- PeerTube + Backblaze B2: $6 / TB storage + $0 delivery?
Note: 3-5 list their pricing in GB on their websites. I multiplied their unit price by 1000 to match 1000GB (1TB).
I am not good at calculating video file size and video delivery.
Let's assume I have one video (60min, 1080p), and 1000 users will watch it.
I know cloudflare stream will monthly cost $0.3 for storage and $60 for delivery.
Mux will cost pretty much the same (slightly lower).But I don't know how to calculate the monthly cost of 3 and 4.
As for PeerTube, its official documentation suggests using S3 compatible object storage, such as Cloudflare R2 and Backblaze B2.
My questions:
- Which option is most cost-effect in the long term?
- If 5~6 are the most cost-effective options, which one is better (5 or 6)?
- Is there a tutorial for setting up object storage with PeerTube?
-
How much space do you require? Do you care if the videos are served from one location, meaning not through a CDN?
The most cost economical option could possibly be a dedicated server in RAID-1 like Hetzner that gives you unmetered bandwidth with 4TB of space.
-
@threetrees3
I am just starting this moodle project. I am not sure how much storage I will need in the future.
The purpose of this project is to provide AI related courses (free and paid) to students in China.
Hetzner has data centers in Europe and US.
I am currently hosting the Moodle site on hetzner.
I am not sure if there will be latency.
My domain is registered and managed on Cloudflare.
Does this mean my moodle site has CDN already?
I probably need the CDN for streaming videos.
There is a huge demand for learning AI right now in China. -
One starting point is the average display size in the community you are serving:
https://www.designrush.com/agency/web-development-companies/trends/website-dimensionsYou could pick a streaming resolution from there, and then move onto fps (frames per second) and format you will have for the videos. There is a calculator here:
https://www.omnicalculator.com/other/video-sizeYou can considerably reduce the file size and therefore the bandwidth requirement by encoding video using AV1. Hardware encoding for AV1 is available on some CPUs, eg the latest Ryzens from AMD.
If you manage to get Object Storage to work with Peertube, some of us here would be keen to hear how you managed it. Peertube also supports HLS (HTTP live streaming), though this isn't working properly with AV1, yet.
You can try side-by-side comparisons. 480p video is pretty good, and this also helps people with poor internet connections in some parts of the world.
-
@taowang said in Cost of Hosting Videos:
PeerTube + Hetzner: $44 / TB storage + $1 / TB delivery + 20TB of bandwidth (included in every plan)
You can also use a Hetzner Storage Box for a lot cheaper (but slower, enough for videos tho, I use it for my Emby).
-
I just checked Hetzner storage box. It is even cheaper than backblaze ($3.2 / TB).
However, it is not S3 compatible, which is required by PeerTube.
But I think I found a workarround: installing Minio and mount to Hetzner Storage Box. -
I store all my PeerTube videos on Object Storage on Scaleway, see https://forum.cloudron.io/post/86078
-
Peertube + Hetzner Storage Box may not work according to this thread: https://forum.cloudron.io/topic/11521/minio-and-hetzner-storage-box/14
I am wondering if Emby supports video embedding, since I need to embed videos on Moodle.
-
https://www.idrive.com/s3-storage-e2/pricing
It's more expensive than when i used them. I had 20TB for a year for $99. Now that costs $300. Which is half off the normal yearly rate of $600. But that's half of what the yearly rate was when I had an account. I made sure i set 20 alarms the month before my account was to renew because they were charging $1200 a year at the time for 20TB.
I quickly filled it up and had several buckets mounted on my server to off load I/O on a 10Gb/sec bare metal leaseweb server with 64TB RAID10 tuned for and scripted to offload old files to rclone mounts that prioritized cross seeding, reseeding, and bounty requests on dozens of pirate trackers as well as serving files per request to a public telegram bot. Quite a bit of moving files around based on demand.
Idrive held it's own and I don't remember having much trouble with it. I did get close to the 3x egress many times, which if all else was equal, would mean you were doing 60TB of traffic a month like I was and that would a great sign that you're successful, or someone is abusing your service.
They have a guide to use cloudflare CDN
https://www.idrive.com/s3-storage-e2/cloudflare-guide -
Cloudflare R2 and Backblaze B2 do not charge egress fee.
I am considering PeerTube + Backblaze B2 + Cloudflare CDN
But I am not sure if the free tier Cloudflare CDN supports video streaming.
I read some reddit and hackernews posts that say video streaming is not supported by cloudflare CDN.
-
I use Bunny https://bunny.net/ for hosting my videos since I also use their CDN for the website, it makes sense for me.
Also I use prestoplayer that works with Bunny for wordpress based sites.I got a lifetime deal of Publitio and that has worked well for me too. https://publit.io/
Bunny takes care of all my media needs for now and the cost is okayish for me.
-
how is bunny video privacy like?
I am learning the privacy settings of these video hosting platforms, since the videos are paid courses.
with vimeo, there is a setting called "Hide from Vimeo" that allows you to embed videos on your own site. Your users cannot share your video link because the vimeo source link will not play it (it is hidden).
but with peertube, it does not have this feature. the only way to protect your video is to set the privacy to "password protected". your users must fill in the password in order to watch it. but they can also easily leak the link and the password. you have to change the password frequently. more dangerously, users can right click on the embedded video and download it....this is ridiculous for paid courses.
-
Yep. Bunny has those too.
You can encrypt the videos for each session.
You restrict the videos to play on only some domains etc.
9/13