Supported Media Formats and Protocols in Silverlight
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.
- Supported Formats
- Unsupported Formats
- Supported Protocols
- Stream Selection in MBR Files
- Proxy Servers and Streaming in Silverlight
The MediaElement object supports the following formats. These encodings are supported regardless of the file name extension.
- 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
- 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 188.8.131.52) is not supported.
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.
|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 are supported:
- 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.
Stream Selection and MBR Files
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.
Proxy Servers and Streaming in Silverlight
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 server’s 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).