map

The 'srt' directive configures the SRT (Secure Reliable Transfer) context for handling SRT connections in NGINX.

Syntaxsrt { ... }
Defaultnone
Context
Argumentsblock (2)

Description

The 'srt' directive establishes a block for configuring the SRT (Secure Reliable Transfer) module within NGINX. SRT is utilized for secure and efficient video streaming over unpredictable networks. This directive can encapsulate one or more server blocks, which define parameters such as the listen address and the types of forwarding (proxying) allowed. All SRT configurations must be encapsulated within the 'srt' block, making it the foundation of SRT-related settings in the NGINX configuration file.

Within an 'srt' block, directives for handling incoming SRT connections can be specified. For example, individual server blocks can define settings such as the port to listen on and the server to which the traffic should be proxied (either to a TCP service or another SRT destination). This modular design allows for flexibility in configuring multiple services and endpoints under a single SRT context, facilitating the setup of both SRT-to-TCP and TCP-to-SRT proxies, thus catering to various streaming setups and requirements.

Config Example

srt {
    server {
        listen 4321;
        proxy_pass tcp://127.0.0.1:5678;
    }
}

Ensure you correctly define the server context within the srt block to avoid configuration errors.

The directive must not be duplicated; only one srt block should be defined in a configuration to prevent conflicts.

← Back to all directives