all work
shipped[2024]13

Movio

YouTube-scale VOD platform. HLS, DASH, DRM, and CDN microservices.

Problem

Deliver adaptive-bitrate video with content protection at scale, without relying on a managed video API.

Built

Transcoding pipeline producing HLS and MPEG-DASH renditions via FFmpeg workers, DRM packaging, and CloudFront CDN delivery for adaptive playback across all devices.

multi-bitrate

HLS + DASH output

DRM

content protection

CDN-backed

delivery

microservices

architecture

The build

[Idea]

Movio is the project where the lessons from CuteTube finally clicked. CuteTube had worked as a monolith, with upload, transcode in a Celery pipeline, and serve via CDN. It broke under real upload traffic because one worker was doing everything. Movio took the same idea and split the worker into a 10-step Celery canvas. Download from S3, delete the source, extract subtitle, upload subtitle (Lambda-triggered), transcode to MP4, segment into DASH with adaptive bitrate (360/480/720 at 800/1200/2400 Kbps), edit manifest.mpd to add subtitle info, upload segments in parallel, publish back to API, then cleanup local files.

[Framing]

The single-most-important detail was the segment upload. It's a Celery Group sub-task. One worker uploading 1000 segments holds an S3 connection open for too long and leaves idle cores. By batching into groups of 10 across available workers, all the cores do something. ffmpeg is genuinely limited here. It can't write subtitle info into manifest.mpd, so Task 07 exists to programmatically edit the manifest and append the AdaptationSet block. That's not a bug in my code, it's a known ffmpeg limitation.

[Build]

The architecture is three microservices (Auth, API, Worker) communicating only via RabbitMQ events. The Worker doesn't accept direct HTTP from API. Each service has its own repo and its own deployment. Auth was rebuilt from scratch in JWT (no third-party packages) because I wanted to understand the full token lifecycle. The Worker service's Nginx exists purely for health checks and admin. That's intentional. The whole point of microservices is that the Worker is reachable only through events.

[Deploy]

Things I'd improve if I kept going. Rate-limit the upload API with the same Token Bucket I used in Algocode. Add real WhatsApp and email notifications on completion. Move the Worker to a real container with burst capacity so a single large upload doesn't block the queue.

[What's next]

ProStream (live streaming) is the sibling project and CuteTube (monolith) is the previous generation. Together the three cover three shapes a video product can take.

Stack

9 techs · grouped by layer

Backend

  • Django
  • DRF
  • Celery
  • RabbitMQ

Infrastructure

  • Docker
  • AWS
  • FFmpeg

Data layer

  • MongoDB
  • Redis

Also used

HLSMPEG-DASHDRMAWS S3CloudFront CDN

Links

Related stack

techs used in Movio