Introduction and SDK for Windows Media encode 9

Source: Internet
Author: User
Tags microsoft website

Windows Media encode 9 Yes Windows Media 9 Series It is mainly used for encoding. Windows Media 9 Series Including Windows Media Audio 9 Series , Windows Media video 9 Series , Windows Media Encoder 9 Series , Windows Media Services 9 Series , Windows Media Player 9 Series , Windows Media Rights Manager 9 Series , Windows Media 9 series SDK . Based on this platform, developers can use the player, decoder, and server to develop digital media applications.Program, Through Windows The latest members of the family: Windows XP Media Center Edition With this cooperation, we believe it will bring users a smoother digital entertainment experience.

The above are some of Microsoft's products that Microsoft provides to us so that we can developWindows Media 9 SDK.SDKIs a software development kitSoftware Develop kits.Windows Media 9 SDKIt mainly includesWindows Media Player SDK,Windows Media Format SDK,Windows Media Rights Manager SDK,Windows Media Encoder SDK,Windows Media Services SDK.

you can use Windows Media Encoder SDK to develop your own encoding application. Microsoft Windows Media Encoder ( Windows Media encoder) it is developed using Windows Media Encoder SDK . How should the encoding be understood? Or what functions should the encoder have? This is the role of encoder to collect streaming media from devices or files and encode and output them in Microsoft's media format. In more white words, it is collection, format conversion, and compression. Windows Media Encoder can be a device or a file, the device can be a screen, a camera, or other video or audio device. The file can be a video or audio file. Windows Media Encoder can encode the content to a file or broadcast the content. If you want to broadcast data, you can pass it through push (when the client does not request data) spread to the server that runs Windows Media Services , you can also Windows Media the server and player can be transferred by pulling (only when the client sends a request to the customer) receives streams directly from the encoder.

Windows Media Encoder SDKNo andWindows Media EncoderInstall them together and download them separately,Windows Media Encoder SDKSome examples and help files are installed in.Windows Media Encoder SDKToComFor more information about how to provide services, seeWmencsdk. CHM.

The following is a simple example.C #UseWindows Media Encoder SDKDevelopment.

 

Try
{
// Create wmencoder object.
Wmencoder Encoder =   New Wmencoder ();
// Obtain the group Source set
Iwmencsourcegroupcollection srckgcoll = Encoder. sourcegroupcollection;

// Add a group source to the set
Iwmencsourcegroup srmrm = Srckgcoll. Add ( " Sg_1 " );

// Add an audio source and video source to the group Source
Iwmencsource srcaud = Srmrm. addsource (wmenc_source_type.wmenc_audio );
Srcaud. setinput ( " C: \ love. rm " , "" , "" );

Iwmencvideosource2 srcvid = (Iwmencvideosource2) srmrm. addsource (wmenc_source_type.wmenc_video );
Srcvid. setinput ( " C: \ love. rm " , "" , "" );

// Create an output file
Iwmencfile File = Encoder. file;
File. localfilename =   " C: \ outputfile. wmv " ;

// Load the configuration file
Wmencprofile2 pro =   New Wmencprofile2 ();
Pro. loadfromfile ( " C: \ schi. PRx " );
Srmrm. set_profile (Pro );

// Add file description
Iwmencdisplayinfo descr = Encoder. displayinfo;
Descr. Author =   " Author name " ;
Descr. Copyright =   " Copyright information " ;
Descr. Description =   " Text description of encoded content " ;
Descr. Rating =   " Rating Information " ;
Descr. Title =   " Title of encoded content " ;

Iwmencattributes ATTR = Encoder. attributes;
ATTR. Add ( " URL " , " IP address " );

// Start Encoding
Encoder. preparetoencode ( True );
Encoder. Start ();
MessageBox. Show ( " It's OK " );

}
Catch (Exception E1)
{
MessageBox. Show (e1.message+E1.stacktrace );
}

You can download the Windows Media Encoder SDK from the Microsoft website. This blog provides the English version of the SDK help file for download.Wmencsdk. CHM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.