Skip to content

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:

SettingValueNotes
RTMP Serverrtmp://{Push RTMP Domain}/liveReplace with your actual Push RTMP Domain
Stream KeyAny name, e.g. my-streamBecomes {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              ← FLV

Keyframe 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
SettingRecommended value
Keyframe Interval1 second
Rate ControlCBR (Constant Bitrate)
Bitrate2000–6000 Kbps depending on quality
Profilehigh
Tunezerolatency

OBS Studio

Step 1 — Stream settings

  1. Open OBS → File → Settings → Stream
  2. Set Service to Custom...
  3. Fill in:
Server:     rtmp://your-push-domain.edgemaxcdn.org/live
Stream Key: my-stream-name

Step 2 — Output settings (Keyframe)

  1. Go to Settings → Output
  2. Switch to Advanced output mode
  3. 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
  1. Click OKStart 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-name

Step 3 — Encode Settings

Under Encode Settings:

Key Frame Every:  1 second   ← critical
Rate Control:     CBR
Bitrate:          4000 Kbps

Step 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-name

Step 3 — Keyframe setting

Go to Advanced → Video Codec Options:

Keyframe Interval: 1s   ← critical

Step 4 — Go live

Click Broadcast → [Your Channel Name]


Other Encoders

These settings work with any RTMP-compatible software:

SettingValue
ProtocolRTMP
Server URLrtmp://{Push RTMP Domain}/live
Stream KeyAny name
Keyframe Interval1 second
Rate ControlCBR

Compatible encoders: Wirecast, Streamlabs, Larix Broadcaster (mobile), ffmpeg, Restream, and more.

ffmpeg example

bash
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-stream

ffmpeg 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

IssueSolution
Stream connects but no playbackCheck 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 frequentlyLower bitrate, switch to a closer geographic region
HLS .m3u8 returns 404Wait 5–10 seconds after stream starts, then refresh

ZlyCloud CDN & Security Platform