Tutorial · Python · ~10 min
Spatial Audio for Livestreams
Concerts and sports in spatial audio, live — upmix the stereo feed in real time.
Why this matters
Live events are the flagship spatial-audio use case: the room, the crowd, the stage. Upmixing the broadcast stereo feed into 5.1/Atmos in real time adds the immersion without a second mixing desk.
Low-latency upmixing is a different beast than offline: the model must run on a live frame budget.
How it works
Point the API at your live stereo feed with mode=live; it outputs a spatialized 5.1/7.1.2 stream with sub-second added latency.
Submit a job with an input URL (S3, GCS or HTTPS), poll the job URL, and download the rendered output. No GPU, no queues, no ffmpeg builds to babysit.
Code
import requests, time
API = "https://api.mlslabs.io/v1/ai-mixing/jobs"
headers = {"X-API-Key": "YOUR_API_KEY"}
payload = {"input": "rtmp://ingest.example.com/live/feed", "output": "5.1", "mode": "live"}
resp = requests.post(API, json=payload, headers=headers)
job = resp.json()
while job["status"] not in ("succeeded", "failed"):
time.sleep(3)
job = requests.get(job["url"], headers=headers).json()
print("Output:", job["output_url"])Pro tips
- Start with 5.1 for the live feed — Atmos objects in live are harder for legacy decoders.
- Keep a stereo fallback; not every device decodes spatial.
- Test the full chain (encoder → player) with your CDN before show day.
Pricing note
Usage is metered per minute of media processed; the first tier is free each month. Volume discounts kick in automatically.
FAQ
Common questions
What latency does it add?
Roughly 200–400ms over the encode path — imperceptible for most live programming.
Does it handle commentary mics?
The upmix treats the mix as content; if commentary must stay center, route it after upmixing.
Is there a reliability SLA?
Yes — live jobs support health checks and failover ingest.
Keep exploring