Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaEncodingProfile class

Applies to Windows and Windows Phone

Describes the encoding profile for an audio or video file. The encoding profile includes descriptions of the audio and video encoding formats, and a description of the media container.

Syntax


var mediaEncodingProfile = new Windows.Media.MediaProperties.MediaEncodingProfile();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(MTA)]
[Version(0x06020000)]

Members

The MediaEncodingProfile class has these types of members:

Constructors

The MediaEncodingProfile class has these constructors.

ConstructorDescription
MediaEncodingProfile Creates a new instance of the MediaEncodingProfile class.

 

Methods

The MediaEncodingProfile class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CreateAvi Creates an instance of MediaEncodingProfile for AVI.
CreateFromFileAsync Creates an encoding profile from an existing media file.
CreateFromStreamAsync Creates an encoding profile from a stream that contains media data.
CreateM4a Creates an encoding profile for AAC audio.
CreateMp3 Creates an encoding profile for MP3 (MPEG-1 layer 3) audio.
CreateMp4 Creates an encoding profile for H.264 video.
CreateWav Creates an instance of MediaEncodingProfile for WAV
CreateWma Creates an encoding profile for Windows Media Audio (WMA).
CreateWmv Creates an encoding profile for Windows Media Video (WMV).

 

Properties

The MediaEncodingProfile class has these properties.

PropertyAccess typeDescription

Audio

Read/writeGets or sets the encoding properties for the audio stream.

Container

Read/writeGets or sets the properties of the media container.

Video

Read/writeGets or sets the encoding properties for the video stream.

 

Remarks

The encoding quality Auto is a special preset that fills in the proper settings based on the current camera settings. Settings that are manually modified are ignored. For example, if you create a preset profile using one the static create methods, such as CreateM4a, and specify Auto as the encoding quality, any changes you make to the properties will be overwritten with values based on the current camera settings.

Examples

The following example creates an instance of this class and gets the encoding properties for the audio stream, the media container, and the video stream.


function getAudioProperties() {
    var mediaProfile = new Windows.Media.MediaProperties.MediaEncodingProfile();

    // Get the encoding properties for the audio stream.
    var audioProps = mediaProfile.audio;
    // Set the channel count.
    audioProps.channelCount = count;

    // Get the encoding properties for the media container.
    var containerProps = mediaProfile.container;
    // Set the container subtype.
    containerProps.subtype = "MP3";

    // Get the encoding properties for the video stream.
    var videoProps = mediaProfile.video;
    // Get the frame rate.
    var d_value = videoProps.frameRate.denominator;
    var n_value = videoProps.frameRate.numerator;

}


Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft