Skip to content
Console

rtmp_push

Encode and push to one or more RTMP URLs (YouTube, Twitch, SRS, etc.).

Terminal window
curl -X POST "https://api.avflow.dev/v1/jobs" \
-H "Authorization: Bearer ${AVFLOW_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "youtube-live",
"sources": [{
"name": "room_src",
"type": "livekit",
"config": {
"serverUrl": "wss://your-project.livekit.cloud",
"token": "<token>"
}
}],
"nodes": [{
"name": "mix",
"type": "video_mixer",
"inputs": ["room_src"],
"config": {
"canvas": { "width": 1920, "height": 1080 },
"layout": { "mode": "speaker" }
}
}],
"sinks": [{
"name": "yt",
"type": "rtmp_push",
"inputs": ["mix"],
"config": {
"urls": [
"rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx",
"rtmp://live.twitch.tv/app/live_xxxx"
],
"encoding": { "videoCodec": "h264", "maxFps": 30 }
}
}]
}'
FieldTypeDefaultDescription
urlsstring[]One or more RTMP publish URLs
encodingobjectVideo/audio codec and bitrates
reconnectbooltrueReconnect on disconnect
reconnectMaxRetriesint10Max retries
reconnectIntervalMsint3000Retry delay

Multiple URLs on the same sink are billed with a fan-out discount: 1st URL full price, each additional URL +50%. See Sink pricing.

Output tier by resolution and codec. Sink pricing.