• How to configure Microsoft Smooth Streaming packetization (smoothstreaming)

    This article describes properties in Wowza Streaming Engine™ media server software that you can use to control how the Smooth Streaming segmenter splits incoming live streams into segments suitable for playback on Silverlight clients.

    Note: Wowza Streaming Engine 4.0.0 or later is required.

    Contents


    Wowza Streaming Engine Manager configuration
    XML configuration

    Wowza Streaming Engine Manager configuration


    You can configure the properties that control how the Smooth Streaming segmenter splits streams in Wowza Streaming Engine™ Manager. Use Streaming Engine Manager to manage the Wowza Streaming Engine media server software.

    Configure properties for live streams

    1. In the manager Welcome page, 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. This article shows how to access and adjust default properties and how to add custom properties in Streaming Engine Manager.

    Smooth Streaming segmenter property reference

    • smoothBufferTargetDuration - Sets the target duration of the buffer.

    • 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.

    Property details


    The audio and video packets from the live encoder enter the Wowza media server 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, the Wowza media server 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-4 seconds seems to work well.

    • To get a rough 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 * 30 = 3.6 MB of memory

    • By default, live Smooth Streaming audio and video fragment durations aren't aligned, whereas video on demand (VOD) fragments are aligned. Data packets received by the Wowza media server 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 How to turn on alignment for live Microsoft Smooth Streaming (smoothstreaming).

    XML configuration


    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 and you're using the Wowza Streaming Engine media server software, any supported settings are displayed in the manager the next time it's started. Wowza Media Server™ software doesn't support Wowza Streaming Engine Manager, so you must edit Application.xml in a text editor if you're running Media Server software. All time values are in milliseconds.

    Configure properties for live streams

    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 such containers 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 the Wowza media server software to apply the changes.


    Originally Published: 10-01-2010.
    Updated: For Wowza Streaming Engine on 11-26-2014.

    If you're having problems or want to discuss this article, post in our forum.