Video Streaming
Stream live video from smart glasses. Supports WebRTC, SRT, and RTMP.Quick start
Pick the option that matches what you want to do:Get a low-latency stream of the glasses camera in your miniapp
Use a managed stream. Mentra handles the infrastructure — you get a WebRTC URL with sub-second latency.Stream to a server on your local network
Use an unmanaged stream. Point the glasses directly at your endpoint using SRT, RTMP, or WHIP.Stream to a public platform like Twitch or YouTube
Use a managed stream withrestreamDestinations. Mentra relays the video through a stable SRT connection to the cloud, then fans it out to your RTMP destinations. This is more reliable than streaming RTMP directly from the glasses.
Which should I use?
| I want to… | Use |
|---|---|
| Process video in my miniapp (CV, AI, etc.) | Managed stream (default) |
| Stream to my own local server | Unmanaged stream |
| Go live on YouTube/Twitch/Facebook | Managed stream + restreamDestinations |
| Stream to a remote server I control | Unmanaged stream |
Managed streaming
Managed streaming delegates ingest and playback to the Mentra cloud. Your miniapp gets back playback URLs without managing any infrastructure.- Requires internet connectivity
- Non-exclusive camera access — multiple miniapps can share the same stream
- Playback URLs become usable when status reports
"active"
restreamDestinations are provided, the stream automatically switches to SRT ingest with HLS/DASH playback (required for RTMP fan-out).
Status events
Always subscribe to status events before starting a stream. Don’t use playback URLs until status is"active".
API reference
Notes
errorstatus is non-recoverable for the current attempt. Retry by callingstartLivestream()again.- Multiple miniapps can call
startLivestream()and share the same underlying stream. The stream stays alive until all miniapps stop it.
Unmanaged streaming
Unmanaged streaming sends the camera feed directly from the glasses to your endpoint. You control ingest, transcoding, and distribution. The protocol is determined by the URL scheme:srt://— Low-latency, resilient to packet loss. Recommended.rtmp:///rtmps://— Widely supported by streaming platforms.https://— WHIP (WebRTC ingest). Ultra-low latency.
Status events
API reference
Notes
- Exclusive camera access — blocks other streams while active.
- Works on local networks (no internet required if your server is reachable).
- You manage endpoint availability and retries.
Shared types
Checking for existing streams
Detect if a stream is already active for the current user. Useful after app restarts or for coordinating between miniapps.Permissions
All streaming requires theCAMERA permission in your app configuration. See Permissions Guide.
FAQ
How do I know when playback URLs are ready? Subscribe toonLivestreamStatus and wait for status === "active".
Can I stream to YouTube/Twitch AND get a low-latency WebRTC feed?
Not currently. Restream destinations require SRT + HLS/DASH mode. WebRTC playback is only available without restream destinations.
Does managed streaming require internet?
Yes. Unmanaged can work on local networks.
Is managed streaming low-latency?
Yes. The default WebRTC mode has sub-second latency. Adding restreamDestinations switches to SRT + HLS/DASH which has higher latency.
Why use managed streaming for Twitch/YouTube instead of just RTMP directly?
Managed streaming relays through a stable SRT connection to the cloud first, then fans out via RTMP. This is more reliable than streaming RTMP directly from the glasses over potentially unstable networks.
