Serverless Video Processing with AWS Lambda and FFmpeg

Serverless Video Processing

Traditional video transcoding requires dedicated, expensive servers. We migrated to a serverless architecture using AWS Lambda, reducing our idle costs to zero while allowing massive simultaneous processing.

Table of contents:

The Lambda Layer

Bundling FFmpeg into an AWS Lambda Layer allows multiple functions to share the binary without bloating their deployment packages. We compile FFmpeg statically for Amazon Linux 2.

Event-Driven Architecture

When a user uploads a video to S3, an event triggers our Lambda function. It streams the input from S3, processes it through FFmpeg using pipes, and streams the output back to S3.

Handling Timeouts

Lambda has a 15-minute execution limit. For long videos, we split the video into smaller chunks, process them in parallel across hundreds of Lambda instances, and concatenate the results.

Contact

Let's talk.

A direct line to the team behind the work. No account managers, no briefing relay between departments. Tell us about your next project and we'll reply within 24 hours with concrete next steps.

Response Within 24 hours, direct from the team

Available  •  Remote-first, worldwide

Briefing

Send us a short briefing.