rtmp_push
Encode and push to one or more RTMP URLs (YouTube, Twitch, SRS, etc.).
Example
Section titled “Example”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 } } }] }'Config
Section titled “Config”| Field | Type | Default | Description |
|---|---|---|---|
urls | string[] | — | One or more RTMP publish URLs |
encoding | object | — | Video/audio codec and bitrates |
reconnect | bool | true | Reconnect on disconnect |
reconnectMaxRetries | int | 10 | Max retries |
reconnectIntervalMs | int | 3000 | Retry delay |
Multi-URL discount
Section titled “Multi-URL discount”Multiple URLs on the same sink are billed with a fan-out discount: 1st URL full price, each additional URL +50%. See Sink pricing.
Pricing
Section titled “Pricing”Output tier by resolution and codec. Sink pricing.