MEDIA & CONTENT DELIVERY

Video Transcoding Pipeline at Broadcast Scale

Engineered a serverless video transcoding pipeline processing 8,000+ hours of footage per month with 62% cost reduction versus the previous EC2-based encoding farm.

8,000+ Hours/Month62% Cost ReductionAdaptive Bitrate

The Challenge

A digital media company ingesting 8,000+ hours of video per month was running a fleet of 24 EC2 c5.4xlarge instances as a transcoding farm. The fleet ran 24/7 regardless of actual workload, and utilisation averaged just 31%. Encoding jobs were queued in a custom Redis-based system with no retry logic — failed jobs required manual re-submission. The total monthly cost for the transcoding infrastructure was $42,000.

Our Approach

We replaced the always-on EC2 fleet with an event-driven serverless pipeline using AWS Step Functions, Lambda, and MediaConvert.

Ingestion: Source files uploaded to an S3 bucket trigger a Lambda function that extracts metadata (codec, resolution, bitrate, duration) and creates a transcoding job specification. The specification is passed to a Step Functions state machine that orchestrates the encoding workflow.

Transcoding: AWS MediaConvert handles the actual encoding, producing HLS and DASH manifests with adaptive bitrate ladders (1080p, 720p, 480p, 360p). We tuned the bitrate ladder using Netflix's per-title optimisation methodology — each title gets a custom encoding ladder based on its visual complexity, rather than using a fixed bitrate table.

DRM: Output assets are encrypted using AWS Elemental MediaPackage with Widevine and FairPlay DRM. Key rotation occurs every 24 hours. The DRM configuration is managed through a central policy engine that applies different rules based on content licensing agreements.

Cost: The pipeline runs only when there is work to do. MediaConvert charges per minute of output, and Lambda charges per invocation. Monthly cost dropped from $42,000 to $16,000 — a 62% reduction — while processing the same volume.

Results

MetricBeforeAfter
Monthly infrastructure cost$42,000$16,000 (−62%)
Fleet utilisation31% averageN/A (serverless)
Failed job recoveryManual re-submitAutomatic retry (3x)
Time to first playable segment8 minutes90 seconds
Output formatsMP4 onlyHLS + DASH + DRM