Live video streaming in MeetStream
This guide explains how to receive live video from a MeetStream bot over WebSocket while a meeting is in progress. You provide a URL when you create the bot; MeetStream connects to your server and streams fragmented MP4 (fMP4) data you can record or process.
Platform support
Live video streaming is supported for Google Meet and Microsoft Teams meetings only. It is not available for other platforms (including Zoom) at this time.
What you need
- A create bot request that sets
video_requiredtotrueand includeslive_video_required.websocket_url(see below). - A WebSocket server you control that implements the message protocol in this document.
- For local development, a way to expose that server on the public internet with
wss://(for example ngrok or cloudflared).
What happens during a session
- You create a bot with a
meeting_linkfor Google Meet or Teams and pass your WebSocket URL in the payload. - After the bot joins and recording starts, MeetStream opens a WebSocket connection to your URL.
- You receive JSON control messages (
video_stream_start, periodicvideo_latency_ping, andvideo_stream_end) and binary frames containing fMP4 chunks in order. - You respond to each
video_latency_pingwithvideo_latency_pongso latency can be measured.
Create bot payload
Use this shape when creating a bot in MeetStream:
You can also use camelCase keys if your client prefers: liveVideoRequired and websocketUrl.
WebSocket URL rules
- Must be a string starting with
ws://orwss://. - For production, use
wss://(TLS).
WebSocket protocol
Messages from MeetStream (text / JSON)
video_stream_start
Sent once after the connection is established.
video_latency_ping
Sent periodically.
video_stream_end
Sent when the stream is stopping.
Messages from MeetStream (binary)
- Raw fMP4 bytes from the recorder. Append chunks in order to build a continuous stream or file.
Messages you send back (text / JSON)
For every video_latency_ping, reply with:
Echo the same seq, sent_at_ms, and bot_id from the ping; set server_received_at_ms to a millisecond timestamp when your server handled the ping.
Implementing your WebSocket server
You can use any stack that speaks WebSocket. Your server should:
- Accept connections on
ws://orwss://. - Parse text frames as JSON.
- On
video_stream_start, prepare your output (file, buffer, pipeline). - On each
video_latency_ping, send avideo_latency_pongas above. - On binary frames, append bytes in order to your output.
- On
video_stream_endor disconnect, finalize and close your output.
Minimal handling loop
- Track state per connection (for example
bot_id, open output handle). - Text JSON: handle
video_stream_start,video_latency_ping,video_stream_endas described. - Binary: append to the current output if
video_stream_startwas already received. - Disconnect: flush and close resources.
Production tips
- Terminate TLS in front of your app and expose
wss://to MeetStream. - Allow large WebSocket frames if your platform has limits.
- Process writes sequentially per stream so chunk order is preserved.
- Isolate streams per bot or session.
- Plan storage and backpressure for long meetings.
Reference implementations
Client side — creating a bot with live video
Send a POST to the MeetStream API to create a bot with live video streaming enabled. The response includes the bot_id you will see in WebSocket messages.
cURL
Node.js
Python
Server side — Node.js WebSocket receiver
A complete receiver that writes incoming fMP4 chunks to .mp4 files on disk. Each connection maps to one bot session.
Run with:
Server side — Python WebSocket receiver
The same receiver in Python using the websockets library.
Run with:
Reaching a server on your laptop
If MeetStream runs in the cloud and your receiver runs locally, expose the local WebSocket port with a tunnel (for example ngrok or cloudflared) and use the public wss:// URL in live_video_required.websocket_url.
Point the tunnel at the port your video receiver listens on. Do not reuse another WebSocket used for a different purpose.
Troubleshooting
Early in a session, the first bytes may arrive slightly before your WebSocket is fully ready; once connected, chunks should flow normally.
Security
- Prefer
wss://in production. - Do not put secrets in URLs if you can avoid it; protect your receiver with auth, IP restrictions, or a private network where possible.
- Treat tunnel URLs as sensitive while testing.
Quick test checklist
- Start your WebSocket receiver.
- Expose it with a public
wss://URL if needed. - Create a bot with a Google Meet or Teams
meeting_linkandlive_video_required.websocket_urlset to that URL. - Confirm you receive
video_stream_start, then growing binary traffic. - Confirm you send
video_latency_pongfor eachvideo_latency_ping. - Confirm
video_stream_endwhen the session ends.
If something still fails, note your bot_id, meeting platform, and timestamps when contacting MeetStream support.
