Noctropolis VID

From MultimediaWiki
Jump to navigation Jump to search
See also VID
  • Extensions: vid
  • Company: Flashpoint Productions, Inc.
  • Year: 1994
  • Samples: TODO

VID is an FMV format first appeared in the computer game Noctropolis. Uses basic RLE compression.

A file consists of a header and a number of frame chunks. All numbers are little endian.

File header

 + 0 s8  Signature[4]   -- "VID"
 + 4 s8  Version        -- usually 2
 + 5 s16 Frames         -- number of video frames (not chunks!)
 + 7 s16 Width          -- frame width and height
 + 9 s16 Height
 + B s16 Unknown        -- related to playback speed?
 + D s16 Rate           -- playback rate (?)

Frame chunks

Each chunk begins with a byte chunk type then followed by payload of variable length.

0x00 - Intraframe

u16 sync value, followed by Width * Height frame raster

0x01 - Interframe

u16 sync value, followed by RLE-compressed raster. Version 2 movies has extra zero byte after it (if not ended permaturely by a stop-code.) Decompression algorithm:

while frame is not complete
  len = next byte of input
  if len is 0 finish
  if high bit of len is set
    leave (len & 0x7F) pixels unchanged
  else
    draw next (len) pixels

0x02 - Palette

256 6-bit RGB DAC triplets.

0x03 - RLE Intraframe

Same as 0x01, but no stop-codes and instead of skipping pixels, fill them with the next byte of input.

0x04 - Partial Interframe

Same as 0x01, but has an extra u16 value after the sync field denotes how many horizontal lines to skip before start of decoding.

0x7C - Audio Start

u16 sync, followed by u8 sampling frequency in SoundBlaster VOC format, then followed by u16 size of data and corresponding amount of actual PCM data in Mono, 8-bit Unsigned format.

0x7D - Audio Continue

Same as 0x7C, but no sync/frequency fields.

Games Using VID