Subsystem 01
Upload accelerator
Presigned multipart S3 upload URLs and progress tracking
Typical stack
Next.js Server Actions + S3
Reference architecture
A cost-efficient transcoding pipeline that turns user uploads into adaptive HLS streams for global delivery.
Design constraints
Targets for the scenario this reference is sized for. A real engagement starts by replacing them with your own numbers.
Component topology
Subsystems with separate responsibilities, clear contracts between them and storage that scales on its own. The stack named for each is typical, not mandatory.
Stack topology
Serverless video transcoding and HLS streaming pipeline
Illustrative reference architecture
Upload accelerator
Presigned multipart S3 upload URLs and progress tracking
Next.js Server Actions + S3
Transcoding engine
HLS adaptive bitrate packaging with H.264/H.265 encoding
AWS Elemental MediaConvert
Metadata database
Video metadata, duration, playback URLs and processing state
PostgreSQL + Prisma
Global video CDN
Low-latency segment delivery with signed-cookie checks
Amazon CloudFront
Subsystem 01
Presigned multipart S3 upload URLs and progress tracking
Typical stack
Next.js Server Actions + S3
Subsystem 02
HLS adaptive bitrate packaging with H.264/H.265 encoding
Typical stack
AWS Elemental MediaConvert
Subsystem 03
Video metadata, duration, playback URLs and processing state
Typical stack
PostgreSQL + Prisma
Subsystem 04
Low-latency segment delivery with signed-cookie checks
Typical stack
Amazon CloudFront
Data lifecycle
The client requests a presigned upload URL and uploads the raw MP4 straight to the S3 ingest bucket.
S3 emits an ObjectCreated event to Amazon EventBridge, which triggers a Lambda job dispatcher.
The Lambda creates a MediaConvert job with an HLS ABR ladder (1080p, 720p, 480p) and thumbnail tracks.
MediaConvert encodes the segments and writes HLS playlists (.m3u8) and segments to the delivery bucket.
MediaConvert's job-complete event (via EventBridge) updates PostgreSQL, and the video becomes playable through CloudFront.
Reliability and resilience
Failure mode 01
Mitigation
Validate each upload with FFprobe before starting a MediaConvert job.
Failure mode 02
Mitigation
Use QVBR (quality-defined variable bitrate) encoding, which spends bits only where the picture needs them.
Failure mode 03
Mitigation
CloudFront signed URLs plus HLS AES-128 segment encryption, with key delivery behind authentication.
Questions
HLS switches between quality levels as the viewer's connection changes, which avoids most buffering on slow mobile networks.
MediaConvert bills per minute of output, at rates that vary with resolution, codec, frame rate and pricing tier; check the AWS pricing page for your region. For uneven upload volume it usually costs less than keeping encoding servers idle.
Send us your requirements, expected load and budget. We'll reply within one business day with an honest read on the design, and on whether we're the right team to build it.