Delen via


VideoEncodingProperties Class

Definition

Describes the encoding properties of a video stream.

public ref class VideoEncodingProperties sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class VideoEncodingProperties final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class VideoEncodingProperties final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class VideoEncodingProperties
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class VideoEncodingProperties
function VideoEncodingProperties()
Public NotInheritable Class VideoEncodingProperties
Inheritance
Object Platform::Object IInspectable VideoEncodingProperties
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Properties that are manually set are ignored for VideoEncodingProperties created from one of the presets encoding profiles: CreateH264 and CreateMpeg2.

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 an VideoEncodingProperties that is not supported on a particular device. For example, you may successfully call CreateH264, but if an h264 encoder is not present on the device, attempting to encode video 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 setting the encoding properties for captured video, see Basic photo, video, and audio capture with MediaCapture.

Version history

Windows version SDK version Value added
1607 14393 StereoscopicVideoPackingMode
1703 15063 CreateHevc
1703 15063 SphericalVideoFrameFormat
1803 17134 Copy

Constructors

VideoEncodingProperties()

Creates a new instance of the VideoEncodingProperties class.

Properties

Bitrate

Gets or sets the video bit rate.

FrameRate

Gets or sets the video frame rate.

Height

Gets or sets the video image height.

PixelAspectRatio

Gets or sets the pixel aspect ratio.

ProfileId

Gets or sets the media format profile.

Properties

Gets additional format properties for the video stream.

SphericalVideoFrameFormat

Gets a value that specifies the spherical video format of a video frame.

StereoscopicVideoPackingMode

Gets a value indicating the stereoscopic video packing mode of the video stream.

Subtype

Gets or sets the subtype of the format.

Type

Gets the format type.

Width

Gets or sets the video image width.

Methods

Copy()

Creates a copy of the VideoEncodingProperties object.

CreateAv1()

Creates an instance of VideoEncodingProperties for an AOMedia Video 1 (AV1) video.

CreateH264()

Creates an instance of VideoEncodingProperties for a H.264 video.

CreateHevc()

Creates an instance of VideoEncodingProperties for High Efficiency Video Coding (HEVC).

CreateMpeg2()

Creates an instance of VideoEncodingProperties for a MPEG-2 video.

CreateUncompressed(String, UInt32, UInt32)

Creates an instance of VideoEncodingProperties for a uncompressed video.

CreateVp9()

Creates an instance of VideoEncodingProperties for a VP9 video.

GetFormatUserData(Byte[])

Gets the media format user data.

SetFormatUserData(Byte[])

Sets the media format user data.

Applies to

See also