RTMP Encoder Setup
Push live streams to ZlyCloud CDN using OBS Studio, vMix, XSplit, or any RTMP-compatible encoder.
Connection Settings
Find these values in your ZlyCloud dashboard after creating an RTMP resource:
| Setting | Value | Notes |
|---|---|---|
| RTMP Server | rtmp://{Push RTMP Domain}/live | Replace with your actual Push RTMP Domain |
| Stream Key | Any name, e.g. my-stream | Becomes {stream_name} in the playback URL |
Example playback URLs (after streaming starts):
https://{Streaming Domain}/live/{stream_name}/playlist.m3u8 ← HLS
https://{Streaming Domain}/live/{stream_name}.flv ← FLVKeyframe Interval
Required setting
Always set Keyframe Interval to 1 second.
This is critical for correct HLS segment generation. A wrong value causes:
- Viewer buffering and playback errors
- Incorrect segment timestamps
- Higher latency than necessary
| Setting | Recommended value |
|---|---|
| Keyframe Interval | 1 second |
| Rate Control | CBR (Constant Bitrate) |
| Bitrate | 2000–6000 Kbps depending on quality |
| Profile | high |
| Tune | zerolatency |
OBS Studio
Step 1 — Stream settings
- Open OBS → File → Settings → Stream
- Set Service to
Custom... - Fill in:
Server: rtmp://your-push-domain.edgemaxcdn.org/live
Stream Key: my-stream-nameStep 2 — Output settings (Keyframe)
- Go to Settings → Output
- Switch to Advanced output mode
- Under Streaming → Encoder Settings:
Rate Control: CBR
Bitrate: 4000 Kbps (adjust to your upload speed)
Keyframe Interval: 1 ← critical
CPU Usage Preset: medium
Profile: high
Tune: zerolatency- Click OK → Start Streaming
vMix
Step 1 — Open Stream Settings
Click the Stream button at the bottom of vMix → click the gear icon ⚙
Step 2 — Configure
Set Destination to Custom RTMP Server:
URL: rtmp://your-push-domain.edgemaxcdn.org/live
Stream Name: my-stream-nameStep 3 — Encode Settings
Under Encode Settings:
Key Frame Every: 1 second ← critical
Rate Control: CBR
Bitrate: 4000 KbpsStep 4 — Start
Click Start to begin streaming.
XSplit Broadcaster
Step 1 — Add output channel
Click Broadcast → Add Channel → Custom RTMP
Step 2 — Enter RTMP details
RTMP URL: rtmp://your-push-domain.edgemaxcdn.org/live
Stream Key: my-stream-nameStep 3 — Keyframe setting
Go to Advanced → Video Codec Options:
Keyframe Interval: 1s ← criticalStep 4 — Go live
Click Broadcast → [Your Channel Name]
Other Encoders
These settings work with any RTMP-compatible software:
| Setting | Value |
|---|---|
| Protocol | RTMP |
| Server URL | rtmp://{Push RTMP Domain}/live |
| Stream Key | Any name |
| Keyframe Interval | 1 second |
| Rate Control | CBR |
Compatible encoders: Wirecast, Streamlabs, Larix Broadcaster (mobile), ffmpeg, Restream, and more.
ffmpeg example
ffmpeg -re -i input.mp4 \
-c:v libx264 -preset veryfast -tune zerolatency \
-b:v 4000k -maxrate 4000k -bufsize 8000k \
-g 30 -keyint_min 30 \
-c:a aac -b:a 128k \
-f flv rtmp://your-push-domain.edgemaxcdn.org/live/my-streamffmpeg keyframe note
-g 30 -keyint_min 30 sets keyframe every 30 frames. At 30fps this equals 1 second. Adjust the value if you use a different framerate (e.g. -g 25 for 25fps).
Troubleshooting
| Issue | Solution |
|---|---|
| Stream connects but no playback | Check Keyframe Interval is exactly 1s |
| High latency (>10s) | Reduce bitrate, enable zerolatency tune, check network |
| "Connection refused" | Verify the RTMP Server URL — no trailing slash after /live |
| Stream drops frequently | Lower bitrate, switch to a closer geographic region |
HLS .m3u8 returns 404 | Wait 5–10 seconds after stream starts, then refresh |