Learn about MPEG-TS and SRT output tuning options for Wowza ClearCaster™ broadcasts.
Notes:
- Wowza ClearCaster supports SRT version 1.4.
- Adaptive network encoding over SRT is not currently supported.
MPEG-TS Output URLs
When you create a broadcast with an MPEG-TS or SRT output from a ClearCaster appliance, use the built-in Other destination. For the Encoding Template, select either Output MPEGTS UDP or Output SRT. You can send multicast or unicast MPEG-TS streams.
With this setup, you'll need to provide a JSON-formatted output URL to set up your broadcast. This URL includes a number of tuning parameters for the output stream.
For example, an MPEG-TS stream looks something like this:
url: "{\"url\":\"udp://192.168.1.22:1234\",\"implementation\":\"notifypacket\"}"
While an SRT stream looks something like this:
url: "{\"url\":\"udp://192.168.1.22:1234\",\"implementation\":\"srt\"}"
Notes:
- The port specified in the Output URL automatically updates the port that the ClearCaster appliance uses for streaming while a broadcast is live.
- If you're including an Output URL in a custom template, you'll need to include a JSON escape using a backslash (\) like those in the examples above.
- If you're manually adding the Output URL to a field in the Create Broadcast dialog, you don't need to include a JSON escape using a backslash (\). For example:
- url: {"url":"udp://192.168.1.22:1234","implementation":"notifypacket"}
- url: {"url":"udp://192.168.1.22:1234","implementation":"srt"}
Tuning parameters
You can include parameters in the URL JSON object to tune your MPEG-TS or SRT output.
Required parameter for all output URLs
Parameter | Data Type | Description |
---|---|---|
url | String | The output URL with a port number. For example, upd://239.0.0.1:1234. |
Notifypacket and SRT parameters
Use these tuning parameters for MPEG-TS or SRT streams, unless otherwise specified.
Parameter | Data Type | Description |
---|---|---|
implementation | String | The implementation for the output stream. Use notifypacket for MPEG-TS and srt for SRT. Default is notifypacket. |
pmtInterval | Integer | The time, in milliseconds, between PMT packets. Default is 1000. |
mpegtsAudioGroupCount | Integer | The number of audio packets per PES packet. Default is 3. |
pcrBufferTime | Integer | The time, in milliseconds, that the PCR clock runs behind the video DTS. Default is 200. |
mpegtsPacketsPerBlock | Integer | The number of 188-byte TS packets per UDP packet. Default is 7. |
mpegtsAlwaysSendZeroPacketLen | Boolean | If true, always sends PES lengths of 0. Default is true. |
pacingRate | Double | A value used to calculate the pacing rate of the socket (totalBitrate * pacingRate) for MPEG-TS streams only. Default is 1.25. |
srtSocketSettings | Array | An array of SRT socket settings for SRT streams only. For example, "srtSocketSettings":[{"option":"SRTO_SNDBUF","value":65000,"type":"Integer"}] Default is an empty array, []. |
SRT socket settings
Use these settings and their values in an array for the srtSocketSettings parameter. Specify the option, value, and type for each object in the array, as shown in the example above.
Option | Data Type | Description |
---|---|---|
SRTO_MSS | Integer | The maximum segment size. Default of 1500 is the maximum size of the UDP packet and can be only decreased, unless under unusual dedicated network settings. |
SRTO_SNDSYN | Boolean | If true, synchronous (blocking) send mode is enabled. Default is true. |
SRTO_RCVSYN | Boolean | If true, synchronous (blocking) receive mode is enabled. Default is true. |
SRTO_ISN | Integer | The value of the ISN (Initial Sequence Number), which is the first sequence number put on the first sent UDP packet carrying SRT data payload. Valid only for sockets after srt_connect or srt_accept. |
SRTO_FC | Integer | The flight flag size (window size). Default is 25600. |
SRTO_SNDBUF | Integer | The maximum buffer in the sending queue. Default is 8192 × (1500-28). |
SRTO_RCVBUF | Integer | The size of the UDT receiving buffer. Default is 8192 × (1500-28). |
SRTO_LINGER | Integer | The number of seconds that the socket waits for unsent data when closing. Default is 180. Recommended value for SRT is 0. |
SRTO_UDP_SNDBUF | Integer | The size of the UDP sending buffer. Default is 65536. SRT recommended value is 1024*1024. |
SRTO_UDP_RCVBUF | Integer | The size of the UDP receiving buffer. Default is 8192 × 1500. |
SRTO_RENDEZVOUS | Boolean | If true, enables the rendezvous connection mode. Default is true. |
SRTO_SNDTIMEO | Integer | Sends a timeout in milliseconds. Default is -1. |
SRTO_RCVTIMEO | Integer | Receives a timeout in milliseconds. Default is -1. |
SRTO_REUSEADDR | Boolean | If true, reuses an existing port instead of creating a new one. Default is true. |
SRTO_MAXBW | Integer | The maximum bandwidth, in bytes per second, that the connection can use. Default is -1, infinite. SRT recommended value is 0, relative to input rate. |
SRTO_STATE | Integer | The current UDT connection state. Read-only. |
SRTO_EVENT | Integer | The current available events associated with the socket. Gets bit flags set according to the current active events on the socket. Read-only. |
SRTO_SNDDATA | Integer | The size of data in the sending buffer. |
SRTO_RCVDATA | Integer | The size available data in the receive buffer. |
SRTO_SENDER | Integer | The sender mode for encryption or TSBPD handshake, independent of the connection mode. Default is false. |
SRTO_TSBPDMODE | Integer | If true, enables timestamp-based packet delivery mode (TSBPD). Default is true. Tx set origin timestamp, Rx deliver packet at origin time plus delay. |
SRTO_LATENCY | Integer | This flag sets both SRTO_RCVLATENCY and SRTO_PEERLATENCY to the same latency value, in milliseconds. Default is 0.Note: To determine the recommended value for SRTO_LATENCY, perform a test broadcast to the intended destination, and make note of the Round Trip Time displayed in the Wowza ClearCaster Manager Monitor tab. The SRTO_LATENCY value should be four times the Round Trip Time for the test broadcast. |
SRTO_TSBPDDELAY | Integer | Deprecated. Use SRTO_LATENCY instead. |
SRTO_INPUTBW | Integer | The estimated input stream rate or sender nominal input rate, in bytes per second. Default is 0. |
SRTO_OHEADBW | Integer | The maximum bandwidth ceiling based on percentage over input stream rate. Applies when UDT_MAXBW is 0 (auto). Default is 25%. |
SRTO_PASSPHRASE | String | The password-based key derivation function 2 (PBKDF2) passphrase. Default is 0, with crypto disabled. |
SRTO_PBKEYLEN | Integer | The crypto key length in bytes {16, 24, 32}. Default is 16 (128-bit) if you've set a passphrase. If you don't have cryto enabled, default is 0. |
SRTO_KMSTATE | Integer | The keying material exchange status (UDT_SRTKmState). |
SRTO_IPTTL | Integer | The IPv4 time to live (passthrough for system sockopt IPPROTO_IP/IP_TTL). |
SRTO_IPTOS | Integer | The IPv4 type of service (passthrough for system sockopt IPPROTO_IP/IP_TOS). |
SRTO_TLPKTDROP | Integer | If true, enables receiver packet drop. Default is true. |
SRTO_SNDDROPDELAY | Integer | The extra delay towards latency for sender TLPKTDROP decision. Default is 0. Use -1 to turn off the setting. |
SRTO_NAKREPORT | Boolean | If true, enables the receiver to send periodic NAK reports until a lost packet is retransmitted or intentionally dropped. Default is true. |
SRTO_VERSION | Integer | The local SRT version. |
SRTO_PEERVERSION | Integer | The peer SRT version from the SRT handshake. |
SRTO_CONNTIMEO | Integer | The connection timeout, in milliseconds. Default is 3000. The connect timeout is 10 times the value set for the rendezvous mode. |
SRTO_SNDKMSTATE | Integer | The current state of the encryption on the peer side. Valid values:
|
SRTO_RCVKMSTATE | Integer | The current state of the encryption on the agent side. Valid values:
|
SRTO_RCVLATENCY | Integer | The TsbPd receiver delay, in milliseconds, to absorb a burst of missed packet retransmission. In live mode, default is 120. In buffer mode, default is 0. |
SRTO_PEERLATENCY | Integer | The minimum value of the TsbPd receiver delay, in milliseconds, for the opposite, peer side. Default is 0. |
SRTO_MINVERSION | Integer | The minimum SRT version needed for the peer. Peers with an earlier version will be rejected from connecting. Default is 0. |
SRTO_STREAMID | String | A string set to a socket and passed to the accepted socket of the listener. Limited to 512 characters. See SRT Access Control Guidelines for more information. |
SRTO_CONGESTION | String | The congestion controller used for the socket transmission. The type must be exactly the same on both connecting parties, or the connection is rejected. Default is live. |
SRTO_MESSAGEAPI | Boolean | If true, uses the message API. Default is true. |
SRTO_PAYLOADSIZE | Integer | The maximum payload size sent in one UDP packet. For live mode, default is 1316. Use 0 if unlimited. |
SRTO_TRANSTYPE | Integer | The transmission type for the socket. This setting sets parameters associated with the selected type to their default values. Valid values:
|
SRTO_KMREFRESHRATE | Integer | The number of packets to be transmitted after which the encryption key is switched to a new key. |
SRTO_KMPREANNOUNCE | Integer | 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. |
SRTO_STRICTENC | Boolean | If true, both connection parties must have the same password set (including empty, that is, with no encryption). If the password doesn't match or only one side is unencrypted, the connection is rejected. Default is true. |
SRTO_IPV6ONLY | Integer | Sets a system socket flag IPV6ONLY. When set to 0, a listening socket binding an IPv6 address also accepts IPv4 clients so that their addresses are formatted as IPv4-mapped IPv6 addresses. Default is -1, meaning this option is not set and the platform default value is used. |
SRTO_PEERIDLETIMEO | Integer | The peer-idle timeout, in milliseconds. The maximum time of silence heard from a peer. If this time is passed, connection is considered broken on timeout. Default is 5000. |