Recasting UDP->SRT
UDP is a lightweight, connectionless protocol that facilitates the rapid transmission of data without establishing a persistent connection between the sender and receiver. While this makes UDP ideal for low-latency applications, it comes with drawbacks such as the lack of retransmission for lost packets, limited error correction, and no inherent security features. These limitations can pose challenges, especially in networks with fluctuating reliability or when secure transmission is required.
SRT (Secure Reliable Transport) addresses these limitations by offering a connection-oriented protocol designed for high-performance, low-latency streaming. It enhances reliability through packet retransmission and error recovery while providing robust security via optional encryption. Recasting UDP streams to SRT allows for a more resilient and secure data transmission path, making it ideal for scenarios where stream quality and security are paramount.
This application provides an easy way to recast UDP streams into SRT streams. With the optional encryption feature, you can secure your streams using industry-standard encryption algorithms, protecting the content from unauthorized access. Whether you’re streaming live video, audio, or data, converting to SRT ensures better stream integrity, adaptability to network conditions, and the flexibility to meet security requirements.
The following sections will guide you through the steps to configure UDP-to-SRT recasting, enable optional encryption, and optimize stream delivery for your specific needs.
Configuration
To configure an SRT channel, users need to define the parameters for either the source (input) or target (output) of the stream. This setup involves selecting the SRT protocol, and configuring essential connection details such as IP address and port. These parameters form the foundation of the SRT channel and ensure proper connectivity between sender and receiver.
SRT Parameters
Optional Advanced Settings:
- Latency. Configure the latency value to optimize stream performance. Latency is measured in milliseconds and helps balance low delay and stable transmission, especially in variable network conditions.
- Stream ID. If required, specify a unique Stream ID for the connection. This is particularly useful in scenarios where multiple streams are multiplexed over the same SRT connection.
- Encryption. Enable encryption to secure the stream. You can specify the encryption key length (e.g., 128-bit, 256-bit) and provide a passphrase. Encryption protects the content from unauthorized access, ensuring secure end-to-end transmission.
By correctly configuring these parameters, users can establish robust and secure SRT channels tailored to their streaming requirements. The following sections will provide detailed steps and examples for setting up and testing SRT channel configurations.
SRT Statistics
SRT provides a comprehensive set of statistical metrics to monitor socket performance and identify potential issues.
Statistics are independently calculated on each side (receiver and sender) and are not exchanged between peers unless explicitly specified.
To open the statistics window, click the "SRT Statistics" button, which will appear for either the source or target.
Receiver:
Sender:
Types of Statistics
-
Accumulated: The statistic is accumulated from the moment an SRT socket is created.
-
Interval-based: The statistic is accumulated over a specified time interval starting from the time an SRT socket is created.
-
Instantaneous: The statistic is obtained at the exact moment the query function is called.
YAML Configuration
This example demonstrates how to configure the recaster to receive a multicast stream on the address 227.1.1.1 and port 30120, and then forward it to an SRT target. The recaster will attempt to establish a connection with the specified SRT target before transmitting data. If the connection cannot be established, an error message will be displayed at the target.
platforms:
- name: UAV1
description: First platform
channels:
- name: EO-IR
description: First channel
input:
name: EO/IR
description: EO/IR-1 camera
url: udp://227.1.1.1:30120
outputs:
- name: EO/IR-1-OUT
description: EO/IR-1 output
url: srt://192.168.1.42:8090?localaddr=192.168.1.42&latency=2000
If you need to enable encryption, you can add the following parameters to the SRT URL:
srt://192.168.1.42:8090?localaddr=192.168.1.42&latency=2000&passphrase=1234567890&pbkeylen=16