Skip to content
Console

Mix LiveKit to RTMP

Send a LiveKit room to YouTube, Twitch, or any RTMP endpoint. RTC rooms need a video_mixer and audio_mixer before rtmp_push — that is a mix, not a relay. For pull sources without nodes, see Wiring — relay.

Generate a subscribe token for the source room and ensure your RTMP URL is ready. See LiveKit token docs.

Terminal window
curl -X POST "https://api.avflow.dev/v1/jobs" \
-H "Authorization: Bearer ${AVFLOW_API_KEY}" \
-H "Content-Type: application/json" \
-d @public/examples/10-livekit-mix.json

Or inline:

{
"name": "livekit-mix",
"sources": [{
"name": "room_src",
"type": "livekit",
"config": {
"serverUrl": "wss://your-project.livekit.cloud",
"token": "<subscribe-token>"
}
}],
"nodes": [{
"name": "mix_video",
"type": "video_mixer",
"inputs": ["room_src"],
"config": {
"canvas": { "width": 1280, "height": 720 },
"layout": { "mode": "grid", "grid": { "maxColumns": 3 } }
}
}, {
"name": "mix_audio",
"type": "audio_mixer",
"inputs": ["room_src"]
}],
"sinks": [{
"name": "rtmp_out",
"type": "rtmp_push",
"inputs": ["mix_video", "mix_audio"],
"config": {
"urls": ["rtmp://a.rtmp.youtube.com/live2/xxxx"]
}
}]
}
Terminal window
curl "https://api.avflow.dev/v1/jobs/livekit-mix" \
-H "Authorization: Bearer ${AVFLOW_API_KEY}"

Wait for status: "running". Check CDN ingest on your platform.

Terminal window
curl -X DELETE "https://api.avflow.dev/v1/jobs/livekit-mix" \
-H "Authorization: Bearer ${AVFLOW_API_KEY}"

See Cost examples.