Build with The Stream.
A streaming protocol you can integrate in five minutes. Reference docs for clients, encoders, and webhooks.
Install the CLI
The fastest way to get started. One command, three seconds.
# Install via npm npm install -g @mirrorfractal/stream-cli # Verify stream --version stream-cli v0.4.1 (FQL protocol 0.4)
Alternative: download a static binary from releases.stream.mirrorfractal.com for all platforms including Windows, Raspberry Pi, and embedded ARM.
Quickstart · 60-second demo
Assuming you've signed up and created an API key, here's a full round-trip.
1. Create a stream
stream new my-first-stream \ --layers 12 \ --region "auto" \ --fec "unequal:3,2,1,0" # Returns: ✓ Stream my-first-stream created Ingest: udp://ingest.stream.mirrorfractal.com:4242/my-first-stream Playback: https://stream.mirrorfractal.com/v/my-first-stream
2. Push a source
# From a file (any audio/video/data) stream push my-first-stream --input my-video.mp4 # From a live device stream push my-first-stream --input device://video0 --bitrate 2000
3. View anywhere
Open the playback URL in a browser. The embedded player shows the live layer count and recovered-packet count in real time.
Authentication
All REST API calls require a bearer token. Keys are created in your dashboard.
const response = await fetch('https://api.stream.mirrorfractal.com/v1/streams', { headers: { 'Authorization': `Bearer ${STREAM_API_KEY}`, 'Content-Type': 'application/json' } }); const streams = await response.json();
Quality layers
Every stream is encoded into N quality layers (1–15 depending on plan). Layer 0 is the coarsest: just enough information to reconstruct a blocky, low-frequency version of the signal. Each subsequent layer halves the quantization interval, adding a bit of precision per coefficient.
- Layer 0: sign + rough magnitude (~8 dB SNR)
- Layers 1–3: base precision (~24 dB)
- Layers 4–8: studio precision (~48 dB)
- Layers 9–12: mathematically-lossless (>70 dB)
Each layer adds approximately 6 dB of SNR. This is the core design principle: the receiver always decodes the coarse first, then refines as more layers arrive.
REST API
Base URL: https://api.stream.mirrorfractal.com/v1
POST /streams # Create a stream GET /streams # List streams GET /streams/:id # Get stream details DELETE /streams/:id # Archive a stream GET /streams/:id/stats # Live stats POST /streams/:id/pause # Pause ingestion POST /streams/:id/resume # Resume ingestion POST /keys # Generate API key POST /webhooks # Register webhook