H.265 / HEVC Video Decoder

The Media Foundation H.265 video decoder is a Media Foundation Transform that supports decoding H.265/HEVC content in Annex B format and can be used in playback of mp4 and m2ts files.

The H.265 video decoder exposes the following interfaces.

To create an instance of the decoder, do one of the following:

Input Types

The input type must contain at least the following two attributes:

Attribute Description


The first media subtype, MFVideoFormat_HEVC, indicates that the media samples carry H.265 bitstream with start codes, and the stream has interleaved SPS/PPS. It assumes one frame per sample.

The media subtype MFVideoFormat_ HEVC_ES is to indicate the media samples carry elementary H.265 bitstream, where each sample may contain a partial picture, multiple pictures, some pictures plus a partial picture.

The input media types cannot change dynamically between two types. The decoder can detect in-flight output format changes based on the elementary stream syntax (aspect ratio, dimension, interlace flags, colorimetry information) and trigger corresponding output media type changes.

For input media type, the decoder expects the source to set the correct Profile. For example if the content is going to be 10bit, input media type should specify the profile as Main10.

Output Types

The decoder supports the following output subtypes:

  • MFVideoFormat_NV12
  • MFVideoFormat_P010

For more information about these subtypes, see Video Subtype GUIDs.

Transform Attributes

The H.265 decoder implements the IMFTransform::GetAttributes method. Applications can use this method to get or set the following attributes.

Attribute Description
CODECAPI_AVLowLatencyMode Enables or disables low-latency decoding mode.
CODECAPI_AVDecNumWorkerThreads Sets the number of worker threads used by the decoder.
CODECAPI_AVDecVideoThumbnailGenerationMode Enables or disables thumbnail generation mode.
MF_NALU_LENGTH_SET Indicates that NALU length information will be sent as a BLOB with each compressed H.265 sample.
MF_NALU_LENGTH_INFORMATION Indicates the lengths of NALUs in the sample. This is a MF BLOB that is set on compressed input samples to the H.265 decoder.
MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT Specifies the maximum number of output samples.


The H.265 decoder supports the ICodecAPI interface. This interface provides an alternativate API for setting the following codec properties.

Format Constraints

The decoder supports the following formats:

Profiles/Levels Main, Main Still Picture, and Main10 profiles
Chroma Formats 4:2:0 chroma
Minimum Resolution 48 × 48 pixels
Maximum Resolution 4096 × 2304 pixels
The maximum guaranteed resolution for DXVA acceleration is 1920 × 1088 pixels; at higher resolutions, decoding is done with DXVA, if it is supported by the underlying hardware, otherwise, decoding is done with software.
DXVA The decoder supports DXVA version 2, but not DXVA version 1.


Input data must conform to Annex B of ITU-T H.265 | ISO/IEC 23008-2. The data must include the start codes. The decoder skips bytes until it finds a valid sequence parameter set (SPS) and picture parameter set (PPS) in the byte stream.


Minimum supported client
Windows 10 [desktop apps only]
Minimum supported server
None supported

See also

Codec Objects