Media​Encoding​Profile Media​Encoding​Profile Media​Encoding​Profile Class

Definition

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.

public sealed class MediaEncodingProfile : IMediaEncodingProfilepublic sealed class MediaEncodingProfile : IMediaEncodingProfilePublic NotInheritable Class MediaEncodingProfile Implements IMediaEncodingProfile
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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.

Note

It is possible to create a MediaEncodingProfile that is not supported on a particular device. For example, you may successfully call CreateMp3, but if an mp3 encoder is not present on the device, attempting to encode audio with the properties returned from this method will fail. For a list of the codecs present by default for each device family, see Supported codecs..

For how-to guidance for using MediaEncodingProfile to set the encoding properties for captured images, see Basic photo, video, and audio capture with MediaCapture. For information on using MediaEncodingProfile when transcoding media files, see Transcode media files.

Constructors

MediaEncodingProfile() MediaEncodingProfile() MediaEncodingProfile()

Creates a new instance of the MediaEncodingProfile class.

public MediaEncodingProfile()public MediaEncodingProfile()Public Sub New()
Attributes

Properties

Audio Audio Audio

Gets or sets the encoding properties for the audio stream.

public AudioEncodingProperties Audio { get; set; }public AudioEncodingProperties Audio { get; set; }Public ReadWrite Property Audio As AudioEncodingProperties
Value
AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties

The encoding properties of the audio stream. If the profile does not contain an audio stream, the value is null.

Attributes

Container Container Container

Gets or sets the properties of the media container.

public ContainerEncodingProperties Container { get; set; }public ContainerEncodingProperties Container { get; set; }Public ReadWrite Property Container As ContainerEncodingProperties
Attributes

Video Video Video

Gets or sets the encoding properties for the video stream.

public VideoEncodingProperties Video { get; set; }public VideoEncodingProperties Video { get; set; }Public ReadWrite Property Video As VideoEncodingProperties
Value
VideoEncodingProperties VideoEncodingProperties VideoEncodingProperties

The encoding properties of the video stream. If the profile does not contain a video stream, the value is null.

Attributes

Methods

CreateAlac(AudioEncodingQuality) CreateAlac(AudioEncodingQuality) CreateAlac(AudioEncodingQuality)

Creates an instance of MediaEncodingProfile for Apple Lossless Audio Codec (ALAC) audio.

public static MediaEncodingProfile CreateAlac(AudioEncodingQuality quality)public static MediaEncodingProfile CreateAlac(AudioEncodingQuality quality)Public Static Function CreateAlac(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
Returns
Attributes

CreateAvi(VideoEncodingQuality) CreateAvi(VideoEncodingQuality) CreateAvi(VideoEncodingQuality)

Creates an instance of MediaEncodingProfile for AVI.

public static MediaEncodingProfile CreateAvi(VideoEncodingQuality quality)public static MediaEncodingProfile CreateAvi(VideoEncodingQuality quality)Public Static Function CreateAvi(quality As VideoEncodingQuality) As MediaEncodingProfile
Parameters
Returns
Attributes

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.

CreateFlac(AudioEncodingQuality) CreateFlac(AudioEncodingQuality) CreateFlac(AudioEncodingQuality)

Creates an instance of MediaEncodingProfile for Free Lossless Audio Codec (FLAC) audio.

public static MediaEncodingProfile CreateFlac(AudioEncodingQuality quality)public static MediaEncodingProfile CreateFlac(AudioEncodingQuality quality)Public Static Function CreateFlac(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
Returns
Attributes

CreateFromFileAsync(IStorageFile) CreateFromFileAsync(IStorageFile) CreateFromFileAsync(IStorageFile)

Creates an encoding profile from an existing media file.

public static IAsyncOperation<MediaEncodingProfile> CreateFromFileAsync(IStorageFile file)public static IAsyncOperation<MediaEncodingProfile> CreateFromFileAsync(IStorageFile file)Public Static Function CreateFromFileAsync(file As IStorageFile) As IAsyncOperation( Of MediaEncodingProfile )
Parameters
file
IStorageFile IStorageFile IStorageFile

The media file from which to create the profile.

Returns

An object that is used to control the asynchronous operation.

Attributes

CreateFromStreamAsync(IRandomAccessStream) CreateFromStreamAsync(IRandomAccessStream) CreateFromStreamAsync(IRandomAccessStream)

Creates an encoding profile from a stream that contains media data.

public static IAsyncOperation<MediaEncodingProfile> CreateFromStreamAsync(IRandomAccessStream stream)public static IAsyncOperation<MediaEncodingProfile> CreateFromStreamAsync(IRandomAccessStream stream)Public Static Function CreateFromStreamAsync(stream As IRandomAccessStream) As IAsyncOperation( Of MediaEncodingProfile )
Parameters
stream
IRandomAccessStream IRandomAccessStream IRandomAccessStream

The media stream from which to create the profile.

Returns

An object that is used to control the asynchronous operation.

Attributes

CreateHevc(VideoEncodingQuality) CreateHevc(VideoEncodingQuality) CreateHevc(VideoEncodingQuality)

Creates an instance of MediaEncodingProfile for High Efficiency Video Coding (HEVC) video, also known as H.265 video.

public static MediaEncodingProfile CreateHevc(VideoEncodingQuality quality)public static MediaEncodingProfile CreateHevc(VideoEncodingQuality quality)Public Static Function CreateHevc(quality As VideoEncodingQuality) As MediaEncodingProfile
Parameters
Returns
Attributes

CreateM4a(AudioEncodingQuality) CreateM4a(AudioEncodingQuality) CreateM4a(AudioEncodingQuality)

Creates an encoding profile for AAC audio.

public static MediaEncodingProfile CreateM4a(AudioEncodingQuality quality)public static MediaEncodingProfile CreateM4a(AudioEncodingQuality quality)Public Static Function CreateM4a(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
quality
AudioEncodingQuality AudioEncodingQuality AudioEncodingQuality

Specifies whether to create a profile with a low bit rate, medium bit rate, or high bit rate.

Returns
Attributes

CreateMp3(AudioEncodingQuality) CreateMp3(AudioEncodingQuality) CreateMp3(AudioEncodingQuality)

Creates an encoding profile for MP3 (MPEG-1 layer 3) audio.

public static MediaEncodingProfile CreateMp3(AudioEncodingQuality quality)public static MediaEncodingProfile CreateMp3(AudioEncodingQuality quality)Public Static Function CreateMp3(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
quality
AudioEncodingQuality AudioEncodingQuality AudioEncodingQuality

Specifies whether to create a profile with a low bit rate, medium bit rate, or high bit rate.

Returns
Attributes

CreateMp4(VideoEncodingQuality) CreateMp4(VideoEncodingQuality) CreateMp4(VideoEncodingQuality)

Creates an encoding profile for H.264 video.

public static MediaEncodingProfile CreateMp4(VideoEncodingQuality quality)public static MediaEncodingProfile CreateMp4(VideoEncodingQuality quality)Public Static Function CreateMp4(quality As VideoEncodingQuality) As MediaEncodingProfile
Parameters
quality
VideoEncodingQuality VideoEncodingQuality VideoEncodingQuality

Specifies the video resolution of the profile.

Returns
Attributes

CreateWav(AudioEncodingQuality) CreateWav(AudioEncodingQuality) CreateWav(AudioEncodingQuality)

Creates an instance of MediaEncodingProfile for WAV

public static MediaEncodingProfile CreateWav(AudioEncodingQuality quality)public static MediaEncodingProfile CreateWav(AudioEncodingQuality quality)Public Static Function CreateWav(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
quality
AudioEncodingQuality AudioEncodingQuality AudioEncodingQuality

The audio encoding quality.

Returns
Attributes

CreateWma(AudioEncodingQuality) CreateWma(AudioEncodingQuality) CreateWma(AudioEncodingQuality)

Creates an encoding profile for Windows Media Audio (WMA).

public static MediaEncodingProfile CreateWma(AudioEncodingQuality quality)public static MediaEncodingProfile CreateWma(AudioEncodingQuality quality)Public Static Function CreateWma(quality As AudioEncodingQuality) As MediaEncodingProfile
Parameters
quality
AudioEncodingQuality AudioEncodingQuality AudioEncodingQuality

Specifies whether to create a profile with a low bit rate, medium bit rate, or high bit rate.

Returns
Attributes

CreateWmv(VideoEncodingQuality) CreateWmv(VideoEncodingQuality) CreateWmv(VideoEncodingQuality)

Creates an encoding profile for Windows Media Video (WMV).

public static MediaEncodingProfile CreateWmv(VideoEncodingQuality quality)public static MediaEncodingProfile CreateWmv(VideoEncodingQuality quality)Public Static Function CreateWmv(quality As VideoEncodingQuality) As MediaEncodingProfile
Parameters
quality
VideoEncodingQuality VideoEncodingQuality VideoEncodingQuality

Specifies the video resolution of the profile.

Returns
Attributes

See Also