Generate and control MPEG-TS output for set-top boxes in Wowza Streaming Engine

For live and VOD Wowza Streaming Engine™ media server software applications that are streaming out to RTSP/RTP for playback on set-top boxes, you can add application properties to force the streaming output to MPEG-TS, which is required by many set-top boxes.

Configure the properties to force MPEG-TS output


Add 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>

Configure 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 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, incomplete 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 0 (zero). The default value is 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/wowzamediaserver_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 can then be observed in the console when running in standalone mode:

tc[0]: 2816:2816:48000
tc[0]: 2837:2837:48000
tc[0]: 2859:2859:48000