WMS: Understanding End-To-End Latency (321691)



The information in this article applies to:

  • Microsoft Windows Media Services 4.1
  • Microsoft Windows Media Encoder 7.1

This article was previously published under Q321691

SUMMARY

You may notice that a delay time of several seconds can exist between the time a live event actually occurs and the time that event appears in Windows Media Player. This effect is known as latency. Included in this article are some things that you can do to help minimize latency.

Bear in mind that this delay cannot be removed entirely; in even the most controlled environments, five to seven seconds of delay is considered optimal performance and 20-30 seconds delay is more typical. Windows Media uses an architecture that is designed to reach multiple simultaneous networked users with the highest possible quality and compression. Because of this, additional processing time is introduced at the encoder, server, and player.

Also, note that some of the suggestions in this article can cause adverse side effects in streaming or playback, such as higher susceptibility to network interruptions. Make sure that you are aware of any of these side effects that result from changes that are made to your system so that you can restore original settings. Some of these side effects are noted.

MORE INFORMATION

Windows Media Encoder

  • Under Session Properties, click the Profile tab, and then edit the profile settings to change the codec, bitrate, and buffer length settings to affect latency.
  • Do not use profiles that use codec settings that are beyond your needs based on the content you are delivering. For example, if you are presenting a "talking head" discussion with no music content, you get better performance by using a monaural voice codec than by using a CD-quality stereo codec.
  • The lowest latency comes from using profile settings that create the lowest CPU utilization on the encoder. It may become necessary to strike a balance between low latency and high quality when you create an encoder session.

Windows Media Services

  • Follow the steps in the following Microsoft Developer Network (MSDN) article to optimize the throughput on your server:
  • Windows Media Services adds a delay of approximately three seconds for network buffering so that multiple live clients can pull content from the same buffer. This buffer cannot be changed.
  • Chaining multiple Windows Media servers together for distribution purposes adds time for each server in the chain.

Windows Media Player

  • Changing the network buffering does little to reduce latency and can actually cause latency to increase. In this case, it is best to leave this setting at the default of five seconds.
  • Select a fixed network connection that is optimal for your conditions and that will prevent the player from having to negotiate its connection speed with the server. To do this, click Options on the Tools menu, and then click the Performance tab.
  • Setting Video Hardware Acceleration seems to have little effect on latency, although the efficacy of this setting can vary between graphics cards. Note that changing this setting may actually adversely affect playback on some graphics cards, especially older models.

REFERENCES

For more information about a true zero-latency peer-to-peer video connection, visit the following Microsoft Web site:

Media Support in the Microsoft Windows Real-Time Communications Client
http://msdn.microsoft.com/library/en-us/ dnwxp/html/mediainrtcclient.asp


Modification Type:MajorLast Reviewed:1/19/2004
Keywords:kbDSWWMM2003Swept kbinfo KB321691