Skip to content
Media Streaming Spec

Media Streaming Spec

This specification defines how video is encoded, segmented, stored, and delivered for real-time screen sharing between Sentinels and Proctors.

This spec was created by iterating with GPT 5.2. The chat can be found in the repository root at this commit a46981632a5e3c2a9bac8f540a6cefa1d06d4082.

Overview

AspectDecision
CodecH.264
ContainerFragmented MP4 (fMP4)
Browser DeliveryMedia Source Extensions (MSE)
Fragment DurationVariable, short (implementation choice for real-time delivery)
KeyframesOn-demand + max 20-30s interval + on FPS change
Memory BufferAll fragments from last 15-20 seconds (configurable)
Disk StorageAll fragments written as-is
ResolutionMax 1080p, downscaled preserving aspect ratio
Framerate1/5 fps to 5 fps, variable over time
Live TransportWebSocket (server pushes fragments)
Historical TransportHTTP (Proctor fetches from disk)

Components

  • Sentinel: Captures screen, encodes video, sends fragments to Server
  • Server: Receives fragments, buffers in memory, writes to disk, relays to Proctors
  • Proctor: Receives fragments, decodes via MSE, displays video

Documentation

Last updated on • J.H.F.