For live and video on demand (VOD) applications that are streaming out to RTSP/RTP for playback on set-top boxes, you can add properties to the application configuration to force the streaming output to MPEG-TS, which is required by many set-top boxes.
Note: Wowza Media Server™ 2.2.4 or later is required.
Configuration
When streaming out using RTSP/RTP, you can force the output to MPEG-TS (which is required by many set-top boxes) by adding the following properties to the RTP/Properties container in [install-dir]/conf/[application]/Application.xml (be sure to get the correct <Properties> container, there are several in the Application.xml file):
<Property> <Name>forceMPEGTSOut</Name> <Value>true</Value> <Type>Boolean</Type> </Property> <Property> <Name>rtpWrapMPEGTS</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
Advanced properties
To control the MPEG-TS output, add the following properties to the Streams/Properties container in [install-dir]/conf/[application]/Application.xml (be sure to get the correct <Properties> container, there are several in the Application.xml file):
<Property> <Name>mpegtsPCRBufferTime</Name> <Value>750</Value> <Type>Integer</Type> </Property> <Property> <Name>mpegtsPacketsPerBlock</Name> <Value>7</Value> <Type>Integer</Type> </Property> <Property> <Name>mpegtsAudioGroupCount</Name> <Value>3</Value> <Type>Integer</Type> </Property> <Property> <Name>mpegtsFlushEveryPacket</Name> <Value>false</Value> <Type>Boolean</Type> </Property> <Property> <Name>mpegtsDebugAACTimecodes</Name> <Value>false</Value> <Type>Boolean</Type> </Property> <Property> <Name>mpegtsAlwaysSendZeroPacketLen</Name> <Value>false</Value> <Type>Boolean</Type> </Property>
Advanced property details
- mpegtsPCRBufferTime: Time (in milliseconds) that the Program Clock Reference (PCR) trails the presentation timestamp (PTS) and decoding timestamp (DTS) of the audio and video packet IDs (PIDs). The default value is 750 milliseconds.
- mpegtsPacketsPerBlock: Number of transport stream (TS) packets per UDP block. Packets are 188 bytes in length. The default value is 7.
- mpegtsAudioGroupCount: Number of audio packets per TS block. The default value is 3.
- mpegtsFlushEveryPacket: When set to true, non-complete UDP packets are sent after each new audio or video packet. The default value is false.
- mpegtsDebugAACTimecodes: For AAC audio packets, set to true to debug the more accurate calculation for converting millisecond time values to a 90kHz clock. The default value is false.
- mpegtsAlwaysSendZeroPacketLen: If you don't want video frames to be wrapped in multiple TS packets for very high bitrate streams, set to true to set packetized elementary stream (PES) packet length to "zero." The default value is false.
Verification
You can verify that MPEG-TS output streams are being created by setting the mpegtsFlushEveryPacket property to true. This should generate the following messages in the [install-dir]/logs/wowzamediaserver_access.log file:
comment server INFO 200 - RTPPacketizerMPEGTS.handleAMFPacket: mpegtsFlushEveryPacket:true
tc[0]: 2816:2816:48000 tc[0]: 2837:2837:48000 tc[0]: 2859:2859:48000
Originally Published: 10-11-2013.
If you're having problems or want to discuss this article, post in our forum.