DosBox Capture Codec

From MultimediaWiki
Revision as of 23:06, 13 February 2006 by Multimedia Mike (talk | contribs) (started data format description)
Jump to navigation Jump to search

This is a codec added to the DosBox project to capture screen data (like Vmware VMNC).

This codec employs ZLIB compression and has intraframes and delta frames. Delta frames seem to have blocks either copied from the previous frame or XOR'ed with some block from the previous frame.

The FourCC for this codec is ZMBV which ostensibly stands for Zip Motion Blocks Video. The data is most commonly stored in AVI files.

Data Format

The first byte of a ZMBV data chunk contains the following flags:

bits 7-2  undefined
bit 1     delta palette
bit 0     1 = intraframe, 0 = interframe

If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:

byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height

Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:

0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel

NOT FINISHED