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.
This topic has not yet been rated - Rate this topic

VideoEncodingProperties class

Applies to Windows and Windows Phone

Describes the format of a video stream.

Syntax


var videoEncodingProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();

Attributes

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

Members

The VideoEncodingProperties class has these types of members:

Constructors

The VideoEncodingProperties class has these constructors.

ConstructorDescription
VideoEncodingProperties Creates a new instance of the VideoEncodingProperties class.

 

Methods

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

MethodDescription
CreateH264 Creates an instance of VideoEncodingProperties for a H.263 video.
CreateMpeg2 Creates an instance of VideoEncodingProperties for a MPEG-2 video.
CreateUncompressed Creates an instance of VideoEncodingProperties for a uncompressed video.
GetFormatUserData Gets the media format user data.
SetFormatUserData Sets the media format user data.

 

Properties

The VideoEncodingProperties class has these properties.

PropertyAccess typeDescription

Bitrate

Read/writeGets or sets the video bit rate.

FrameRate

Read-onlyGets or sets the video frame rate.

Height

Read/writeGets or sets the video image height.

PixelAspectRatio

Read-onlyGets or sets the pixel aspect ratio.

ProfileId

Read/writeGets or sets the media format profile.

Properties

Read-onlyGets additional format properties for the video stream.

Subtype

Read/writeGets or sets the subtype of the format.

Type

Read-onlyGets the format type.

Width

Read/writeGets or sets the video image width.

 

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.

Examples

The following example creates in instance of this class and then gets the FrameRate property values.


function getFrameRate() {
    var videoProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();
    // Get the MediaRatio object.
    var ratio = videoProperties.frameRate;
    // Get the numerator and denominator of the frame rate ratio.
    var d_value = ratio.denominator;
    var n_value = ratio.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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.