MJP

From MultimediaWiki
Jump to navigation Jump to search

This movie container format is used by The Amazing Spider-Man: Countdown To Doom game for the VTech V.Flash Game Console and possibly other games for the same system.

Files start with a global header, followed by several chunks.

typedef struct mjp_header_s {
 uint32_t fourcc;          // 'MIAV'
 uint32_t header_size;     // 0x40 (64) for all sample files
 uint64_t data_size;       // equals file_size - header_size
 uint32_t duration;        // number of frames per stream
 uint16_t fps;
 uint16_t unknown0;        // always 0x05
 uint16_t width;
 uint16_t height;
 uint8_t  unknown1[36];    // reserved? all zeroes
} mjp_header_t;

Each chunk starts with a small header.

typedef struct chunk_header_s {
 uint32_t id;              // '00dc' '01wb' '02wb'
 uint32_t dts;             // timebase = 1/fps
 uint32_t payload_size;    // number of bytes that follow this chunk_header
} chunk_header_t;

Notes:

  • The chunk's id denotes to which stream it belongs ('00', '01', '02') and what type of data it contains, similar to AVI files:
    • dc - compressed video frame
    • wb - audio data
  • There seems to be no header field telling us how many streams there are. All sample files contain three streams:
    • 00 - video
    • 01 - audio
    • 02 - audio
  • All audio chunks are 1470 bytes in size. At a framerate of 15 fps and after analyzing the audio data, it seems to have the following charactaristics:
    • 11025 Hz
    • mono
    • little-endian
  • The compressed video frames seem to be a modified byteswapped version of the JFIF 1.01 JPEG standard. Decompression with out-of-the-box JPEG codecs fails though.