|
E-mail us with your comments and feedback about this article. |
You can use URL modifiers to control how players and distribution servers receive a stream. You can also use URL modifers to configure Windows Media Services to pull content from an alternate encoder or other content source after a specified period of time.
|
|
David Nelson
Microsoft Corporation
September 2007
Applies to: Microsoft® Windows Media® Player 9 Series or later Microsoft Windows Media Services 9 Series or later
Contents
IntroductionYou can control how players and distribution servers receive a stream by adding a modifier to the path of a source. When a user opens a URL with a modifier, the Player property that is affected by the modifier is temporarily overridden with the new value. The property returns to the previous value when a user plays content that does not have a modifier.
You add a modifier the same way you would add a query string to an URL. After the URL, add a question mark character (?), followed by the modifier and the modifier value:
http://server/source?modifier=value
Using redundant encoders or other alternate content sources increases the reliability of the source content. If the primary encoder fails or is stopped, you can configure Windows Media Services to pull content from an alternate encoder or other content source after a specified period of time by using URL modifiers in the path to the primary encoder.
The modifier should be added to the src attribute value in a server-side playlist. You add the modifier the same way you would add a query string to an URL. After the URL, add a question mark (?), followed by the modifier and the modifier value:
http://encoder:port?modifier=value
Back to Top
Controlling streaming behavior with URL modifiersYou can control how players and distribution servers receive a stream by adding a modifier to the path of a source. When a user opens a URL with a modifier, the Player property that is affected by the modifier is temporarily overridden with the new value. The property returns to the previous value when a user plays content that does not have a modifier.
You add a modifier the same way you would add a query string to an URL. After the URL, add a question mark character (?), followed by the modifier and the modifier value:
http://server/source?modifier=value
You can combine multiple modifiers with ampersands (&):
http://server/source?modifier1=value&modifier2=value
The modifier can be added anywhere a source value is used or entered, such as a src attribute value in a server-side or client-side playlist. If you need to use multiple modifiers in a playlist, you must do it differently than you would in a URL. This is because playlists are Extensible Markup Language (XML) documents in which the ampersand character (&) has a defined behavior. Therefore, you must explicitly specify the ampersand character and then separate the entries with a semicolon. For example, two modifiers combined would look like this:
http://server/source?modifier1=value&modifier2=value
Controlling Fast Streaming behavior with URL modifiersYou can control how players and distribution servers receive a stream by modifying one or more Fast Streaming properties with URL modifiers. Fast Streaming refers to a group of technologies that improve the perceptive quality of streaming media to the user. By adding a modifier to the path of a source, you can specify certain Fast Streaming properties of individual files and live streams.
The following table describes the Fast Streaming modifiers.
| Modifier | Client | Value description |
|---|
WMBitrate
| Distribution servers
Players
| Specifies the bit rate that the server cannot exceed when delivering a stream in bits per second. When the Fast Cache feature is enabled, you can use this modifier to restrict the amount of bandwidth that the server can use. For example, WMBitrate=100000 restricts the bit rate to a maximum of 100 kilobits per second (Kbps). If this value is greater than any of the per stream bandwidth limits set for the server or publishing point, content will be streamed at the bit rate specified by the limit rather than at the bit rate specified by the modifier.
| WMTime
| Players
| Sets the size of the client buffer. The value is added to the preroll buffer size to determine the total amount of data that is buffered on the client.
You can also use this modifier to set the minimum buffer size to reduce channel-change latency when switching between multicast streams. If Advanced Fast Start is enabled for unicast streaming, the buffer size typically does not increase latency. For more information, see Controlling multicast client buffer behavior with URL modifiers.
| WMCache
| Players
| Specifies whether Fast Cache streaming is enabled. A value of 1 explicitly enables Fast Cache streaming; 0 explicitly disables Fast Cache streaming. When Fast Cache is enabled, the server streams data faster than the client plays it back. The extra data is stored in a cache on the client. By caching data ahead of playback, the client is better able to handle inconsistencies in network bandwidth. If Fast Cache has been disabled on the server, this modifier will have no effect.
| WMContentBitrate
| Distribution servers
Players
| Specifies the maximum bit rate that can be streamed from a source, in bits per second. This modifier is most commonly used with multiple-bit-rate (MBR) streaming content. No stream with a bit rate higher than the value given can be streamed. For example, if an MBR file contains streams at 80 Kbps, 100 Kbps, and 300 Kbps, and WMContentBitrate is set at 150 Kbps, the highest bit rate stream that can be delivered is the 100-Kbps stream. If this value is greater than any of the per stream bandwidth limits set for the server or publishing point, content will be streamed at the bit rate specified by the limit rather than at the bit rate specified by the modifier.
| WMFecPktsPerSpan
| Players
| Defines how many forward error correction (FEC) packets are sent along with the content data packets defined by WMFecSpan. This value must be less than or equal to value specified for WMFecSpan, with a minimum value of 1 and a maximum value of 24.
| WMFecSpan
| Players
| Specifies the number of content data packets that will be covered by the FEC data packets. This value cannot exceed the limit specified in the Forward Error Correction properties dialog box of the server. The maximum value and default setting is 24. If this value is set to 0, FEC is disabled.
| WMReconnect
| Distribution servers
Players
| Specifies the number of times the client should attempt to reconnect to a source if the connection is lost. For example, if the value of this modifier is 3, the client will attempt to reconnect three times. If the value is -1, the client will attempt to reconnect an infinite number of times. If the value is 0, the client will not attempt to reconnect.
You can use a value of 0 if you plan to use a rollover URL. For example, if you configure backup encoders to act as content rollovers, you can set a WMReconnect value of 0 for the primary encoder. If you do that, the client will not attempt to reconnect to that encoder if the connection is lost. Instead the client will immediately roll over to the backup encoder. For example:
<?wsx version="1.0"?> <smil> <media src="http://encoder1:8081?WMReconnect=0" /> <media src="http://encoder2:8081" /> </smil>
| WMThinning
| Players
| Specifies whether intelligent streaming is enabled. If a value of 1 is set, intelligent streaming is used if necessary to maintain as much playback quality as possible when network conditions deteriorate and bandwidth availability is reduced. If a value of 0 is set, intelligent streaming is disabled. With intelligent streaming, the server gracefully reduces the bit rate of a stream to accommodate inconsistencies in the current bandwidth available to a client.
|
Controlling Advanced Fast Start behavior with URL modifiersYou can modify how Windows Media Player uses the Advanced Fast Start feature and buffers content by using URL modifiers. The following table describes the URL modifiers that can be used to minimize startup latency for a unicast.
| Modifer | Description | Value range | Sample value |
|---|
WMStartupProfile
| Disables Advanced Fast Start. By default, Advanced Fast Start is used if it is enabled on the server and supported by the Player.
| 0 to disable
| 0
| WMStartUpBufferSize
| This value is multiplied by the content buffer size to determine the minimum buffer size at the end of Advanced Fast Start acceleration period.
| 1.0 to 9.9 times
| 2.5 times
| WMStartupProfileJitter
| This value is added to the network buffer size calculated by Advanced Fast Start. The network buffer helps to smooth inconsistent data flow caused by network fluctuations.
| 0 or more milliseconds
| 200
| WMStartupProfileCheck
| Disables the check that verifies the buffer size at the end of the Advanced Fast Start acceleration period. If network conditions are good, you can disable this check to improve latency.
| 0
| 0
| WMAccelDurationTCP
| Sets the Advanced Fast Start acceleration period duration when content is streamed using Transmission Control Protocol (TCP). The default with Advanced Fast Start is 18000. In players that do not support Advanced Fast Start, the default is 10000.
| 0 or more milliseconds
| 20000
| WMAccelDurationUDP
| Sets the Advanced Fast Start acceleration period duration when content is streamed using User Datagram Protocol (UDP). The default with Advanced Fast Start is 10000. In players that do not support Advanced Fast Start, the default is 8000.
| 0 or more milliseconds
| 10000
|
Controlling multicast client buffer behavior with URL modifiersWindows Media Player 9 Series or later contains improvements that add efficiencies to the network connection process and minimize startup latency. This allows you to add a URL modifier that specifies the minimum buffer time to the path of a multicast stream. The URL modifier specifies a value for the Network Buffer Time property. The property value is the amount of time in milliseconds (ms) that the Player will buffer before playing the multicast stream. To specify the minimum buffer time for a multicast, add the following modifier to the multicast information (.nsc) file URL:
?WMBufferTime=Value For example, the following multicast URL uses a modifier that sets buffer time to 500 ms.
http://WebServer/Channel1.nsc?WMBufferTime=500 NoteYou can also control multicast client buffer behavior by adding a Network Buffer Time property value below the Cache Expiration Time property in the multicast information file. For example, you can open the file in a text editor, such as Notepad, and then type the following: Network Buffer Time=0x000001F4
In this example, 0x000001F4 is a hexadecimal value that sets the buffer time to 500 ms. Multicast streams cannot be accelerated. Therefore, if the WMBufferTime modifier or Network Buffer Time property values are set to a very low value, the buffer time may not be adequate to handle poor network conditions. Clients may have a poor playback experience as a result.
Back to Top
Controlling encoder failover with URL modifersUsing redundant encoders or other alternate content sources increases the reliability of the source content. If the primary encoder fails or is stopped, you can configure Windows Media Services to pull content from an alternate encoder or other content source after a specified period of time by using URL modifiers in the path to the primary encoder.
The modifier should be added to the src attribute value in a server-side playlist. You add the modifier the same way you would add a query string to an URL. After the URL, add a question mark (?), followed by the modifier and the modifier value:
http://encoder:port?modifier=value
If you need to use both modifiers in the URL, you must explicitly specify the ampersand character (&), and then separate the entries with a semicolon. For example, if you combine the two modifiers, it would look like this:
http://encoder:port?modifier1=value&modifier2=value
The following table describes the URL modifiers that can be used to configure encoder failover when pulling a stream from an encoder.
| Modifer | Description | Value range | Sample value |
|---|
WMNoDataTimeout
| Specifies that, if the server detects that the encoder that is specified in the URL is no longer streaming data, it should switch to an alternate content source, if one is specified in the server-side playlist, after the specified timeout period has elapsed.
Example
http://encoder:port?WMNoDataTimeout=1000
If the encoder that is the primary source of content for the broadcast fails or is interrupted, switch to the alternate content source (if one is specified) after one second.
| 0 or more milliseconds
| 1000
| WMNoDataTimeout2
| Specifies that, if the server detects that the encoder that is specified in the URL is no longer streaming data due to user intervention, it should switch to an alternate content source, if one is specified in the server-side playlist, after the specified timeout period has elapsed.
Example
http://encoder:port?WMNoDataTimeout2=1000
If the encoder that is the primary source of content for the broadcast is stopped due to user intervention, switch to the alternate content source (if one is specified) after one second.
| 0 or more milliseconds
| 1000
|
To enable content rollover in case of encoder failureIn the Windows Media Playlist Editor, expand the playlist, and then expand the smil element to show the elements in the playlist. On the toolbar, click Add element. The Add Media Elements dialog box appears. In Location of content, specify the URL of the encoder that will be the primary source of content for the broadcast. (Optional) Append a URL modifier to the URL of the encoder that will be the primary source of content for the broadcast to enable encoder failover. Repeat steps 2 and 3 to specify the location of the alternate content source for the broadcast. This content will be streamed when the encoder session ends or if there is an interruption in the encoder stream. The alternate content source can be another encoder, an advertisement, a remote publishing point, a playlist, or a digital media file or files. You can change the value of the repeatCount attribute of the smil element to Indefinite if you want the server to switch back to the original encoder in the case of secondary content source failure. For more information about changing attribute settings, see "To change the value of an offline playlist attribute" in Windows Media Services Help. Name and save the new playlist. In the console tree, click the broadcast publishing point for which you want to enable content rollover. In the details pane, click the Source tab. In Content source, click Change. Change <publishing point> content source on <server> appears. In Location, type the name and location of the playlist you created in the first five steps.
Note
Back to Top
|