Επεξεργασία

Κοινή χρήση μέσω


Uncompressed Media Subtypes

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The following table lists the uncompressed media subtypes. These are types used as input and output formats, and formats for uncompressed streams. Not all of the types in the following tables are supported in all ways. Supported input and output format types can be enumerated by codec in the writer and reader/synchronous reader, respectively. For information about the types supported for uncompressed streams, see Using Uncompressed Audio and Video Streams.

The various RGB and palettized RGB video types listed here define colors using the RGB format, in which each color is represented by the intensity values of the red, green, and blue components of the pixel. Each intensity value can range from 0 to 255, for about 16.78 million unique colors. RGB translates easily into color values used for computer monitors, which use red, green, and blue phosphors to display color. Palettized video types must include palette information directly following the WMVIDEOINFOHEADER structure. Likewise, 16 bit video requires bit field information, which should be included after the WMVIDEOINFOHEADER structure.

Several of the media subtypes in the following table provide fewer colors than the RGB system is capable of, as described in the Description column. In palettized RGB types, colors in the palette represent RGB values, but are specified by a value that indicates the position of the color in the palette.

Uncompressed media subtype Description
WMMEDIASUBTYPE_RGB1 Palettized RGB video with 1 color bit representing 2 colors. Usually used for monochrome images.
WMMEDIASUBTYPE_RGB4 Palettized RGB video with 4 color bits representing 16 colors.
WMMEDIASUBTYPE_RGB8 Palettized RGB video with 8 color bits representing 256 colors.
WMMEDIASUBTYPE_RGB565 RGB video with 16 color bits representing 65,536 colors. This format uses 5 bits for red, 6 bits for green, and 5 bits for blue.
WMMEDIASUBTYPE_RGB555 RGB video with 16 color bits representing 32,768 colors. This format uses 5 bits for each color and ignores the sixteenth bit.
WMMEDIASUBTYPE_RGB24 RGB video with 24 color bits representing all 16,777,216 colors available to the RGB color representation scheme. This format uses 8 bits for each color intensity value.
WMMEDIASUBTYPE_RGB32 RGB video with 32 color bits representing all 16,777,216 colors available to the RGB color representation scheme. This format uses 8 bits for each color and reserves the remaining 8 bits for transparency information.
WMMEDIASUBTYPE_I420 YUV video stored in planar 4:2:0 format, with the U plane appearing first, followed by the V plane.
WMMEDIASUBTYPE_IYUV Identical to I420.
WMMEDIASUBTYPE_YV12 YUV video stored in planar 4:2:0 format, with the V plane appearing first, followed by the U plane. YV12 is identical to I420 except that the U and V planes are switched.
WMMEDIASUBTYPE_YUY2 YUV video stored in packed 4:2:2 format.
WMMEDIASUBTYPE_UYVY YUV video stored in packed 4:2:2 format. Similar to YUY2 but with different ordering of data.
WMMEDIASUBTYPE_YVYU YUV video stored in packed 4:2:2 format. Similar to YUY2 but with different ordering of data.
WMMEDIASUBTYPE_P422 YUV video stored using a planar 4:2:2 format.
WMMEDIASUBTYPE_YVU9 YUV video stored in planar 16:1:1 format.
WMMEDIASUBTYPE_PCM Uncompressed audio data stored using pulse code modulation.
WMMEDIASUBTYPE_DRM Uncompressed but encrypted audio data used with secure audio path.
WMSCRIPTTYPE_TwoStrings Script commands consisting of a string containing the command type and a string containing the command data. This is the only supported script type in the Windows Media Format SDK.
WMMEDIASUBTYPE_WebStream File transfer data containing HTML files and components for Web streaming.
WMMEDIASUBTYPE_VIDEOIMAGE Input type for the Windows Media Video 9 Image codec. Samples are a combination of bitmap images and transformation data.

 

Assigning Output Formats

Compressed Media Subtypes

Media Type Identifiers

Media Types

To Enumerate Input Formats