Encoder Setup
Encoder Setup
AntCDN accepts live video via SRT (recommended) or RTMP. Any software or hardware encoder that supports these protocols will work.
Ingest Endpoints
| Protocol | Address |
|---|---|
| SRT (recommended) | srt://ingest.antcdn.net:9000 |
| RTMP | rtmp://ingest.antcdn.net/live |
Get your stream key from the dashboard (Live Streams → Manage → Connect your encoder) or via the API.
SRT vs RTMP — SRT handles packet loss and jitter better on unstable connections. Use RTMP if your encoder or network doesn’t support SRT.
OBS Studio
SRT (recommended)
- Open OBS → Settings → Stream
- Set Service to
Custom… - Paste the full SRT URL into Server:srt://ingest.antcdn.net:9000?streamid=#!::r=live/<your-stream-key>,m=publish
- Leave Stream Key empty — it’s embedded in the URL
- Click OK → Start Streaming
RTMP
- Open OBS → Settings → Stream
- Set Service to
Custom… - Server:
rtmp://ingest.antcdn.net/live - Stream Key:
<your-stream-key> - Click OK → Start Streaming
FFmpeg
SRT
ffmpeg -re -i input.mp4 \ -c:v libx264 -preset veryfast -b:v 3000k \ -c:a aac -b:a 128k \ -f mpegts "srt://ingest.antcdn.net:9000?streamid=#!::r=live/<your-stream-key>,m=publish"RTMP
ffmpeg -re -i input.mp4 \ -c:v libx264 -preset veryfast -b:v 3000k \ -c:a aac -b:a 128k \ -f flv "rtmp://ingest.antcdn.net/live/<your-stream-key>"Recommended Encoder Settings
| Setting | Recommended value |
|---|---|
| Video codec | H.264 (x264) |
| Audio codec | AAC |
| Keyframe interval | 2 seconds |
| Rate control | CBR |
| Bitrate | 2500–6000 kbps (depends on quality preset) |
| Audio bitrate | 128–192 kbps |
| Resolution | Match your quality preset (720p for standard, 1080p for high) |
Verifying the Connection
After clicking Start Streaming:
- The stream state in your dashboard will change from
idle→connecting→live - The HLS playback URL becomes active once the first segments are available (~5–10 seconds)
- If the state stays at
connectingfor more than 30 seconds, check your firewall — port 9000 UDP (SRT) or 1935 TCP (RTMP) must be open outbound