UMV: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
(fill an updated description)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
* Samples: http://samples.mplayerhq.hu/game-formats/umv/
* Samples: http://samples.mplayerhq.hu/game-formats/umv/


UMV is (suspected to be) a full motion video file format used in the DOS game [http://www.mobygames.com/game/dos/are-you-afraid-of-the-dark-the-tale-of-orpheos-curse Are You Afraid of the Dark? The Tale of Orpheo's Curse].
UMV is a full motion video file format used in several DOS games like [http://www.mobygames.com/game/dos/are-you-afraid-of-the-dark-the-tale-of-orpheos-curse Are You Afraid of the Dark? The Tale of Orpheo's Curse] and [https://www.mobygames.com/game/dracula-unleashed Dracula Unleashed].
 
The format is split into individual packets, with no special header.
Each packet starts with 4 bytes packet size (big-endian, including the 4 bytes for the size itself), followed by the size value of the previous packet (0 if there is no previous one).
The following 4 bytes are packet type.
 
Packets are grouped together, each group starting with packet type 2 and usually ending with packet type 0x80 (which usually has reported size 0 and occupies all the space until the next packet group or file end). Additionally there may be alternative scenes stored after the main video. Alternative scenes data has different chunk types but video compression remains the same.
 
There are the following packet types known:
* 0x01 -- video header
* 0x02 -- packet group header, its first 32-bit value is an offset to the start of the next packet group
* 0x04 -- delta frame
* 0x10 -- intra frame for alternative scenes
* 0x20 -- intra frame
* 0x40 -- global palette
* 0x80 -- PCM audio
* 0x100 -- probably alternative scenes header
* 0x200 -- probably offsets for alternative scene frames
 
Video header usually consists of ten 32-bit words:
* unknown
* unknown
* video width (160)
* video height (100)
* framerate?
* audio sample rate
* unknown
* unknown
* offset to alternative scenes data (or 0 if not present)
* unknown
 
Palette chunk format:
* 32-bit start colour
* 32-bit number of colours to update (for <i>Dracula</i> value 255 actually means 256 colours)
* full-scale palette data
 
Frame data starts with 32-bit frame number, 32-bit local offset to audio data (local means offset inside the packet group) and some additional fields: intra frames (type 0x20) have palette data offset, alternative intra frames (type 0x10) have three additional fields, delta frames have no additional information.
 
Intra frames are stored in raw form (i.e. usually 16000 bytes for 160x100 frame) followed by palette change data (the same as palette chunk).
 
Delta frames employ rather simple compression for conveying pixel change information: at first a byte is read and treated as a bitmask (MSB first) telling to update the following 0-8 pixels with the values read from the bitstream. E.g. <code>02 2A</code> will skip 6 pixels, set the following pixel to <code>0x2A</code> and skip one more pixel. There's a special case though: code 0x05 may be used to signal long skip, so <code>05 00 aa bb</code> means updating two pixels and <code>05 nz aa bb</code> means skipping <code>(aa * 256 + bb) * 8</code> pixels.


[[Category:Video Codecs]]
[[Category:Video Codecs]]
[[Category:Game Formats]]
[[Category:Game Formats]]
[[Category:Undiscovered Game Formats]]
The format is split into individual "packets", with no special header.
Each packet starts with 4 bytes packet size (big-endian, including the 4 bytes for the size itself), followed by the size value of the previous packet (0 if there is no previous one).
The following 4 bytes are probably some kind of "packet type" value.
Packets are grouped together, with the last packet in a group having a size value of 0 and type 00 00 00 80.
After each packet group follows a section of PCM audio samples, up to the start of the next packet group.
The start offset of the next packet group is coded in the first packet of the current group, such a packet starts e.g. like this:
00 00 00 40 00 00 00 00 00 00 00 02 00 02 c8 00
where 0x40 is the size of that first packet, 0 is the size of the previous one, the packet "type" is 2 and 0x2c800 is the start offset of the next packet group.

Latest revision as of 04:22, 16 December 2022

UMV is a full motion video file format used in several DOS games like Are You Afraid of the Dark? The Tale of Orpheo's Curse and Dracula Unleashed.

The format is split into individual packets, with no special header. Each packet starts with 4 bytes packet size (big-endian, including the 4 bytes for the size itself), followed by the size value of the previous packet (0 if there is no previous one). The following 4 bytes are packet type.

Packets are grouped together, each group starting with packet type 2 and usually ending with packet type 0x80 (which usually has reported size 0 and occupies all the space until the next packet group or file end). Additionally there may be alternative scenes stored after the main video. Alternative scenes data has different chunk types but video compression remains the same.

There are the following packet types known:

  • 0x01 -- video header
  • 0x02 -- packet group header, its first 32-bit value is an offset to the start of the next packet group
  • 0x04 -- delta frame
  • 0x10 -- intra frame for alternative scenes
  • 0x20 -- intra frame
  • 0x40 -- global palette
  • 0x80 -- PCM audio
  • 0x100 -- probably alternative scenes header
  • 0x200 -- probably offsets for alternative scene frames

Video header usually consists of ten 32-bit words:

  • unknown
  • unknown
  • video width (160)
  • video height (100)
  • framerate?
  • audio sample rate
  • unknown
  • unknown
  • offset to alternative scenes data (or 0 if not present)
  • unknown

Palette chunk format:

  • 32-bit start colour
  • 32-bit number of colours to update (for Dracula value 255 actually means 256 colours)
  • full-scale palette data

Frame data starts with 32-bit frame number, 32-bit local offset to audio data (local means offset inside the packet group) and some additional fields: intra frames (type 0x20) have palette data offset, alternative intra frames (type 0x10) have three additional fields, delta frames have no additional information.

Intra frames are stored in raw form (i.e. usually 16000 bytes for 160x100 frame) followed by palette change data (the same as palette chunk).

Delta frames employ rather simple compression for conveying pixel change information: at first a byte is read and treated as a bitmask (MSB first) telling to update the following 0-8 pixels with the values read from the bitstream. E.g. 02 2A will skip 6 pixels, set the following pixel to 0x2A and skip one more pixel. There's a special case though: code 0x05 may be used to signal long skip, so 05 00 aa bb means updating two pixels and 05 nz aa bb means skipping (aa * 256 + bb) * 8 pixels.