Windows Media Video 9 Encoder
The Windows Media Video 9 encoder encodes video streams. The encoder supports the following four categories of encoded output.
- Windows Media Video 9 Simple Profile
- Windows Media Video 9 Main Profile
- Windows Media Video 9 Advanced Profile
- Windows Media Video 9.1 Image
Class Identifier
The class identifier (CLSID) for the Windows Media Video encoder is represented by the constant CLSID_CWMV9EncMediaObject. You can create an instance of the video encoder by calling CoCreateInstance.
Interfaces
A video encoder object exposes the IMediaObject interface so that the object can be used as a DirectX Media Object (DMO), and it exposes the IMFTransform interface so that the object can be used as a Media Foundation Transform (MFT).
A video encoder behaves as a DMO or an MFT depending on which interfaces you obtain and which version of Windows is running. The following table shows the conditions under which a video encoder behaves as a DMO or an MFT.
Operating system | Encoder behavior |
---|---|
Windows XP | A Windows Media video encoder always behaves as a DMO. |
Windows Vista and Windows 7 | By default, a Windows Media video encoder behaves as a DMO. If you obtain an IMFTransform interface on a video encoder, it behaves as an MFT. |
Input Formats
The Windows Media Video encoder supports the following input media subtypes when it is acting as a DMO.
- MEDIASUBTYPE_IYUV
- MEDIASUBTYPE_I420
- MEDIASUBTYPE_YV12
- MEDIASUBTYPE_NV11
- MEDIASUBTYPE_NV12
- MEDIASUBTYPE_YUY2
- MEDIASUBTYPE_UYVY
- MEDIASUBTYPE_YVYU
- MEDIASUBTYPE_RGB32
- MEDIASUBTYPE_RGB24
- MEDIASUBTYPE_RGB565
- MEDIASUBTYPE_RGB555
- MEDIASUBTYPE_RGB8
- MEDIASUBTYPE_PHOTOMOTION
The Windows Media Video encoder supports the following input media subtypes when it is acting as an MFT.
- MFVideoFormat_IYUV
- MFVideoFormat_I420
- MFVideoFormat_YV12
- MFVideoFormat_NV11
- MFVideoFormat_NV12
- MFVideoFormat_YUY2
- MFVideoFormat_UYVY
- MFVideoFormat_YVYU
- MFVideoFormat_RGB32
- MFVideoFormat_RGB24
- MFVideoFormat_RGB565
- MFVideoFormat_RGB555
- MFVideoFormat_RGB8
- MEDIASUBTYPE_PHOTOMOTION
Output Formats
The following table shows the four-character codes (FOURCCs) that correspond to the categories of encoded output.
Category | FOURCC |
---|---|
Windows Media Video 9 Simple Profile | "WMV3" |
Windows Media Video 9 Main Profile | "WMV3" |
Windows Media Video 9 Advanced Profile | "WVC1" |
Windows Media Video 9.1 Image | "WMVP" for 9.1, "WVP2" for 9.1 version 2 |
To distinguish between Simple Profile and Main Profile, set the MFPKEY_DECODERCOMPLEXITYREQUESTED property.
Properties
The Windows Media Video 9 encoder supports the following properties.
Property | Description |
---|---|
MFPKEY_ASFOVERHEADPERFRAME | Specifies the overhead, in bytes per packet, required for the container used to store the compressed content.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_AVGFRAMERATE | Specifies the average frame rate of video content, in frames per second.
Simple Profile, Main Profile, Advanced Profile, Image. Read-only. |
MFPKEY_BAVG | Specifies the buffer window, in milliseconds, of a constrained variable-bit-rate (VBR) stream at its average bit rate (specified by MFPKEY_RAVG).
Simple Profile, Main Profile, Advanced Profile. Read/write. |
MFPKEY_BDELTAQP | Specifies the delta increase between the picture quantizer of the anchor frame and the picture quantizer of the B-frame.
Main Profile, Advanced Profile. Write-only. |
MFPKEY_BMAX | Specifies the buffer window, in milliseconds, of a constrained variable-bit-rate (VBR) stream at its peak bit rate (specified by MFPKEY_RMAX).
Simple Profile, Main Profile, Advanced Profile, Image. Read/write. |
MFPKEY_BUFFERFULLNESSINFIRSTBYTE | Specifies whether the encoded video bit stream contains a buffer fullness value with every key frame.
Simple Profile, Main Profile, Advanced Profile. Read-only. |
MFPKEY_CLOSEDENTRYPOINT | Specifies the encoding pattern to use at the beginning of a group of pictures.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_CODEDFRAMES | Specifies the number of video frames encoded by the codec.
Simple Profile, Main Profile, Advanced Profile. Read-only. |
MFPKEY_CODEDNONZEROFRAMES | Specifies the number of video frames encoded by the codec that actually contain data.
Simple Profile, Main Profile, Advanced Profile. Read-only. |
MFPKEY_COMPLEXITY | This property is superseded by MFPKEY_COMPLEXITYEX. |
MFPKEY_COMPLEXITYEX | Specifies the complexity of the encoder algorithm.
Simple Profile, Main Profile. Advanced Profile. Write-only. |
MFPKEY_COMPRESSIONOPTIMIZATIONTYPE | Specifies the type of optimization to use for the Windows Media Video 9 Advanced Profile codec.
Simple Profile, Main Profile, Advanced Profile. Write. |
MFPKEY_CRISP | Specifies a numeric representation of the tradeoff between motion smoothness and image quality in codec output.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_DATARATE | Not used. |
MFPKEY_DECODERCOMPLEXITYPROFILE | Specifies the device conformance template to which the encoded content conforms.
Simple Profile, Main Profile, Advanced Profile, Image. Read-only. |
MFPKEY_DECODERCOMPLEXITYREQUESTED | Specifies the device conformance template that you want to use for video encoding.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_DELTAMVRANGEINDEX | Specifies the method used to encode the motion vector information.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_DENOISEOPTION | Specifies whether the codec will use the noise filter when encoding.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_DESIRED_VBRQUALITY | Specifies the desired quality level for quality based (1-pass) variable-bit-rate (VBR) encoding.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_DROPPEDFRAMES | Specifies the number of video frames dropped during encoding.
Simple Profile, Main Profile, Advanced Profile. Read-only. |
MFPKEY_ENDOFPASS | Specifies the end of an encoding pass.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_FORCEFRAMEHEIGHT | Specifies an intermediate frame height for encoded video.
Advanced Profile. Write-only. |
MFPKEY_FORCEFRAMEWIDTH | Specifies an intermediate frame width for encoded video.
Advanced Profile. Write-only. |
MFPKEY_FORCEMEDIANSETTING | Specifies whether the codec should use median filtering during encoding.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_FOURCC | Specifies the FOURCC that identifies the encoder you want to use.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_FRAMECOUNT | Obsolete. |
MFPKEY_FULLFRAMERATE | Specifies whether the encoder is allowed to drop frames.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_INTERLACEDCODINGENABLED | Specifies whether the codec output will be interlaced.
Advanced Profile. Write-only. |
MFPKEY_KEYDIST | Specifies the maximum time, in milliseconds, between key frames in the codec output.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_LIVEENCODE | Not used. |
MFPKEY_LOOKAHEAD | Specifies the number of frames after the current frame that the codec will evaluate before encoding the current frame.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_LOOPFILTER | Specifies whether the codec should use the in-loop deblocking filter during encoding.
Main Profile, Advanced Profile. Write-only. |
MFPKEY_MACROBLOCKMODECOSTMETHOD | Specifies the cost method used by the codec to determine which macroblock mode to use.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_MOTIONMATCHMETHOD | Specifies the method to use for motion matching.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_MOTIONSEARCHLEVEL | Specifies the types of video information that are used in motion search operations.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_MOTIONSEARCHRANGE | Specifies the range used in motion searches.
Main Profile, Advanced Profile. Write-only. |
MFPKEY_NOISEEDGEREMOVAL | Specifies whether the codec should attempt to detect noisy frame edges and remove them.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_NUMBFRAMES | Specifies the number of bidirectional predictive frames (B-frames).
Main Profile, Advanced Profile. Write-only. |
MFPKEY_NUMTHREADS | Specifies the number of threads that the codec will use for encoding.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_PASSESRECOMMENDED | Specifies the maximum number of passes supported by the codec.
Simple Profile, Main Profile, Advanced Profile, Image. Read-only. |
MFPKEY_PASSESUSED | Specifies the number of passes that the codec will use to encode the content.
Simple Profile, Main Profile, Advanced Profile, Image. Read/write. |
MFPKEY_PERCEPTUALOPTLEVEL | Specifies whether the codec should use conservative perceptual optimization when encoding.
Main Profile, Advanced Profile. Write-only. |
MFPKEY_PRODUCEDUMMYFRAMES | Specifies whether the encoder produces dummy frame entries in the bit stream for duplicate frames.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_QPPERFRAME | Specifies QP.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_RANGEREDUX | Specifies the degree to which the codec should reduce the effective color range of the video.
Advanced Profile. Write-only. |
MFPKEY_RAVG | Specifies the average bit rate, in bits per second, used for 2-pass variable-bit-rate (VBR) encoding.
Simple Profile, Main Profile, Advanced Profile. Read/write. |
MFPKEY_RDSUBPIXELSEARCH | Specifies whether the encoder uses RD-based sub-pixel MV search.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_REENCENDBUFFERSIZE | For segment re-encoding, specifies the buffer size.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_REENCDURATION | For segment re-encoding, specifies the duration of the segment to be re-encoded.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_REENCQPREF | For segment re-encoding, specifies the quantizer of the frame prior to the starting segment.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_REENCSTARTBUFFERSIZE | For segment re-encoding, specifies the starting buffer fullness.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_RMAX | Specifies the peak bit rate, in bits per second, used for constrained 2-pass variable-bit-rate (VBR).
Simple Profile, Main Profile, Advanced Profile. Read/write. |
MFPKEY_TOTALFRAMES | Specifies the number of video frames passed to the encoder during the encoding process.
Simple Profile, Main Profile, Advanced Profile, Image. Read-only. |
MFPKEY_VBRENABLED | Specifies whether the codec will use variable-bit-rate (VBR) encoding.
Simple Profile, Main Profile, Advanced Profile, Image. Read/write. |
MFPKEY_VBRQUALITY | Specifies the actual quality level for quality based (1-pass) variable-bit-rate (VBR) encoding.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_VIDEOSCALING | Specifies whether the codec will use video scaling optimization.
Simple Profile, Main Profile, Advanced Profile. Write-only. |
MFPKEY_VIDEOWINDOW | Specifies the amount of content, in milliseconds, that can fit into the model buffer.
Advanced Profile. Write-only. |
MFPKEY_VOLHEADERFORREENCODE | For segment re-encoding, specifies the codec private data of the file that is being re-encoded.
Simple Profile, Main Profile, Advanced Profile, Image. Write-only. |
MFPKEY_VTYPE | Specifies the type of logic that the codec will use to detect interlaced source video.
Advanced Profile. Write-only. |
MFPKEY_ZEROBYTEFRAMES | Specifies the number of video frames that were skipped because they were duplicates of previous frames.
Simple Profile, Main Profile, Advanced Profile. Read-only |
Requirements
Requirement | Value |
---|---|
Client |
Windows XP, Windows Vista or Windows 7 |
Header |
|
DLL |
|
See also