MXV

From MultimediaWiki
Jump to navigation Jump to search
  • Company: Caiman
  • Extension: MXV

This is a format used for music and video in (Argentinian?) kid-oriented games by Caiman. There are two versions of the format, the older one stores LZ-compressed video and PCM audio, newer version has slightly different format and employs Vorbis audio.

Old format

Header:

 13 bytes - 'Archivo MXV.\x1A"
 4 bytes - number of video frames (0 for audio-only files)
 2 bytes - width
 2 bytes - height
 1 byte  - bits per pixel (8-24)
 2 bytes - frames per second
 4 bytes - number of audio frames
 2 bytes - sampling rate
 1 byte  - bits per audio sample
 1 byte  - number of audio channels
 1 byte  - unknown

If video frames are present, it is followed by the table with the following structure of records:

 4 bytes - data offset
 4 bytes - compressed data size
 4 bytes - unpacked data size
 4 bytes - timestamp
 1 byte  - flags

If audio frames are present, there are 32-bit offsets to audio data present right after the header and video frame data (if present). Audio chunks always contain 1 second of PCM audio so storing size is unnecessary.

Video frames are stored as optional palette (signalled by bit 0 of the flags) followed by image data which may be optionally compressed (bit 1 of the flag signals deflate being used on the data, bit 2 of the flags tells that it's custom LZW compression scheme).

New format

Here "Archivo MXV.\x1A" is followed by chunks with various kinds of data:

  • FHDR -- actual header (video and audio parameters, the format is similar to the old version)
  • VTBL -- video frame table (32-bit offset, compressed size, timestamp and flags)
  • ATBL -- audio table (now with 32-bit offset and size for each frame)
  • AHDR -- Vorbis headers
  • DATA -- actual video and audio data (with offsets being relative to its start)

Video data compression seems to still employ deflate on raw images and some additional method for interframes.