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.

VideoEncodingProperties.Subtype | subtype property

Gets or sets the subtype of the format.

Syntax


var subtype = videoEncodingProperties.subtype;
videoEncodingProperties.subtype = subtype;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The subtype.

Remarks

The value can be the string representation of a GUID in canonical form, or one of the predefined values listed in the following table.

ValueDescription
"ARGB32"RGB, 32 bpp with alpha channel.
"BGRA8"BGRA, 32 bpp with alpha channel.
"D16"16-bit z-buffer depth
"H263"H.263 video
"H264"H.264 video
"H264ES" H.264 elementary stream
"HEVC"HEVC video
"HEVCES"HEVT elementary stream
"IYUV"YUV 8 bpp 4:2:0
"L8"8-bit luminance only.
"L16"16-bit luminance only.
"MJPG"Motion jpeg
"NV12"YUV 8 bpp 4:2:0
"MPEG1"MPEG-1 video
"MPEG2"MPEG-2 video
"RGB24"RGB, 24 bpp
"RGB32"RGB, 32 bpp
"WMV3"Windows Media Video 9 codec
"WVC1"SMPTE 421M ("VC-1") codec
"VP9"VP9 video
"YUY2"YUV 8 bpp 4:2:2
"YV12"YUV 8 bpp 4:2:0

 

Warning  

The string values returned by the MediaEncodingSubtypes properties may not use the same letter casing as AudioEncodingProperties.Subtype, VideoEncodingProperties.Subtype, ContainerEncodingProperties.Subtype, and ImageEncodingProperties.Subtype. For this reason, if you compare the values, you should use a case-insensitive comparison or use hardcoded strings that match the casing returned by the encoding properties.

 

Examples

The following example creates an instance of the VideoEncodingProperties class and gets the format subtype. The example also sets and gets other properties of the class.


function getVideoProperties() {
    var videoProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();
    var props = videoProperties.properties;
    // Remove all values from the property set.
    props.clear();

    var videoType = videoProperties.type;
    var videoSubType = videoProperties.subtype;
    if (videoType === "Video" && videoSubType === "H264") {
        // The format is an H.264 video.
    }
    // Set the bitrate. 
    videoProperties.bitrate = value;

    // Get the frame rate ratio.
    var d_value = videoProperties.frameRate.denominator;
    var n_value = videoProperties.frameRate.numerator;

    // Get the pixel aspect ratio.
    d_value = videoProperties.pixelAspectRatio.denominator;
    n_value = videoProperties.pixelAspectRatio.numerator;

    // Set new height and width.
    videoProperties.height = h_Value;
    videoProperties.width = w_Value;
}


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

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

See also

VideoEncodingProperties

 

 

Show: