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.
1. Create tokens
Section titled “1. Create tokens”Generate a subscribe token for the source room and ensure your RTMP URL is ready. See LiveKit token docs.
2. Submit the job
Section titled “2. Submit the job”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.jsonOr 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"] } }]}3. Monitor
Section titled “3. Monitor”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.
4. Stop
Section titled “4. Stop”curl -X DELETE "https://api.avflow.dev/v1/jobs/livekit-mix" \ -H "Authorization: Bearer ${AVFLOW_API_KEY}"See Cost examples.