SRT Streaming Setup Guide: From Zero to Production

Why SRT?

SRT (Secure Reliable Transport) has become the go-to protocol for professional video transport over the internet. If you’re moving video between locations, whether across a city or across the world, SRT gives you reliability, encryption, and observability that RTMP simply can’t match.

This guide walks you through setting up SRT from scratch.

Understanding SRT Modes

SRT has two connection modes. Understanding them is essential before you configure anything.

Listener Mode (Server)

The listener opens a port and waits for incoming connections. Think of it as the “server” side.

SRT Listener: srt://your-server:9000?mode=listener

Use listener mode when:

  • You’re running a centralized gateway or server
  • You need to accept streams from multiple sources
  • Your server has a public IP or is behind a configured firewall

Caller Mode (Client)

The caller initiates the connection to a listener. It’s the “client” side.

SRT Caller: srt://remote-server:9000?mode=caller

Use caller mode when:

  • You’re an encoder sending to a server
  • You’re behind NAT and can’t receive incoming connections
  • You need to push a stream to a specific destination

Step 1: Choose Your Ports

SRT uses UDP, so you need to open the right ports on your firewall. The convention is:

  • Port 9000+ for SRT listeners
  • One port per listener (each SRT session needs its own port unless using connection IDs)

Make sure your firewall rules allow UDP inbound on your chosen ports.

Step 2: Configure Latency

SRT’s killer feature is adjustable latency. The latency parameter (in milliseconds) controls the buffer size for error recovery:

Network ConditionRecommended Latency
LAN (<1ms RTT)20-60ms
Same city (~5ms RTT)120-200ms
Same continent (~30ms RTT)250-500ms
Cross-continent (~100ms RTT)500-1500ms
Satellite/Cellular1000-4000ms

Rule of thumb: Set latency to at least 4x your round-trip time (RTT). This gives SRT enough buffer to request retransmissions.

srt://server:9000?latency=500

Step 3: Enable Encryption

SRT supports AES-128 and AES-256 encryption. Always enable it when streaming over the internet.

srt://server:9000?passphrase=YourSecurePassphrase&pbkeylen=32
  • passphrase: minimum 10 characters, maximum 79
  • pbkeylen: 16 for AES-128, 24 for AES-192, 32 for AES-256

Both sides (listener and caller) must use the same passphrase and key length.

Step 4: Set Up with Vajra Cast

Vajra Cast makes SRT setup straightforward:

  1. Create an Ingest: Choose SRT Listener, pick a port, set your latency
  2. Enable encryption: Enter a passphrase in the security settings
  3. Point your encoder: Configure OBS, vMix, or any SRT-capable encoder as a caller to your Vajra Cast address
  4. Monitor: Watch real-time metrics: bitrate, packet loss, RTT, jitter

The entire process takes about 2 minutes.

Step 5: Optimize Performance

Once your stream is running, fine-tune these parameters:

Maximum Bandwidth

Set maxbw to limit bandwidth overhead:

srt://server:9000?maxbw=10000000

This caps total bandwidth (including retransmissions) at 10 Mbps.

Overhead Bandwidth

The oheadbw parameter (percentage) controls how much extra bandwidth SRT can use for retransmissions:

srt://server:9000?oheadbw=25

Default is 25%. Increase on lossy networks, decrease on clean ones.

Connection Timeout

Set connect_timeout for caller mode to control how long SRT waits before giving up:

srt://server:9000?connect_timeout=3000

Monitoring Your Stream

SRT provides rich real-time statistics. Key metrics to watch:

  • RTT (Round Trip Time): should be stable; spikes indicate network issues
  • Packet Loss Rate: below 1% is good; SRT can handle up to 30% with sufficient latency
  • Retransmitted Packets: non-zero is normal; watch for sustained high values
  • Available Bandwidth: SRT estimates available path bandwidth

In Vajra Cast, all these metrics are visible in the dashboard in real-time, no configuration needed.

Common Pitfalls

  1. Latency too low: causes artifacts when SRT can’t recover packets in time. When in doubt, go higher.
  2. Firewall blocking UDP: SRT uses UDP, not TCP. Make sure your firewall rules are correct.
  3. Mismatched passphrases: connections silently fail if encryption settings don’t match on both sides.
  4. Forgetting to set caller/listener: both sides need to agree on their roles.

Next Steps

Now that you have SRT running:

  • Set up automatic failover with a backup input
  • Configure multi-destination output to distribute your stream
  • Explore SRTLA bonding for mobile production over cellular networks

All of these are built into Vajra Cast and ready to configure from the web interface.