When using RTSP/RTP to stream out content, you can force the output to MPEG-TS, which is required by many set-top boxes. With live and VOD Wowza Streaming Engine™ media server software applications, you can add application properties to do this.
Configure the properties to force MPEG-TS output
Add the following properties to the <RTP>/<Properties> container element 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>
Configure advanced properties
To control the MPEG-TS output, add the following properties to the <Streams>/<Properties> container element in [install-dir]/conf/[application]/Application.xml. Be sure to get the correct <Properties> container, there are several in the 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 time stamp (PTS) and decoding time stamp (DTS) of the audio and video packet IDs (PIDs). The default 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 true, incomplete UDP packets are sent after each new audio or video packet. The default 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 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 0 (zero). The default false.
Verify the properties
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/wowzastreamingengine_access.log file:
comment server INFO 200 - RTPPacketizerMPEGTS.handleAMFPacket: mpegtsFlushEveryPacket:true
Another way is to set the mpegtsDebugAACTimecodes property to true. Output similar to the following will then appear in the console when running in standalone mode:
tc[0]: 2816:2816:48000 tc[0]: 2837:2837:48000 tc[0]: 2859:2859:48000