Debug AAC or MP3 timecode issues with Apple HLS packetization in Wowza Streaming Engine

This article describes how to report information about AAC and MP3 timecodes for Wowza Streaming Engine™ media server software live applications to help debug time drift issues.

Note: This article describes a debugging method only. It doesn't prescribe fixes to correct any drift problems that are identified by in the additional logging.

Before you start


You should complete the following tasks:

  • Start Wowza Streaming Engine in standalone mode (not as a system service). This is required because the debug statements are written to the console and not to the Wowza logs. For instructions, see Start and stop Wowza Streaming Engine.
  • Ensure that Apple HLS is enabled in the Playback Types in the application for which you're configuring these properties.

Wowza Streaming Engine Manager configuration


  1. In Wowza Streaming Engine Manager, click the Applications tab at the top of the page.
     
  2. In the Applications contents panel, click the name of your live application.
     
  3. On the application page Properties tab, click Cupertino Streaming Packetizer in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.

     
  4. Click Edit in the Cupertino Streaming Packetizer properties area. To enable a property, select the Enabled check box for the property. You can also change the value for an enabled property from its default setting. These properties are set on a per-application basis. Both debugAACTimecodes and debugMP3Timecodes have a default value of false.


     
  5. Click Save, and then restart the application when prompted to apply the changes.

XML configuration


Alternatively, you can configure the application properties in XML instead of Wowza Streaming Engine Manager. To do so, you'll need to edit the [install-dir]/conf/[application-name]/Application.xml file by using a text editor. Add the following properties to the LiveStreamPacketizer/Properties container. Be sure the to add the properties to the correct <Properties> container on Application.xml. There are several in the file.

<Property>
    <Name>debugAACTimecodes</Name>
    <Value>true</Value>
    <Type>Boolean</Type>
</Property>
<Property>
    <Name>debugMP3Timecodes</Name>
    <Value>true</Value>
    <Type>Boolean</Type>
</Property>

Checking packet timecode values


After the properties are in place, you should see the following statements AREA written to the console window:

tc[difference]: [calculatedTimecode]:[packetTimecode]:[sampleRate]

What we're doing here is comparing the packet timecode values to a calculated time that's based on the assumption that there are no missing samples and that each packet contains 1024 samples. If there's no drift between the encoder clock and the AAC or MP3 clock, then the [difference] should be 0 or 1. If there is a drift, then you'll see [difference] numbers greater than 1.