Metal Gear Solid VP3: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
(no more missing)
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
* Samples: http://samples.mplayerhq.hu/game-formats/mgs1-vp3/
* Samples: http://samples.mplayerhq.hu/game-formats/mgs1-vp3/


The GameCube version of Konami's [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes], developed by Silicon Knights, uses files that are suspected to contain [[VP3]] video data.
The [[GameCube]] version of Konami's [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes], developed by Silicon Knights, uses video files that contain [[VP3]] video data. The files are packed in large game resource archive formats. Be advised that the file format described here explains files as extracted by [http://sourceforge.net/projects/extractor-gtk Extractor-GTK].


== File Format ==
== File Format ==
All multi-byte numbers are big-endian. The file header is as follows:
All multi-byte numbers are big-endian.  


  bytes 0-3    total size of file (number is too long?)
The files are comprised of a series of chunks. Each chunk has the following layout:
  bytes 4-19   unknown
 
  bytes 0-3   0x0000000E
bytes 4-7   total length of the chunk
bytes 8-11  unknown; might be reserved and set to 0
bytes 12-15  length of the payload
bytes 16..  payload
 
Note that the chunks are 0-padded to 16-byte boundaries. Thus, the length of the payload + 16 does not necessarily equal the total length of the chunk.
 
The first chunk contains header information which has the following format:
 
bytes 0-3    close to the total size of the file, but not exact and should not be used
  bytes 4-11   unknown
bytes 12-15  frame rate, expressed as a 32-bit IEEE floating point number
bytes 16-19  total number of video frames
  bytes 20-23  video width in pixels
  bytes 20-23  video width in pixels
  bytes 24-27  video height in pixels
  bytes 24-27  video height in pixels
  bytes 28-35 unknown
  bytes 28-39 unknown
bytes 36-29  possibly the frame rate (18 fps?)
  bytes 40-43  video codec FourCC ('13PV', VP31 spelled backwards)
  bytes 40-43  video codec FourCC ('13PV', VP31 spelled backwards)
  bytes 44-63  unknown
  bytes 44-63  unknown


Following the header is data that appears to conform to the [[VP3]] video coding method. It is unknown how the frame data is delimited. VP3 makes no provision for encoding frame length in the bitstream. It's possible that the demuxer and the video decoder in the game are one and the same and that the video decoder parses through data until it has finished a frame and then resets on a byte boundary (or perhaps a multi-byte boundary) to decode the next frame.
The remainder of the chunks contain video data compressed with the VP3 video codec.
 
The frame rate is stored as a 32-bit IEEE floating point number. A common value is 0x41F00000 which represents 30.0 frames per second.


[[Category:Game Formats]]
[[Category:Game Formats]]
[[Category:Formats missing in FFmpeg]]
[[Category:Undiscovered Game Formats]]

Latest revision as of 19:06, 18 July 2012

The GameCube version of Konami's Metal Gear Solid: The Twin Snakes, developed by Silicon Knights, uses video files that contain VP3 video data. The files are packed in large game resource archive formats. Be advised that the file format described here explains files as extracted by Extractor-GTK.

File Format

All multi-byte numbers are big-endian.

The files are comprised of a series of chunks. Each chunk has the following layout:

bytes 0-3    0x0000000E
bytes 4-7    total length of the chunk
bytes 8-11   unknown; might be reserved and set to 0
bytes 12-15  length of the payload
bytes 16..   payload

Note that the chunks are 0-padded to 16-byte boundaries. Thus, the length of the payload + 16 does not necessarily equal the total length of the chunk.

The first chunk contains header information which has the following format:

bytes 0-3    close to the total size of the file, but not exact and should not be used
bytes 4-11   unknown
bytes 12-15  frame rate, expressed as a 32-bit IEEE floating point number
bytes 16-19  total number of video frames
bytes 20-23  video width in pixels
bytes 24-27  video height in pixels
bytes 28-39  unknown
bytes 40-43  video codec FourCC ('13PV', VP31 spelled backwards)
bytes 44-63  unknown

The remainder of the chunks contain video data compressed with the VP3 video codec.

The frame rate is stored as a 32-bit IEEE floating point number. A common value is 0x41F00000 which represents 30.0 frames per second.