Configure Microsoft Smooth Streaming packetization in Wowza Streaming Engine

This article describes how to configure properties in Wowza Streaming Engine™ media server software to control how the Smooth Streaming packetizer (smoothstreaming) splits incoming live streams into segments suitable for playback on Silverlight clients.

Note: Wowza Streaming Engine 4.0.0 or later is required.

Configure packetization in Wowza Streaming Engine Manager


  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 (such as live).
     
  3. On the live application page Properties tab, click Smooth Streaming 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 Smooth Streaming 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. All time values are in milliseconds and the values are set on a per-application basis. Refer to the Smooth Streaming segmenter property reference below for more information about the individual properties you can use to manage the Smooth Streaming segmenter for live streams.


     
  5. Click Save, and then restart the application when prompted to apply the changes.
Note: For more information about how to configure properties, see Configure properties

Smooth Streaming segmenter property reference

  • smoothPacketSortTime - Enables Wowza Streaming Engine to sort the Smooth Streaming packets, which improves alignment.
  • smoothAlignAudioWithVideo - Enables Wowza Streaming Engine to align the Smooth Streaming video and audio packets. Alignment is improved if the packets are sorted, so this should be used with the smoothPacketSortTime property.
  • smoothBufferMinFragmentCount - Sets the minimum number of fragments stored in the buffer.
     
  • smoothManifestTargetDuration - Sets the target duration of the manifest data.
     
  • smoothManifestMinFragmentCount - Sets the minimum number of fragments returned in the manifest data.
     
  • smoothRepeaterTargetDuration - Sets the target duration of the fragments sent from the origin to the edge.
     
  • smoothRepeaterMinFragmentCount - Sets the minimum number of fragments immediately sent from the origin to the edge upon initial connection.
     
  • smoothFragmentTargetAudioDuration - Sets the duration of a fragment in milliseconds. 
  • smoothBufferTargetDuration - Sets the target duration of the buffer.  The default value is 50000 milliseconds (50 seconds).

Property details

The audio and video packets from the live encoder enter Wowza Streaming Engine and are segmented separately into video and audio fragments. For video, the duration of a fragment is determined by the keyframe interval (GOP - group of pictures size). A single fragment includes a keyframe followed by any non-keyframes up to the next keyframe. For audio, the fragment duration is determined by the smoothFragmentTargetAudioDuration setting (in milliseconds). Each fragment is then added to the server-side buffer. The duration of the buffer is controlled by the smoothBufferMinFragmentCount and smoothBufferTargetDuration settings. The smoothBufferMinFragmentCount value is the minimum number of fragments stored in the buffer and smoothBufferTargetDuration is the target duration of the buffer.

When the Smooth Streaming player requests the manifest file, Wowza Streaming Engine generates manifest data by inspecting the fragments in the server-side buffer. The duration of the manifest data is controlled by the smoothManifestTargetDuration and smoothManifestMinFragmentCount settings. The smoothManifestMinFragmentCount value is the minimum number of fragments returned in the manifest data and smoothManifestTargetDuration is the target duration of the manifest data.

The live stream repeater system is used to deliver a single live stream in an origin/edge configuration to multiple edge servers. The first time a stream is requested from the edge server, it pulls the already prepared fragments from the origin's buffer to the edge for delivery to the Silverlight player. The smoothRepeaterTargetDuration and smoothRepeaterMinFragmentCount settings control the number of fragments that are immediately sent from the origin to the edge upon initial connection. It's best if these settings are equal to or greater than the smoothManifestTargetDuration and smoothManifestMinFragmentCount settings.
 
Notes:
  • It's best to use a fairly low keyframe interval (GOP size) when streaming to Silverlight. A value between 2 to 4 seconds works well.
     
  • To get an idea of the amount of memory used to store the chunks for a single live stream, use the following formula:
     
    [total-memory-mb] = ([stream-bitrate-kbps]/([1024-kb-per-mb]*[8-bits-per-byte])) * [keyframe-interval-seconds] * [smoothBufferTargetDuration]

    For example, a 500Kbps stream with a 2 second keyframe interval (GOP size) consumes the following amount of memory given the default settings above:
     
    (500/(1024*8)) * 2 * 50 = 6 MB of memory
  • By default, live Smooth Streaming audio and video fragment durations aren't aligned, whereas video-on-demand fragments are aligned. Data packets received by Wowza Streaming Engine are sent to the Smooth Streaming packetizer where the H.264 video and AAC/MP3 audio streams are split into chunks. For more information, see Align live audio and video for Microsoft Smooth Streaming in Wowza Streaming Engine.

Configure Smooth Streaming packetization in XML


If you configured the properties in Wowza Streaming Engine Manager, you can skip this section. If you make changes to [install-dir]/conf/[application]/Application.xml, any supported settings are displayed in Wowza Streaming Engine Manager the next time it's started. You must edit Application.xml in a text editor if you're running Wowza Media Server software.

All time values are in milliseconds.

  1. Use a text editor to open the Application.xml file for your live application. Then add the properties described in the Smooth Streaming segmenter property reference above to the <LiveStreamPacketizer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several in the file.
    <Property>
    	<Name>smoothBufferTargetDuration</Name>
    	<Value>50000</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothBufferMinFragmentCount</Name>
    	<Value>4</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothManifestTargetDuration</Name>
    	<Value>24000</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothManifestMinFragmentCount</Name>
    	<Value>4</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothRepeaterTargetDuration</Name>
    	<Value>24000</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothRepeaterMinFragmentCount</Name>
    	<Value>4</Value>
    	<Type>Integer</Type>
    </Property>
    <Property>
    	<Name>smoothFragmentTargetAudioDuration</Name>
    	<Value>2000</Value>
    	<Type>Integer</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.