How to delay a live stream in Windows Media Services 9 Series (836994)



The information in this article applies to:

  • Microsoft Windows Media Services 9 Series

INTRODUCTION

This article discusses certain namespace changes that you can make to the Microsoft Windows Media Services 9 Series to delay a live stream.

Note Do not make these changes on production servers until you determine the effects on the overall server performance and on the experience of the end user. Changes to these settings might hinder the end-user experience under some circumstances. Changes to these settings may also cause server resources to be exhausted. There are very few circumstances when a server administrator would want to change these settings on a production server.

MORE INFORMATION

Warning This article contains information about editing the namespace. Before you edit the namespace, verify that you have a backup copy that you can restore if a problem occurs. If you edit the namespace incorrectly, you can cause serious problems that may require you to reinstall any product that uses the namespace. Microsoft cannot guarantee that problems that result if you incorrectly edit the namespace can be solved. Edit the namespace at your own risk.

Note Changes to these settings apply to all broadcast publishing points on the server.

To enable the delay, follow these steps:
  1. Stop Windows Media Services: Run the net stop wmserver command from the command prompt.
  2. Change to the directory where the namespace file is located (<%SystemRoot%>\system32\Windows media\Server).
  3. Use a text editor such as Notepad to open the ServerNamespace.xml file.
  4. Set the following four namespace parameters, as detailed in steps 5 through 7:
    • BufferingTime
    • Max Data Buffered
    • MaxDataToBufferInMs
    • MaxDataToBufferInBytes
  5. Set the BufferingTime namespace parameter:
    1. Locate and expand the Network Source node.
    2. Locate and expand the Shared Properties sub-node.
    3. Add the BufferingTime value below the Shared Properties sub-node.

      BufferingTime. An integer value that represents time, in milliseconds, to delay the stream (for example, 0x493e0 = 300000ms = 5 min).
       <node name="BufferingTime" opcode="create" type="int32" value="0x493e0" />
      Important Although a Buffering Time property (note the space) may exist, do not modify this value.
  6. Set the Max Data Buffered namespace parameter:
    1. Locate and expand the Network Source node.
    2. Locate and expand the Object Store sub-node.
    3. Locate and expand the Windows Media HTTP Source Plugin sub-node.
    4. Locate and expand the Properties sub-node.
    5. Add the Max Data Buffered value below the Properties sub-node.

      Max data Buffered. An integer value that represents the size, in bytes, of data to buffer. Calculated this value from the time of delay in the stream (in seconds), multiplied by the bit rate of the content. (for example, 300sec x 100000bps / 8 = 3750000 bytes = 0x393870).
       <node name="Max data Buffered" opcode="create" type="int32" value="0x393870" />
  7. Set the MaxDataToBufferInMs namespace parameter and the MaxDataToBufferInBytes namespace parameter:
    1. Locate and expand the Network Source node.
    2. Locate and expand the Object Store sub-node.
    3. Locate and expand the WMS Network Data Source sub-node.
    4. Locate and expand the Properties sub-node.
    5. Add the MaxDataToBufferInMs value and the MaxDataToBufferInBytes value below the Properties sub-node.
      • MaxDataToBufferInBytes. An integer value, in milliseconds, that is expected to be larger than the BufferingTime value that you selected earlier.
         <node name="MaxDataToBufferInMs" opcode="create" type="int32" value="0x927c0" />
      • MaxDataToBufferInBytes. An integer value, in bytes, that is expected to be larger than the Max data Buffered value that you selected earlier.
         <node name="MaxDataToBufferInBytes" opcode="create" type="int32" value="0x7270E0" />
  8. Save the file and then close the file.
  9. Restart Windows Media Services: Run the net start wmserver command from the command prompt.

The following sample code is another representation of the code that you can add to the ServerNamespace.xml file:
 
<node name="Network Source" opcode="create">
     ...
     <node name="Object Store" opcode="create">
          ...
          <node name="WMS Network Data Source" opcode="create">
               ...
               <node name="Properties" opcode="create">
                    ...
                    <node name="MaxDataToBufferInMs" opcode="create" type="int32" value="0x927c0" />
                    <node name="MaxDataToBufferInBytes" opcode="create" type="int32" value="0x7270E0" />
               </node> <!-- Properties -->
               ...
          </node> <!-- WMS Network Source Plugin -->
          ...
          <node name="Windows Media HTTP Source Plugin" opcode="create">
                ...
               <node name="Properties" opcode="create">
                    ...
                    <node name="Max data Buffered" opcode="create" type="int32" value="0x393870" />
               </node> <!-- Properties -->
               ...
          </node> <!-- Windows Media HTTP Source Plugin -->
          ...
     </node> <!-- Object Store -->
     ...
     <node name="Shared Properties" opcode="create">
          ...
          <node name="BufferingTime" opcode="create" type="int32" value="0x493e0" />
     </node> <!-- Shared Properties -->
     ...
</node> <!-- Network Source -->
After you enable this setting, and when you start the publishing point, some clients may receive an error message. Specifically, clients that connect before the buffer has filled will receive an error message.

Modification Type:MajorLast Reviewed:2/18/2004
Keywords:kbinfo KB836994 kbAudDeveloper kbAudITPRO