MUX: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(revert spam/vandalism)
m (update description)
Line 8: Line 8:
All multi-byte numbers are little endian. The file format is laid out as follows:
All multi-byte numbers are little endian. The file format is laid out as follows:


   bytes 0-27       unknown
   dword signature        - file signature, 0xAA07
   bytes 28-29      video width
  word  headersize       - size of the whole header, including frames table
   bytes 30-31      video height
  word  unknown1
   bytes 32-16383   frame offset table
  word  unknown2
  word  unknown3
  word  framerate        - movie playback rate, direct [[PIC]] initializer
  word  soundfrequency  - audio playback frequency
  word  audio_flags1    - unknown
   word  audio_flags2    - unknown
  word  soundbuffer_size - suggested size of the single audio buffer
  dword chunkbuffer_size - suggested size of the chunk load buffer
   word  sound_buffers    - suggested number of sound buffers
   word  width            - width of the frame
   word  height          - height of the frame


Each frame offset is 32 bits. There is enough space in the chunk offset table for 4087 media chunks. The top 2 bits of each offset always appear to be 1 (so the top byte of the chunk is always 0xC0), so these are probably flags of some sort. The last entry in the table is all 1s (0xFFFFFFFF) and the remainder of the table is all 0s.
Then followed by frame offsets table. Each frame offset is 32 bits. The top 2 bits of each offset contains flags (completely ignored by original player) the rest is an absolute offset of the frame chunks. The last entry in the table is all 1s (0xFFFFFFFF) and the remainder of the table is all 0s. Note, that table contains offset to the first chunk of each frame. This chunk can be followed by other frame's chunks (ex, it's video, audio and palette parts), but they doesn't appear in offsets table.


Frames contain 1 or more chunks, each of which are formatted in a manner that is reminiscent of the [[Flic Video|Autodesk FLIC format]]:
Frames contain 1 or more chunks, each of which are formatted in a manner that is reminiscent of the [[Flic Video|Autodesk FLIC format]]:


   bytes 0-1   chunk type
   byte  0     chunk type
  byte  1     chunk subtype
   bytes 2-5    chunk size, not including this 6-byte header
   bytes 2-5    chunk size, not including this 6-byte header
   bytes 6..    chunk payload
   bytes 6..    chunk payload
Line 23: Line 34:
Known chunk types appear to include:
Known chunk types appear to include:


   0007   unsigned, 8-bit [[PCM]] audio
   07   unsigned, 8-bit [[PCM]] audio
   0070   apparently a palette chunk, 0x300 (768) bytes, and each  
   70   palette chunk, 0x300 (768) bytes/256 [[RGB]] components, and each component is 8 bits
          component is 8 bits (not 6 bits, like VGA palettes are  
        (not 6 bits, like VGA palettes are normally stored)
          normally stored)
   64,
   006F   video chunk
  6F   video chunks
   0005   frame count: 2-byte payload contains frame number
   05   sync chunk. usually the last chunk of the frame, 2-byte payload contains frame number
  04    eof-chunk, indicates end of the movie


== Video Format ==
== Video Format ==


The corresponding video coding format is presently unknown.
The video format is mostly similar to HNM (1) compression.


== Games That Use MUX ==
== Games That Use MUX ==

Revision as of 14:07, 7 August 2006

MUX is a full motion video format used in a small number of computer games. The format packages raw, unsigned, 8-bit PCM audio along with a custom video coding format.

File Format

All multi-byte numbers are little endian. The file format is laid out as follows:

 dword signature        - file signature, 0xAA07
 word  headersize       - size of the whole header, including frames table
 word  unknown1
 word  unknown2
 word  unknown3
 word  framerate        - movie playback rate, direct PIC initializer
 word  soundfrequency   - audio playback frequency
 word  audio_flags1     - unknown
 word  audio_flags2     - unknown
 word  soundbuffer_size - suggested size of the single audio buffer
 dword chunkbuffer_size - suggested size of the chunk load buffer
 word  sound_buffers    - suggested number of sound buffers
 word  width            - width of the frame
 word  height           - height of the frame

Then followed by frame offsets table. Each frame offset is 32 bits. The top 2 bits of each offset contains flags (completely ignored by original player) the rest is an absolute offset of the frame chunks. The last entry in the table is all 1s (0xFFFFFFFF) and the remainder of the table is all 0s. Note, that table contains offset to the first chunk of each frame. This chunk can be followed by other frame's chunks (ex, it's video, audio and palette parts), but they doesn't appear in offsets table.

Frames contain 1 or more chunks, each of which are formatted in a manner that is reminiscent of the Autodesk FLIC format:

 byte  0      chunk type
 byte  1      chunk subtype
 bytes 2-5    chunk size, not including this 6-byte header
 bytes 6..    chunk payload

Known chunk types appear to include:

 07    unsigned, 8-bit PCM audio
 70    palette chunk, 0x300 (768) bytes/256 RGB components, and each component is 8 bits
        (not 6 bits, like VGA palettes are normally stored)
 64,
 6F    video chunks
 05    sync chunk. usually the last chunk of the frame, 2-byte payload contains frame number
 04    eof-chunk, indicates end of the movie

Video Format

The video format is mostly similar to HNM (1) compression.

Games That Use MUX

These games are known to use MUX files for FMV: