VideoEncodingProperties Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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.
Windows version | SDK version | Value added |
---|---|---|
1607 | 14393 | StereoscopicVideoPackingMode |
1703 | 15063 | CreateHevc |
1703 | 15063 | SphericalVideoFrameFormat |
1803 | 17134 | Copy |
Video |
Creates a new instance of the VideoEncodingProperties class. |
Bitrate |
Gets or sets the video bit rate. |
Frame |
Gets or sets the video frame rate. |
Height |
Gets or sets the video image height. |
Pixel |
Gets or sets the pixel aspect ratio. |
Profile |
Gets or sets the media format profile. |
Properties |
Gets additional format properties for the video stream. |
Spherical |
Gets a value that specifies the spherical video format of a video frame. |
Stereoscopic |
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. |
Copy() |
Creates a copy of the VideoEncodingProperties object. |
Create |
Creates an instance of VideoEncodingProperties for an AOMedia Video 1 (AV1) video. |
CreateH264() |
Creates an instance of VideoEncodingProperties for a H.264 video. |
Create |
Creates an instance of VideoEncodingProperties for High Efficiency Video Coding (HEVC). |
Create |
Creates an instance of VideoEncodingProperties for a MPEG-2 video. |
Create |
Creates an instance of VideoEncodingProperties for a uncompressed video. |
Create |
Creates an instance of VideoEncodingProperties for a VP9 video. |
Get |
Gets the media format user data. |
Set |
Sets the media format user data. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |