How to get Mixed Video + Audio (Realtime)

Receive a real-time RTMP stream of the meeting (video + audio) from your bots.

If you'd like to broadcast a livestream of a call outside of the meeting itself, you can configure your bots to send an RTMP stream to an endpoint.

ResolutionFrame Rate
720p30FPS

📘

The Video Layout of the RTMP stream will be the same as the format of the recording produced by the bot. If you select speaker_view, the RTMP stream will only show the active speaker, but if you set gallery_view_v2, it will show the full gallery view.

Configure the bot

Now it's time to send a bot to a meeting while configuring a real-time websocket endpoint.

To do this, call the Create Bot endpoint while providing a real-time endpoint object where:

  • type: rtmp
  • config.url: Your publicly exposed ngrok tunnel URL
  • config.events: An array including the video_mixed_flv.data event

Include video_mixed_flv media object in recording_config . Don't forget to set meeting_url to your newly-created Google Meet call.

Example curl:

curl --request POST \
     --url https://us-west-2.recall.ai/api/v1/bot/ \
     --header "Authorization: $RECALLAI_API_KEY" \
     --header "accept: application/json" \
     --header "content-type: application/json" \
     --data '
{
  "meeting_url": "https://meet.google.com/sde-zixx-iry",
  "recording_config": {
    "video_mixed_flv": {},
    "realtime_endpoints": [
      {
        "type": "rtmp",
          "url": "rtmps://your-app.com/api/...",
          "events": ["video_mixed_flv.data"]
      }
    ]
  }
}
'

Your RTMP destination URL should have the following format:

rtmp://hostname[:port]/{APPLICATION-NAME}/{STREAM-KEY}

If you'd like an extra layer of authentication in addition to the stream key, we recommend generating a short-lived JWT and providing this as a query parameter. Your backend can then verify this token prior to accepting the RTMP connection.

Verifying RTMP streams

Most of our customers will typically lean into stream keys as auth if they're using a common livestream service (e.g. this is how Mux handles it)

If you wanted to add a layer on top of this/depending on what your backend looks like:

  • You can also generate a short-lived token like a JWT and add it as a query param in your RTMP URL
  • Then you could verify this before accepting the connection on your backend.