MediaEncodingProfile MediaEncodingProfile MediaEncodingProfile MediaEncodingProfile Class

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

Declaration

public sealed class MediaEncodingProfilepublic sealed class MediaEncodingProfilePublic NotInheritable Class MediaEncodingProfilepublic sealed class MediaEncodingProfile

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(AudioEncodingQuality), 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(AudioEncodingQuality), 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 summary

Creates a new instance of the MediaEncodingProfile class.

Properties summary

Gets or sets the encoding properties for the audio stream.

Gets or sets the properties of the media container.

Gets or sets the encoding properties for the video stream.

Methods summary

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

Creates an instance of MediaEncodingProfile for AVI.

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

Creates an encoding profile from an existing media file.

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

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

Creates an encoding profile for AAC audio.

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

Creates an encoding profile for H.264 video.

Creates an instance of MediaEncodingProfile for WAV

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

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

Constructors

  • MediaEncodingProfile()
    MediaEncodingProfile()
    MediaEncodingProfile()
    MediaEncodingProfile()

    Creates a new instance of the MediaEncodingProfile class.

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

Properties

  • Audio
    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 AudioEncodingPropertiespublic AudioEncodingProperties Audio { get; set; }

    Property Value

  • Container
    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 ContainerEncodingPropertiespublic ContainerEncodingProperties Container { get; set; }

    Property Value

  • Video
    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 VideoEncodingPropertiespublic VideoEncodingProperties Video { get; set; }

    Property Value

Methods

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

    Prerelease. 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 MediaEncodingProfilepublic static MediaEncodingProfile CreateAlac(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateAvi(VideoEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateAvi(VideoEncodingQuality quality)

    Parameters

    Returns

    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(AudioEncodingQuality), 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)
    CreateFlac(AudioEncodingQuality)

    Prerelease. 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 MediaEncodingProfilepublic static MediaEncodingProfile CreateFlac(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateFromFileAsync(IStorageFile)
    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 )public static IAsyncOperation<MediaEncodingProfile> CreateFromFileAsync(IStorageFile file)

    Parameters

    Returns

    • An object that is used to control the asynchronous operation.

  • CreateFromStreamAsync(IRandomAccessStream)
    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 )public static IAsyncOperation<MediaEncodingProfile> CreateFromStreamAsync(IRandomAccessStream stream)

    Parameters

    Returns

    • An object that is used to control the asynchronous operation.

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

    Prerelease. 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 MediaEncodingProfilepublic static MediaEncodingProfile CreateHevc(VideoEncodingQuality quality)

    Parameters

    Returns

  • CreateM4a(AudioEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateM4a(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateMp3(AudioEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateMp3(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateMp4(VideoEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateMp4(VideoEncodingQuality quality)

    Parameters

    Returns

  • CreateWav(AudioEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateWav(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateWma(AudioEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateWma(AudioEncodingQuality quality)

    Parameters

    Returns

  • CreateWmv(VideoEncodingQuality)
    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 MediaEncodingProfilepublic static MediaEncodingProfile CreateWmv(VideoEncodingQuality quality)

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Media.MediaProperties.dll