Skip to Content
Backend ServicesMedia Pipeline

Media Pipeline

backend/media-pipeline/ (Express + FFmpeg, HTTP port 3002, WebSocket port 3003) handles cloud-side frame extraction and transcription for media too heavy to process in-browser.

Endpoints

MethodPathPurpose
POST/jobsSubmit a processing job (extraction, transcription)
GET/jobs/:idPoll job status
GET/jobs/:id/framesRetrieve extracted frames
GET/healthLiveness probe
WS:3003Live job progress streaming

Job flow

  1. The client (src/lib/media-pipeline.ts, useMediaPipeline) submits a job
  2. FFmpeg extracts frames / audio server-side into the media-temp volume
  3. Progress streams over the WebSocket — the UI shows live extraction progress
  4. Frames feed the Visionary and CLIP embeddings

Browser-local fallback

Without this service, frame extraction runs in the WebWorker pool — n = navigator.hardwareConcurrency workers with work-stealing — which is plenty for typical clips and keeps everything on-device.