The Stream Targets feature in Wowza Streaming Engine™ media server software allows you to send live streams to widely distributed destinations. For example, you can send a live stream from Wowza Streaming Engine to any Secure Reliable Transport (SRT) destination. This allows you to use the SRT destination to deliver the stream to viewers.
This article explains how to set up Wowza Streaming Engine so that you can send a single live stream to any generic SRT destination for distributed delivery. If you're ingesting a source stream in multiple bitrates or transcoding in Wowza Streaming Engine and want to send an adaptive bitrate set of streams to your destination, you must create a Stream Target for each rendition and configure a corresponding stream in your destination. The process will be similar to what's documented here, but see the documentation provided by the destination CDN or service for help configuring it to ingest multiple bitrate streams.
Notes:
- Wowza Streaming Engine 4.7.3 or later is required to use the Stream Targets feature to send streams to SRT destinations.
- Important: SRT stream targets are only supported in Linux and Windows installations of Wowza Streaming Engine.
- If using the Wowza Streaming Engine 4.8.0 or later installer to install a new instance of Wowza Streaming Engine on Windows, you may need to install additional dependencies in order to ingest SRT MediaCaster streams or use the generic SRT stream targets destination to publish an SRT stream. To address this, install the latest version of the Microsoft Visual C++ Redistributable for Visual Studio appropriate to your operating system. This is not an issue for pre-existing installations of Wowza Streaming Engine that are updated to Wowza Streaming Engine 4.8.0 or later.
Contents
Configure the SRT destination to receive and distribute the stream
Create a stream target to send the stream to the SRT destination
Enable Stream Targets
Test the connection
More resources
Configure the SRT destination to receive and distribute the stream
Your SRT destination might be almost anything—a third-party CDN or a video-sharing site, perhaps. Sign in to the destination's dashboard or video management tool and create an application or stream that will deliver the live event to viewers. You may need to provide the site with information about your Wowza Streaming Engine setup such as the IP address of the server running Wowza Streaming Engine. You can find the IP address in the Connection Settings panel of the Home page of Wowza Streaming Engine Manager.
After you've configured the live stream or application in the MPEG-TS destination, make note of the stream name and host domain or IP address. You'll need this information when you create the live application in Wowza Streaming Engine that sends the stream to the SRT destination.
Create a stream target to send the stream to an SRT destination
After creating a Live application in Wowza Streaming Engine, it must be configured to send the stream to an SRT destination. When sending the stream via a stream target, Wowza Streaming Engine functions in SRT caller mode when establishing a handshake with a peer. For more information about specific SRT settings outlined below, see The SRT Deployment Guide from the SRT alliance.
- In the contents panel, click Stream Targets and then click Add Stream Target.
- On the Add Stream Target page under Generic Target Destinations click SRT.
- On the SRT Configuration page, provide the following information:
- Stream Target Name - A descriptive name for this target setup in Wowza Streaming Engine. The name must be unique and can't contain less-than (<), greater-than (>), colon ( : ), quotation (' and "), forward slash (/), backslash (), pipe (|), question mark (?), asterisk (*), double-dot (..), or tilde (~) characters. For clarity, we recommend including the bitrate in the Stream Target Name.
- Source Stream Name - The name of the incoming stream that you specified in Wowza Streaming Engine when you set up the video source.
- Destination Host - The hostname or IP address of the SRT destination.
- Destination Port - The port number for your connection.
Note: The Destination Port must be an even numbered port. The Wowza Streaming Engine then reserves the next odd numbered port to listen for RCTP communication.
- Latency - (Wowza Streaming Engine 4.8.5 and later) The latency, in milliseconds. This is the time it takes for a UDP packet to be sent and delivered, including the time required to account for sending and retransmitting lost packets. The Latency value should be 2.5 * the round trip time (RTT). When peers set different latency values, the higher of the two values applies to both peers. The minimum supported value is 120. If not specified, the default value of 400 is used.
- Too Late Packet Drop - (Wowza Streaming Engine 4.8.5 and later) Specifies whether all packets that are received late are dropped.
- Timestamp Based Delivery Mode - (Wowza Streaming Engine 4.8.5 and later) Specifies whether the SRT time-stamp based packet delivery mode is enabled.
- Send Buffer Size - (Wowza Streaming Engine 4.8.5 and later) The send buffer size, in bytes. If not specified, the default value of 12058624 is used. The default value is calculated from the formula 8192 * (Maximum Transfer Unit - 28), where Maximum Transfer Unit is 1500 by default and 28 bytes is the IP and UDP header size.
- Send UDP Buffer Size - (Wowza Streaming Engine 4.8.5 and later) The send buffer size for UDP connections, in bytes. If not specified, the default, 65536, is used.
- Receive Buffer Size - (Wowza Streaming Engine 4.8.5 and later) The receive buffer size for UDP connections, in bytes. If not specified, the default value of 12058624 is used. The default value is calculated from the formula
8192 * (Maximum Transfer Unit - 28), where Maximum Transfer Unit is 1500 by default and 28 bytes is the IP and UDP header size. - Receive UDP Buffer Size - (Wowza Streaming Engine 4.8.5 and later) The receive buffer size for UDP connections, in bytes. If not specified, the default value of 12288000 is used. The default value is calculated from the formula
8192 * Maximum Transfer Unit, where Maximum Transfer Unit is 1500 by default. - Maximum Transfer Unit - (Wowza Streaming Engine 4.8.5 and later) The maximum size for a unit of transfer data, in bytes. Only increase this value greater than the default if using a controlled network that supports jumbo frames. For MPEG-TS streams, use the default, 1500, which is the size of the UDP packet used for SRT.
- Flight Flag Size - (Wowza Streaming Engine 4.8.5 and later) The maximum number of bytes that can be sent without being acknowledged. If not specified, the default value of 25600 is used.
- Maximum Bandwidth - (Wowza Streaming Engine 4.8.5 and later) The maximum bandwidth, in bytes per second, that the connection can use. Valid values are -1 (infinite), 0 (calculated from Input Bandwidth and Overhead Bandwidth), and integers greater than 0 for an absolute limit in bytes per second. If not specified, the default value of -1 (infinite) is used.
- Input Bandwidth - (Wowza Streaming Engine 4.8.5 and later) If Maximum Bandwidth is set to 0, Input Bandwidth specifies the maximum bandwidth along with the Overhead Bandwidth value using this formula: Maximum Bandwidth = Input Bandwidth * (100 + Overhead Bandwidth)/100. If set to the default, 0, then input bandwidth is estimated from the rate of input during transmission.
- Overhead Bandwidth - (Wowza Streaming Engine 4.8.5 and later) If Maximum Bandwidth is set to 0, Overhead Bandwidth specifies the maximum bandwidth along with the Input Bandwidth value using this formula: Maximum Bandwidth = Input Bandwidth * (100 + Overhead Bandwidth)/100. If not specified, the default value of 25 is used.
- Connect Timeout - (Wowza Streaming Engine 4.8.5 and later) The length of time that Wowza Streaming Engine waits for a target to respond to a connection request, in milliseconds. If not specified, the default value of 3000 is used.
- Stream ID - (Wowza Streaming Engine 4.8.5 and later) A string sent on the socket prior to connecting. Length is a maximum of 512 characters. If using a Stream ID, a peer connection must have a minimum SRT version of 1.3.
- UDP Payload Size - (Wowza Streaming Engine 4.8.5 and later) The maximum payload size sent in one UDP packet, in bytes. Valid values are 0 (unlimited) to 1456. If not specified, the default value of 1316 is used.
- Number of Times to Print Statistics - (Wowza Streaming Engine 4.8.5 and later) How many times stream statistics are written into the log after the stream starts. Statistics are logged each second. Set to -1 to log statistics indefinitely. If not specified, the default value of 0 is used.
- Secure SRT - Select the Use secure SRT check box if your source stream is secured with AES encryption. If Use secure SRT is selected, you must specify the Key Length and Passphrase.
- Key Length - The type of AES encryption. AES-128 uses a 128-bit passphrase, AES-192 uses a 192-bit passphrase, and AES-256 uses a 256-bit passphrase.
- Passphrase - The passphrase used to secure the SRT stream. It must be between 10 and 79 characters in length.
- Key Refresh Rate - (Wowza Streaming Engine 4.8.5 and later) The number of packets to be transmitted with an encryption key before switching to a new key. If not specified, the default value of 16777216 is used.
- Key Announce - (Wowza Streaming Engine 4.8.5 and later) The interval between when a new encryption key is sent and when switchover occurs. This value also applies to the subsequent interval between when switchover occurs and when the old encryption key is decommissioned. If not specified, the default value of 4096 is used.
Note: The source stream must be secure for the SRT stream target to use Secure SRT settings. If the source stream is not secure, the stream target's Secure SRT settings aren't used.
- Click Add this target.
Note: If you're sending a stream that has multiple bitrates to your SRT target, you must create a stream target for each rendition. Repeat the steps above in Create a stream target to send the stream to the SRT destination for each rendition that you want to send to the SRT destination for adaptive bitrate playback. The easiest way to do this is to create the first stream target, and then click the Copy icon for the target and change the Stream Target Name, Source Stream Name, and Destination Stream Name in the new target. For clarity, we recommend including the bitrate in the Stream Target Name.
Enable Stream Targets
Before you stream, you must enable the Stream Targets feature for the Wowza Streaming Engine application or the individual stream target you created.
- In the contents panel of your application, if you don't see a checkmark next to Stream Targets, click Stream Targets in the contents panel and then click Enable Stream Targets.
When Stream Targets is enabled, a checkmark appears next to Stream Targets in the contents panel and the Stream Targets page shows Status is Enabled.
- If the Status of an individual stream target is Disabled, click the Enable icon for the stream in the Actions column.
- When prompted, click Restart Now so your change takes effect.
When a stream target is enabled, its status on the Stream Targets page is one of the following:
- Waiting. The target is enabled but not yet pushing the stream to the target destination because either the target's configured source stream isn't connected to the Wowza Streaming Engine input or Wowza Streaming Engine hasn't finished initializing the connection to the target destination.
- Active. The stream is actively being pushed to the configured Destination Host IP address and Destination Port(s). The status may also appear as Active if Wowza Streaming Engine is attempting to connect to the SRT destination, but will change to Waiting or Error if the connection fails.
- Error. The Wowza Streaming Engine instance unsuccessfully tried to push the stream to the configured Destination Host IP address and Destination Port(s). Make sure the target's configured source stream is connected to the Wowza Streaming Engine input. Errors might be due to an invalid target configuration.
Test the connection
Configure your encoder and then test the live stream.
- Start the stream in the H.264 camera or encoder that's sending the stream to your application in Wowza Streaming Engine. The application ingests the live stream and sends it to SRT.
- In Wowza Streaming Engine Manager, verify that the stream is working:
- Click Incoming Streams in the contents panel and then click the stream name. The stream detail page displays the Status of the stream (Active) as well as details about connections, uptime, and throughput for the live stream.
- Click Stream Targets in the contents panel. The Status of the target should be Active.
- Click Incoming Streams in the contents panel and then click the stream name. The stream detail page displays the Status of the stream (Active) as well as details about connections, uptime, and throughput for the live stream.
- Verify that your SRT destination is receiving, publishing, and distributing the stream as you've configured it to do.
- Stop the stream in the source camera or encoder to end your test connection.