Skip to main content

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

ProtocolAddress
SRT (recommended)srt://ingest.antcdn.net:9000
RTMPrtmp://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

  1. Open OBS → Settings → Stream
  2. Set Service to Custom…
  3. Paste the full SRT URL into Server:
    srt://ingest.antcdn.net:9000?streamid=#!::r=live/<your-stream-key>,m=publish
  4. Leave Stream Key empty — it’s embedded in the URL
  5. Click OK → Start Streaming

RTMP

  1. Open OBS → Settings → Stream
  2. Set Service to Custom…
  3. Server: rtmp://ingest.antcdn.net/live
  4. Stream Key: <your-stream-key>
  5. Click OK → Start Streaming

FFmpeg

SRT

Terminal window
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

Terminal window
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>"

SettingRecommended value
Video codecH.264 (x264)
Audio codecAAC
Keyframe interval2 seconds
Rate controlCBR
Bitrate2500–6000 kbps (depends on quality preset)
Audio bitrate128–192 kbps
ResolutionMatch your quality preset (720p for standard, 1080p for high)

Verifying the Connection

After clicking Start Streaming:

  1. The stream state in your dashboard will change from idle → connecting → live
  2. The HLS playback URL becomes active once the first segments are available (~5–10 seconds)
  3. If the state stays at connecting for more than 30 seconds, check your firewall — port 9000 UDP (SRT) or 1935 TCP (RTMP) must be open outbound