Why Use SRT with OBS?
OBS Studio has supported SRT output since version 27, and as of version 30+ it is a first-class protocol option. If you are still pointing OBS at an RTMP endpoint, you are missing out on three significant upgrades:
- Encryption: SRT encrypts your stream with AES-128 or AES-256 natively. No RTMPS certificate management, no TLS overhead. Just a shared passphrase.
- Error recovery: SRT's selective retransmission (ARQ) recovers lost packets without retransmitting the entire stream. On a network with 2-5% packet loss, RTMP produces visible artifacts. SRT delivers a clean stream.
- Real-time diagnostics: SRT exposes metrics like RTT, packet loss, jitter, and retransmission count. Your receiving server can monitor stream health in real-time and react before problems become visible.
This guide covers everything you need to connect OBS to an SRT destination.
Prerequisites
Before starting:
- OBS Studio 30 or newer. Older versions have SRT support but with fewer configuration options and known bugs. Update to the latest version.
- An SRT destination: a server running an SRT listener.
- UDP connectivity. SRT uses UDP. If you are behind a corporate firewall that blocks outbound UDP, you will need an exception for your SRT port.
# Quick test: can you reach your server on UDP?
nc -vz -u your-server.com 9000
Step 1: Configure the SRT Destination
First, set up the receiving end. You need an SRT listener:
- Choose a port (e.g., 9000)
- Set latency to 500ms as a starting point
- Enable encryption with a strong passphrase and AES-256
Your SRT endpoint is now: srt://your-server.com:9000
If you want to test quickly, you can use FFmpeg as a listener:
ffmpeg -i "srt://0.0.0.0:9000?mode=listener&latency=500000" -c copy output.ts
Step 2: Configure OBS Stream Settings
Open OBS and go to Settings > Stream:
- Service: Select Custom...
- Server: Enter your SRT URL with all parameters:
srt://your-server.com:9000?latency=500000&passphrase=YourSecurePassphrase&pbkeylen=32
- Stream Key: Leave this empty. SRT does not use stream keys.
Critical: Latency Units
OBS specifies SRT latency in microseconds, not milliseconds. This is the single most common configuration mistake:
| Desired Latency | OBS Value |
|---|---|
| 120ms | 120000 |
| 500ms | 500000 |
| 1000ms | 1000000 |
| 2000ms | 2000000 |
If you set latency=500 in OBS, you are requesting 0.5ms, effectively zero buffer.
The Full SRT URL Explained
srt://your-server.com:9000?mode=caller&latency=500000&passphrase=MyPass123&pbkeylen=32&oheadbw=25
| Parameter | Value | Description |
|---|---|---|
mode |
caller |
OBS initiates the connection |
latency |
500000 |
500ms receive buffer in microseconds |
passphrase |
MyPass123 |
Shared encryption passphrase (10-79 characters) |
pbkeylen |
32 |
AES-256 (16=AES-128, 24=AES-192, 32=AES-256) |
oheadbw |
25 |
25% overhead bandwidth for retransmissions |
Step 3: Configure OBS Output Settings
Go to Settings > Output and switch to Advanced mode.
Encoder Settings
x264 (Software Encoding)
Encoder: x264
Rate Control: CBR
Bitrate: 6000 Kbps
Keyframe Interval: 2 seconds
CPU Usage Preset: veryfast
Profile: high
Tune: zerolatency
The zerolatency tune disables x264's frame reordering and look-ahead features, reducing encoding latency by 2-5 frames.
NVENC (NVIDIA GPU)
Encoder: NVIDIA NVENC H.264
Rate Control: CBR
Bitrate: 6000 Kbps
Keyframe Interval: 2 seconds
Preset: P4
Profile: high
B-Frames: 0 (minimum latency) or 2 (better quality)
Intel QSV
Encoder: QuickSync H.264
Rate Control: CBR
Bitrate: 6000 Kbps
Keyframe Interval: 2 seconds
Profile: high
Why CBR?
SRT works best with Constant Bitrate encoding:
- Bandwidth prediction: SRT allocates overhead bandwidth as a percentage of the stream bitrate. With CBR, this is predictable.
- Packet scheduling: Constant bitrate produces evenly-spaced packets, which SRT can schedule efficiently.
Step 4: Resolution and Bitrate Guidelines
| Resolution | Frame Rate | Minimum Bitrate | Recommended Bitrate |
|---|---|---|---|
| 1280x720 | 30 fps | 2500 Kbps | 4000 Kbps |
| 1280x720 | 60 fps | 3500 Kbps | 5000 Kbps |
| 1920x1080 | 30 fps | 4000 Kbps | 6000 Kbps |
| 1920x1080 | 60 fps | 6000 Kbps | 8000 Kbps |
| 3840x2160 | 30 fps | 15000 Kbps | 20000 Kbps |
Step 5: Latency Tuning
Measuring Your Baseline
- Start streaming with
latency=500000 - Observe the reported RTT for 5 minutes
- Note the average RTT and the peak RTT
Calculating Optimal Latency
Optimal Latency = 4 * Average RTT + 2 * (Peak RTT - Average RTT)
Example: Average RTT = 40ms, Peak RTT = 65ms
Latency = 4 * 40 + 2 * (65 - 40) = 160 + 50 = 210ms
Round up to 250ms. In OBS: latency=250000
Troubleshooting
"Failed to connect to server"
- Wrong port: double-check the port number
- Firewall blocking UDP: SRT uses UDP, not TCP
- Passphrase mismatch: SRT silently rejects wrong passphrases
- Server not listening: verify the SRT listener is running
Stream connects but video is broken
- Latency too low: increase SRT latency
- Keyframe interval too long: set to 2 seconds maximum
Intermittent freezing
- Switch to a faster encoder preset
- Use hardware encoding (NVENC, QSV)
- Reduce resolution or frame rate
OBS SRT Quick Reference
Local Network (LAN)
srt://192.168.1.100:9000?latency=60000
Same City
srt://server.example.com:9000?latency=250000&passphrase=YourPassphrase&pbkeylen=32
Cross-Country
srt://server.example.com:9000?latency=800000&passphrase=YourPassphrase&pbkeylen=32&oheadbw=25
International
srt://server.example.com:9000?latency=1500000&passphrase=YourPassphrase&pbkeylen=32&oheadbw=30
For more on SRT fundamentals, read the full SRT vs RTMP comparison.
Top comments (0)