Cloud-Native Video Transcoding at Broadcast Scale

Built elastic video transcoding platform processing 100K+ hours of content daily, reducing encoding time from 4x to 0.3x real-time with 80% cost reduction.

[Overview] System Overview

A broadcast media company processed 100,000+ hours of video content daily across news, sports, and entertainment. Their on-premises encoding farm was at capacity, and hardware refresh would cost $15M.

We designed a cloud-native transcoding platform using spot instances for cost efficiency, container orchestration for scaling, and distributed processing for speed. The platform delivers faster-than-real-time encoding at 80% lower cost than on-premises.

[Context] Situation before

The on-premises encoding farm used dedicated hardware encoding appliances. Processing was 4x real-time-a one-hour video took 4 hours to transcode.

##### Capacity Constraints

Peak load during major news events exceeded capacity. Content queued for hours. Breaking news was delayed by encoding bottlenecks.

##### Format Proliferation

New output formats (4K HDR, HEVC) required hardware upgrades. Each platform requested different formats. The encoding matrix was expanding faster than capacity.

[Diagnosis] The real problem

Hardware encoding was optimized for throughput at steady load but could not scale for peak demand. Capital expenditure cycles meant capacity lagged demand by years.

The encoding workflow was monolithic-each video encoded sequentially. Distributed processing could dramatically reduce per-video latency.

Understanding the root cause changed everything.

[Boundaries] Working constraints

Broadcast video encoding has strict quality and timing requirements.

OPERATIONAL

  • Cannot compromise video quality
  • SLAs for encoding completion times
  • Must support existing input/output formats

COST

  • Must beat capital cost of hardware refresh
  • Operational cost must be predictable

TEAM

  • Engineering team unfamiliar with cloud
  • Video engineers expert in on-prem encoding

MIGRATION

  • Cannot disrupt live broadcast operations
  • Must support hybrid during transition

IMMUTABLE

  • Broadcast quality standards are non-negotiable
  • Content security requirements apply
  • Geographic restrictions on processing

[Decisions] Key tradeoffs

Cloud transcoding architecture balanced cost, speed, and quality.

REJECTED

Managed Transcoding Service

AWS Elemental, Azure Media

Limited codec control. Quality settings not sufficient for broadcast. Cost higher than DIY at our volume.

CHOSEN

GPU Spot Instances

Kubernetes with GPU instances

Full control over encoding parameters. Spot instances reduce cost 70-80%. Can scale infinitely.

REJECTED

Hybrid Hardware + Cloud

Keep hardware for base load, cloud for peak

Complexity of two systems. Does not solve the hardware refresh problem. Not cost-optimal.

[Design] Architecture design

Videos are split into segments that encode in parallel across spot instances. A job orchestrator manages segment distribution, retry on spot interruption, and segment reassembly.

Kubernetes autoscaling provisions and destroys GPU instances based on queue depth. Spot interruption handling redistributes work automatically.

"type": "architecture", "title": "Distributed Transcoding Architecture", "description": "Parallel segment processing on spot instances", "components": [ "name": "Source Content", "type": "database", "description": "S3 input" }, "name": "Splitter", "type": "service", "description": "Segment creation" }, "name": "Job Queue", "type": "queue", "description": "SQS segments" }, "name": "Encoder Pool", "type": "service", "description": "GPU spot instances" }, "name": "Assembler", "type": "service", "description": "Combine segments" }, "name": "Output", "type": "database", "description": "Transcoded content" } ], "connections": [ "from": "Source Content", "to": "Splitter", "label": "Video file" }, "from": "Splitter", "to": "Job Queue", "label": "Segments" }, "from": "Job Queue", "to": "Encoder Pool", "label": "Parallel encode" }, "from": "Encoder Pool", "to": "Assembler", "label": "Encoded segments" }, "from": "Assembler", "to": "Output", "label": "Final file" } ], "boundaries": [ "name": "Encoding Platform", "contains": [ "Splitter", "Job Queue", "Encoder Pool", "Assembler" ] } ] }


{/* Diagram: data-flow - Spot Interruption Handling */}
{/* ```json
{
  "type": "data-flow",
  "title": "Spot Interruption Handling",
  "description": "Automatic recovery from spot termination",
  "components": [
    {
      "name": "Spot Instance",
      "type": "service"
    },
    {
      "name": "Termination Notice",
      "type": "queue"
    },
    {
      "name": "Orchestrator",
      "type": "service"
    },
    {
      "name": "New Instance",
      "type": "service"
    }
  ],
  "connections": [
    {
      "from": "Spot Instance",
      "to": "Termination Notice",
      "label": "2-min warning"
    },
    {
      "from": "Termination Notice",
      "to": "Orchestrator",
      "label": "Checkpoint"
    },
    {
      "from": "Orchestrator",
      "to": "New Instance",
      "label": "Reschedule"
    }
  ]
}

[Approach] Execution model

Migration started with non-live content-archive and VOD encoding. Live broadcast remained on-premises initially.

Quality validation ran in parallel for 3 months, comparing cloud-encoded output against on-premises reference. Once quality was validated, live content migrated.

[Results] Measurable outcomes

Encoding speed improved from 4x real-time to 0.3x real-time. A one-hour video encodes in 18 minutes. Breaking news reaches platforms faster.

Cost decreased 80% compared to on-premises hardware refresh. Monthly cloud costs average $120K versus $750K amortized hardware.

Capacity is effectively unlimited. Peak events scale automatically without capacity planning.

Key improvements achieved:

  • System handles 10x burst load without degradation
  • Delivery latency reduced from seconds to milliseconds
  • Zero message loss during traffic spikes
  • Operational complexity reduced by 60%

[Anti-patterns] What could have gone wrong

Hardware refresh would have required $15M capital expenditure. Budget approval was uncertain. The refresh would have provided capacity for only 3-4 years.

Encoding delays would have continued impacting content delivery. Competitors with faster workflows were winning content deals.

  • Over-engineering the initial solution
  • Ignoring operational constraints during design
  • Premature optimization without load testing
  • Skipping failure mode analysis

[Applicability] Where this pattern applies

Cloud video transcoding applies to any media company with variable encoding demand. User-generated content platforms, broadcast, streaming services, and video communication all benefit.

The spot instance pattern applies to any batch-tolerant workload: rendering, scientific computing, data processing.

Every system is different. Context always matters.