Configure OBS Studio SRT Stream with Passphrase
Secure Reliable Transport (SRT) is a high-performance streaming protocol that offers low latency and robust transmission over unstable networks. To protect your broadcast from unauthorized access, you can secure your stream using AES encryption. This guide will show you how to construct a custom SRT connection string with an encryption passphrase and apply it directly within OBS Studio.
Understanding the SRT Connection String Structure
To enable encryption, you must append specific parameters to your standard SRT destination URL. The syntax for an encrypted SRT connection string in OBS Studio is formatted as follows:
srt://[destination_ip]:[port]?mode=caller&latency=[ms]&passphrase=[your_passphrase]&pbkeylen=[key_length]
Key Parameters Explained:
- srt://[destination_ip]:[port]: Replace this with the IP address (or domain) and port number of your receiving server or ingest point.
- mode=caller: Instructs OBS Studio to initiate the connection to the receiver.
- latency=[ms]: (Optional) The buffer latency in
milliseconds (e.g.,
latency=120000for 120ms). It should match the receiver’s latency settings. - passphrase: The shared password used to encrypt and decrypt the stream. This must be between 10 and 79 characters long.
- pbkeylen: The Crypto key length in bytes. Choose
from
16(AES-128),24(AES-192), or32(AES-256). This must match the receiver’s configured key length.
Example Connection String:
srt://stream.example.com:9000?mode=caller&passphrase=MySecureStreamPass123&pbkeylen=32
Steps to Configure OBS Studio
Once you have constructed your custom connection string, follow these steps to input it into OBS Studio:
- Open OBS Studio.
- Click on Settings in the bottom-right Controls dock, or go to File > Settings in the top menu.
- In the Settings window, select the Stream tab from the left sidebar.
- Set the Service dropdown menu to Custom….
- In the Server input field, paste your fully
constructed SRT connection string (e.g.,
srt://stream.example.com:9000?mode=caller&passphrase=MySecureStreamPass123&pbkeylen=32). - Leave the Stream Key field completely blank. All routing and authentication details are already handled by the custom string in the Server field.
- Click Apply and then OK to save your settings.
You can now click Start Streaming in OBS Studio. Your broadcast will be encrypted using the specified AES key length before it leaves your computer, ensuring a secure transfer to your destination server.