Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
 Supported Media Formats, Protocols,...
Silverlight 2
Supported Media Formats, Protocols, and Log Fields (Silverlight 2)
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This topic describes the formats and protocols supported by the MediaElement object. It also describes the MediaElement object's support for streaming and stream selection.

This topic contains the following sections.

The MediaElement object supports the following formats. These encodings are supported regardless of the file name extension.

Video:

  • WMV1: Windows Media Video 7

  • WMV2: Windows Media Video 8

  • WMV3: Windows Media Video 9

  • WMVA: Windows Media Video Advanced Profile, non-VC-1

  • WMVC1: Windows Media Video Advanced Profile, VC-1

Audio:

  • WMA 7: Windows Media Audio 7

  • WMA 8: Windows Media Audio 8

  • WMA 9: Windows Media Audio 9

  • MP3: ISO/MPEG Layer-3

    • Input: ISO/MPEG Layer-3 data stream

    • Channel configurations: mono, stereo

    • Sampling frequencies: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, and 48 kHz

    • Bit rates: 8-320 kbps, variable bit rate

    • Limitations: "free format mode" (see ISO/IEC 11172-3, sub clause 2.4.2.3) is not supported.

Playlists

A Server Side Play List (SSPL) as it is available for Silverlight, is a sequence of media elements (either audio or video) that allows the server administrators to control the sequence of streaming media viewed by the user as well as other behaviors. This playlist can be created statically or dynamically. A Server Side Playlist can be used to serve media for either On Demand or Broadcast streams. See Server Side Playlists for more information.

MediaElement also supports playlists in the form of Advanced Stream Redirector (ASX) files, also known as Windows Media metafiles. Although the file name extension does not matter, these files typically have a .asx, .wax, .wvx, .wmx, or .wpl extension. For more information about these file types, see Windows Media Metafiles.

Note:

The following features of ASX files are not supported in Silverlight .

ASX feature

Description

PreviewMode Attribute

This attribute is found on the root ASX object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE.

BannerBar Attribute

This attribute is found on the root ASX object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE.

SkipIfRef

This attribute is found on the root ENTRY object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE.

PARAM Element

This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.

REPEAT Element

This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.

EVENT Element

This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.

STARTMARKER Element

This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.

ENDMARKER Element

This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.

Invalid content

If a valid ASX tag has content that is not accepted (for example, a MOREINFO tag contains a REF tag), a MediaFailed error is raised.

Fallback URLs

If an ENTRY tag has multiple REF children, only the first one is read. Unlike WMP, Silverlight will not attempt to open additional REF URLs in case the first one fails, and a MediaFailed error is raised.

For more information on ASX elements, see ASX Elements Reference.

The following formats are not supported:

  • Interlaced video content

  • Windows Media Screen

  • Windows Media Audio Professional

  • Windows Media Voice

  • Combination of Windows Media Video and MP3 (WMV video + MP3 audio)

  • Windows Media Video using odd (not divisible by two) dimensioned frames; for example, 127 x 135

The following Web protocols/schemes are supported:

  • http

  • https

  • mms (You can use an mms URL, but it will fall back to http.)

  • rtsp (You can use an rtsp URL, but it will fall back to http.)

  • rstpt (You can use an rtspt URL, but it will fall back to http.)

In addition to progressive downloads, MediaElement supports live and on-demand streaming from a Windows Media Server. If the media Uniform Resource Identifier (URI) specifies the mms scheme, the MediaElement attempts to stream the file first. If the file cannot be streamed, it downloads the file progressively. If the media URI specifies another scheme, such as http or https, the MediaElement attempts a progressive download first. If that fails, the MediaElement attempts to stream the file.

Note that live streaming media cannot be paused; calling the Pause method has no effect.

To find out more about the differences between streaming and progressive downloading, see Key Concepts in Windows Media Technologies.

MediaElement supports multiple bit rate (MBR) files. When streaming media, the MediaElement automatically selects the appropriate stream for the bandwidth available. For progressively downloaded or local media, the MediaElement always selects the stream with the highest bit rate. For more information about multiple bit rate files, see Using Multiple Bit Rate Mutual Exclusion.

In networks where a proxy server exists, special settings on the client may be required before streaming will work in Silverlight. In general, Silverlight looks at system settings only to make a decision about proxy server configuration. Therefore, specifying a proxy setting in Firefox will not affect the way streaming works in either Windows or Macintosh platforms.

Windows: End users need to make sure that they have the correct proxy settings under Internet Options. These options can be accessed through Internet Explorer, or directly from the Control Panel. In Windows, users should be able to use automatic proxy detection, specify a configuration script, or manually specify the proxy server IP address to enable streaming in Silverlight. As a result, as long as users are able to browse the Web using Internet Explorer, they can be guaranteed that streaming in Silverlight will work correctly. Even if users are able to browse the Web using Firefox (that is, if Firefox proxy settings are correct), there is a chance that streaming will not work if the system settings are not also correct.

Macintosh: End users need to make sure that they manually specify the proxy servers IP address under Network Preferences. These settings can be accessed through Safari, or directly from System Preferences. Unlike Windows, specifying a PAC configuration script for the proxy server is not supported for Silverlight 1.0. As a result, there is a chance that a user may able to browse the Web correctly, without being able to stream media in Silverlight. This could happen if the system settings are using a configuration script for proxy detection, or if the system settings are incorrect but Firefox is being used (and Firefox proxy settings are correct).

A server administrator might wish to get information about Silverlight client connections to their servers particularly related to streaming media. This can be done by accessing server logs on the server machine; however, what shows up in these logs is determined by what information the Silverlight client sends to the server. Below is a list of supported log fields reported by Silverlight.

Note:

To learn more about server logs, see Logging Model for Windows Media Services.

Field Name

By

When

Unit & Length

Description

Sample Value

c-ip

Server

Begin

IP Address

50 chars

The source IP address of the connected socket. This may end up being the IP of a proxy server or firewall.

157.100.200.300 (server)

Date

Server

Begin

Date

10 chars

The server’s date when the client connected to the stream. This is either in UTC or local time depending upon the plug-in configuration. Refer to the log file’s headers to determine if this value is based on UTC or local time.

1997-10-09 (server)

Time

Server

Begin

Time

8 chars

The server’s time when the client connected to the stream. This is either in UTC or local time depending upon the plug-in configuration.

15:30:30 (server)

cs-uri-stem

Client

Begin

URL path

4096 chars

The path to what the client requested. This is the requested URL without the schema, host, port number or query string.

/test/sample.asf

x-duration

Client

End

Seconds

10 chars

Time (in seconds, no fractions) the client has been rendering received data. Time buffering data is not included in this value.

31

c-status

Client

Dynamic

HTTP Result

8 chars

Codes that describe the client's status. Mapped to http/rtsp status codes. Silverlight should always return 200.

200

c-playerid

Client

Begin

GUID

38 chars

GUID for the client’s player. Silverlight always returns an anonymous GUID of the form {3300AD50-2C39-46c0-AE0A-xxxxxxxxxxxx}, where x is the server’s session id (refer to the s-sessionid field).

{3300AD50-2C39-46c0-AE0A-70B64F321A80}

c-playerversion

Client

Begin

String

64 chars

The player version number. Silverlight will always return the version of NetSource being used.

11.08.005.0000 or similar.

cs(User-Agent)

Client

Begin

String

256 chars

If the player was embedded in a browser, this field refers to the browser type that was used, appended by the version of NetSource used, and the version of Silverlight installed on the system.

Mozilla/4.0_(compatible;_MSIE_4.01;_Windows_98)_NSPlayer/6.4.1.2_Silverlight/1.0.20926.0

cs(Referer)

Client

Begin

URL

4096 chars

URL to the Web page that the player was embedded within (if the player was embedded).

http://www.contoso.com/default.htm

c-os

Client

Begin

String

64 chars

Client computer's operating system (for example, Windows 95, Windows NT/2000/XP, Apple Macintosh).

One of: Windows_2000, Windows_XP, Windows_Vista, MacOS.

filelength

Server

Begin

Seconds

10 chars

Length of the ASF file (in seconds) for on-demand and broadcast streams sourced from a file. For a live broadcast stream, this value is undefined and represented as zero (0).

60

filesize

Server

Begin

Bytes

10 chars

Size of the ASF file (in bytes) for on-demand and broadcast streams sourced from a file. For a live broadcast stream, this value is undefined and represented zero (0).

86000

Avgbandwidth

Server

End

Bits per second

10 chars

Average bandwidth (in bits/sec) at which the client was connected to the server. This is the average across the entire duration of the connection.

102585

protocol

Server

Begin

String

16 chars

The protocol used to access the stream. Silverlight should always return http for this field, since it’s the only currently supported protocol.

http

transport

Server

Begin

String

16 chars

The transport used to deliver the stream, either UDP, TCP, or multicast. Silverlight should always return TCP.

TCP

sc-bytes

Server

End

Bytes

Total number of data bytes the server sent to the client. This does not include any TCP/IP or other overhead that is added by the network stack.

1188557

c-bytes

Client

End

Bytes

10 chars

Number of bytes received by the client from the server. This does not include any TCP/IP or other overhead that is added by the network stack.

28000

s-pkts-sent

Server

End

ASF Packets

10 chars

Number of packets sent by the server. This value represents the number of ASF data packets (not TCP or UDP packets).

55

c-quality

Client

End

Percent (%)

3 chars

The measure of how well the stream was received by the client (on a scale from 0-100%). This is reported by NetSource.

89

s-ip

Server

Begin

IP Address

35 chars

Upstream server IP address. This is the server that received the log.

155.12.1.234

s-dns

Server

Begin

DSN addr.

255 chars

Upstream server DNS. This is the server that received the log.

wmt.contoso.com

s-totalclients

Server

End

Connected clients

10 chars

Number of clients connected to the upstream server at the time of the logging event.

201

s-cpu-util

Server

End

Percentage

3 chars

CPU load on the upstream server (0-100%) at the time of the logging event.

40

cs-user-name

Server

Begin

String

256 chars

This is the username that the client provides the server during authentication.

Empty

s-session-id

Server

Begin

Session

10 chars

This is an internal session id that the server uses to track a given client session. This is important to track multiple log entries to the same session. Using the client GUID to track a session across multiple log entries is not manageable since it is possible to have multiple instances of a client running on a machine at one time (the GUID for each log entry may be identical).

123456

s-content-path

Server

Begin

URL

4096 chars

This is the actual content object that was streamed to the client. A plug-in may resolve a requested path to a path differently that what a client requested.

http://www.contoso.com/speech.wma

cs-url

Client

Begin

URL

4096 chars

The actual URL requested by the client.

mms://contoso.com/some/content.asf

cs-media-name

Client

End

String

256 chars

The name of the stream the client was playing, without the full path.

myVideoFile.wmv

s-proxied

Server

End

Boolean

1 char

Indicates whether the connection was made through a cache/proxy server or not. This value is 0 if there was no cache/proxy server involved. The value is 1 if a cache/proxy server was involved.

Even if a cache/proxy server downloads content into cache this value will be 1 since a cache/proxy server was involved with the connection. This value is triggered by the existence of a "Via" protocol header. This enables HTTP based (non streaming) proxy servers to be identified.

Note that any remote client log will have a 1 value for this field. However a client who has locally cached content may propagate the remote log directly to the origin server without passing through a cache/proxy server. In this case this value will be 0.

0

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker