Comment

Comment by mannyv

Fuck K8. You literally don't need it. Maybe he needs it because he's building on google cloud.

AWS is easier, but you can do it with anything. The basic steps are:

1. Upload the file somewhere 2. Transcode it 3. Put the parts somewhere 4. Serve the parts

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).

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.

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.

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.

You can kick the process off by attaching a Lambda to S3, which will start the process when the file is uploaded.

You can kick your "availability activation" off by attaching a Lambda to the S3 output bucket.

Background: I help run a streaming service and built the backend pipeline.

This omits the entire "metadata management and analytics" side as well. That's left as an exercise for the user.

parent mannyv 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton