Due to the needs of the project, I recently studied how to use Silverlight for media playback.
I. Basic Concepts
1. Smooth streaming
Smooth streaming is an extension of IIS Media Services. It enables the Silverlight client to adapt to the bandwidth of streaming media through HTTP and handle the special processing of video source files (such as common video file formats such as WMV, multiple video file copies of different versions are generated on the server according to different bandwidth requirements. After IIS receives a request from the Silverlight client, it determines which video file copy is sent to the client through streaming media, this process is completely dynamic. That is to say, when the bandwidth of the client changes, the copy of the video file transmitted to the streaming media will also change accordingly.
2. adaptive streaming
Adaptive streaming is provided by adaptivestreaming. dll and is the foundation of Microsoft's smooth streaming processing technology. When expression encoder is installed and fully copyrighted (Note: it is not a trial version), you can convert media files in various formats into formats that can be processed by adaptive streaming, the unified file format is fmp4. We may also easily obtain adaptivestreaming. dll.
3. IIS Media Services
IIS Media Services is a plug-in of IIS.
Ii. Smooth streaming Analysis
1.Storage Format: UseMPEG-4Format, suffix. Fmp4;
2.Transmission Format: the entire media file is divided into multiple media blocks during transmission.MPEG-4, Suffix:. Ismv(Video Media ),. Isma(Audio media );
3.Server description file: DescriptionMedia Tracks,Bit Rates, Suffix. Ism;
4.Client description file: Describe the codecs used, with the suffix. Ismc;
5.Transmission Protocol: based entirely onHTTP;
Iii. Use Silverlight for media playback
1.Directly inMedia ElementControlSourceFor media filesUriIt can be a media file in the local project folder orIISMedia files on the server;
2.UseAdaptive streamingSpecifySource,SourceMust be passedExpression EncoderMedia files that have been processedUri. The procedure is as follows:
1)SetIn IIS 7.0Deployed onWeb Server;
2)DeploymentSmooth streaming services for IIS 7.0It is responsibleSmooth streamingTransfer the media block to the client;
3) install Expression encoder (must be an official version, because I used a trial version of the software during demo , result vs2010 the system prompts that no adaptivestreaming namespace), Expression encoder Converts media files in various formats to smooth streaming supported formats, the suffix is . ISM .
4)Enable developers to developSilverlightApplicationProgramSupportedSmooth streaming playbackFirst, installIIS Media Service 3.0And addSmoothstreaming. dllAndPluginmsscrtl. dll2. Open SourcePlugin:Open video player for Silverlight(I didn't validate this method ).
5) end users can play videos without installing any plug-ins.