Live data from Hacker News

Video streaming at scale with Kubernetes and RabbitMQ

alexandreolive.medium.com

1–10 of 100 posts

Re: Video streaming at scale with Kubernetes and RabbitMQ

#3

Must be expensive to run on Google Cloud. Also looks pretty complex. The stabilization step presumably does a video encode …. that’s extremely expensive in terms of time, compute and money I wonder why it’s necessary.

I was thinking the same. CF on the front would improve on it but still.

Hetzner or other bare metal providers would probably be a better idea.

Re: Video streaming at scale with Kubernetes and RabbitMQ

#4

Must be expensive to run on Google Cloud. Also looks pretty complex. The stabilization step presumably does a video encode …. that’s extremely expensive in terms of time, compute and money I wonder why it’s necessary.

Not necessarily. GCP, when used correctly, can be super cheap. You also don't know the contractual deals they have with GCP.

Re: Video streaming at scale with Kubernetes and RabbitMQ

#5
I have to ask, why bother with Kubernetes and all the associated config and pain? Why not just start a new spot instance? I can’t see any reason for Kubernetes in this architecture even though it’s the title of the post.

Also personally I wouldn’t use rabbitmq … it’s pretty heavyweight… there’s lots of lightweight queues out there. Overall this architecture looks like it could be simplified.

Also, the post doesn’t mention if the video encoding uses GPU hardware acceleration. Makes a big difference especially if using spot instances …. ffmpeg in CPU is extremely computationally expensive.

Presumably all input videos need reencoding to convert them to HLS.

Re: Video streaming at scale with Kubernetes and RabbitMQ

#6
I thoroughly appreciated this article as I've been building a short-form video content streaming service and the performance hasn't been what I expected.

Granted, I knew that my service needs to be able to scale at different bottlenecks, but a lot of "build your own video service!" tutorials start with:

- Build a backend, return a video file

- Build a frontend, embed the video

And that leaves a lot to be desired in terms of performance. I think the actual steps should be:

- Build a backend that consists of:

  - Video Ingestion service

  - Video Upload / Processing Service that saves the video into chunks

  - Build a streaming service that returns video chunks
- Build a frontend that consists of:

  - Build or use a video streaming library that can play video chunks as a stream
Edit: From the author's links, I found this website which is very informative: https://howvideo.works/

Re: Video streaming at scale with Kubernetes and RabbitMQ

#7

Must be expensive to run on Google Cloud. Also looks pretty complex. The stabilization step presumably does a video encode …. that’s extremely expensive in terms of time, compute and money I wonder why it’s necessary.

I wonder if it wouldn't be cheaper to run an on-prem farm of BestBuy-grade "gamer PC" for smaller scale networks like that.

Re: Video streaming at scale with Kubernetes and RabbitMQ

#8

I thoroughly appreciated this article as I've been building a short-form video content streaming service and the performance hasn't been what I expected. Granted, I knew that my service needs to be able to scale at different bottlenecks, but a lot of "build your own video service!" tutorials start with: - Build a backend, return a video file - Build a frontend, embed the video And that leaves a lot to be desired in t…

>> I've been building a short-form video content streaming service

What does it do?

Re: Video streaming at scale with Kubernetes and RabbitMQ

#9
This is nice if you only have to deliver in one format, but as soon as you want to show up on TVs you are stuck delivering in a lot of formats, and life gets complicated quickly.

Throw subtitles in multiple languages, and different audio tracks, into the mix, and all of a sudden streaming video becomes a nightmare.

Finally, if you are dealing with copyrighted materials, you have to be aware as to what country your user is physically residing in while accessing the videos, as you likely don't have a license to stream all your videos in every country all at once.

Throw this all into a blender and what is needed is a very fancy asset catalog management system, and that part right there ends up being annoyingly complicated.

Re: Video streaming at scale with Kubernetes and RabbitMQ

#10

I thoroughly appreciated this article as I've been building a short-form video content streaming service and the performance hasn't been what I expected. Granted, I knew that my service needs to be able to scale at different bottlenecks, but a lot of "build your own video service!" tutorials start with: - Build a backend, return a video file - Build a frontend, embed the video And that leaves a lot to be desired in t…

>> I've been building a short-form video content streaming service What does it do?

Right now I'm basically trying to just re-create the TikTok / Youtube Shorts / Instagram Reels experience of infinitely scrolling videos.

Mostly just building for fun though.

Post reply on HN