Video streaming at scale with Kubernetes and RabbitMQ
Fuck K8. You literally don't need it. Maybe he needs it because he's building on google cloud.<p>AWS is easier, but you can do it with anything. The basic steps are:<p>1. Upload the file somewhere
2. Transcode it
3. Put the parts somewhere
4. Serve the parts<p>You should really transcode everything into HLS. It's 2023, and everything that matters supports it. If you want 4k you can use HLS or the other thing (which I keep forgetting the acronym for).<p>If you want to get fancy you can do rendition audio, which not everything supports. Rendition audio means sharing one audio stream amongst N number of video streams.<p>You can use FFMPEG to transcode, but I'd suggest using AWS MediaConvert. It's cheap, fast, and probably does everything you want. Using FFmpeg directly works, but why bother. You will get an option wrong and screw everything up. You don't want your video to not work on some random device that 50k people are using in some country you didn't think about.<p>He's using RabbitMQ but you should use SQS, because SQS can trigger lambdas...which means no polling required. But use whatever queue you want.<p>You can kick the process off by attaching a Lambda to S3, which will start the process when the file is uploaded.<p>You can kick your "availability activation" off by attaching a Lambda to the S3 output bucket.<p>Background: I help run a streaming service and built the backend pipeline.<p>This omits the entire "metadata management and analytics" side as well. That's left as an exercise for the user.