← things I build
VIDEOPersonal · public repoRUNS LOCALLY

StreamForge.

A video platform MVP: resumable direct-to-S3 uploads, ffmpeg transcoding to 1080p, 720p and 480p, and adaptive MPEG-DASH playback.

TECH USED
FastAPICeleryReactDynamoDBTerraformdash.js
StreamForge browse page with a featured video and category filter pills
01BrowseFeatured video and category filters over the library
StreamForge dashboard with library counts, four ready videos and an upload form
02DashboardLibrary status counts and the upload panel
StreamForge player page streaming a fractal video
03PlayerAdaptive playback with the 1080p, 720p and 480p ladder
01 / 03scroll →swipe →
demo
Space or K play and pause, M mute, F fullscreen, arrow keys seek 5 seconds
0:00 / 0:00
the full path

From problem to what's next.

In the order it actually happened. Use the route to jump around.

01THE PROBLEM

Pushing large video files through an API server is slow and fragile, an interrupted upload starts over, and one fixed-quality file stalls on slower connections.

02THE SOLUTION

The browser uploads 16 MiB parts straight to S3 through presigned URLs, so the API never touches the bytes. A Celery worker runs ffmpeg to build a 1080p, 720p and 480p DASH ladder, and dash.js adapts between rungs.

WHAT I BUILT
  1. 01Built the FastAPI backend: presigned multipart uploads, a catalog API and DASH streaming with HTTP range support.
  2. 02Wrote the Celery and ffmpeg worker: ladder transcode, poster frame and thumbnail sprite, skipping rungs above the source.
  3. 03Built the React 19 and Vite frontend with TanStack Query: upload dashboard, catalog and a dash.js player.
  4. 04Provisioned the S3 bucket and DynamoDB table with Terraform; CI runs ruff, pytest, lint, typecheck and Vitest.
03HOW IT'S BUILT

The system, end to end.

UPLOAD PATH
  1. STEP 01BrowserPUTs 16 MiB parts to S3
  2. STEP 02FastAPIplans parts · signs URLs · finalizes
  3. STEP 03Amazon S3multipart upload target
  4. STEP 04Celery jobqueued on Redis when complete
TRANSCODE PATH
  1. STEP 01Celery workerclaims job with a DynamoDB lease
  2. STEP 02ffmpeg1080p · 720p · 480p DASH ladder
  3. STEP 03Amazon S3manifest and segments, uploaded in parallel
  4. STEP 04DynamoDBstatus moves to ready
STREAM PATH
  1. STEP 01dash.js playeradapts across the ladder
  2. STEP 02FastAPImanifest and segments with range requests
  3. STEP 03Amazon S3source of segments
01Lease-based job claimingA conditional DynamoDB update claims a video with a locked_until lease, renewed every 2 minutes. Stale leases are reclaimed and failures retry up to 3 times.
02Direct, resumable uploadsPresigned multipart PUTs go straight to S3, and the client can list received parts to resume an interrupted upload.
03Safe deletesHard delete is refused while a video is processing, and S3 objects go before the DynamoDB row, so a failed delete can be retried.
04Emulator to real AWSOne environment switch moves the stack from the moto emulator to real AWS, with Terraform for the bucket and table.
04WHAT BROKE,
AND THE FIX

FIX →Switched the local AWS emulator to moto server plus an aws-init provisioning service: free and no account.

FIX →Hard delete is refused while processing, and a visibility attribute works as a soft-delete flag.

FIX →Visibility is the partition key of a GSI, so the feed is a sorted Query.

FIX →Celery prefork concurrency defaults to 2 with prefetch 1, so no process hoards long tasks.
05WHERE IT IS NOW
  1. IDEA
  2. BUILDING
  3. LIVE

Runs locally with docker compose and is not deployed: a faithful deploy needs S3, DynamoDB, Redis and an always-on ffmpeg worker. 12 pytest and 9 Vitest tests pass in CI.