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.
Based on the encoder type, follow one of these articles to set up an application for live streaming:
- Set up live streaming using an RTMP-based encoder in Wowza Streaming Engine
- Set up live streaming using an RTSP/RTP-based encoder in Wowza Streaming Engine
- Publish and play a live stream (MPEG-TS based encoder) in Wowza Streaming Engine
- Set up live streaming using a native RTP encoder with SDP file in Wowza Streaming Engine
- Re-stream video from an IP camera (RTSP/RTP re-streaming) in Wowza Streaming Engine)
Ensure that Apple HLS is enabled in the Playback Types in the application for which you're configuring these properties.
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.
Wowza Streaming Engine Manager configuration
- In Wowza Streaming Engine Manager, click the Applications tab at the top of the page.
- In the Applications contents panel, click the name of your live application (such as live).
- On the live 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.
- 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.
- Click Save, and then restart the application when prompted to apply the changes.
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]/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:
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.