Packed Animation File
- Extension: paf
- Company: Amazing Studio
- Samples: http://samples.mplayerhq.hu/game-formats/hod-paf/ (hod1-partial.paf)
Packed Animation File (PAF) is a movie used in the Windows version of the game Heart Of Darkness. The source code for a reverse engineered decoder is available at: http://cyxdown.free.fr/pafdec
There is also a PlayStation version of this game. It is unknown if that version uses this file format for FMV. Many PS1 games used the PlayStation Motion Decoder format for their FMV.
Archive Format
The Windows version of Heart Of Darkness contains a large data file called hod.paf. This file contains 25 PAF files concatenated together and prepended with a header. The header is 100 bytes long and consists of 25 little endian, 32-bit numbers which are absolute offsets into the archive file. For example, bytes 0-3 contain the number 0x000000C8 = 100 which indicates that the first file occurs immediately following the 100-byte header.
File Format
A PAF file consists of a header and a series of interleaved audio and video data. The video data is stored with a custom paletted video encoding method. The audio is stored as uncompressed, stereo, 16-bit, little endian PCM data.
All multi-byte numbers are stored in little endian format.
bytes 0-55 signature bytes 56-127 unknown; might be unused bytes for the signature block bytes 132-135 frame count bytes 140-143 video width bytes 144-147 video height bytes 152-155 read buffer size bytes 156-159 number of frame blocks to preload bytes 160-163 frame blocks count bytes 164-167 starting offset of multimedia data bytes 168-171 max video frames block count bytes 172-175 max audio frames block count
The 55-byte signature field should contain the string "Packed Animation File V1.0\n(c) 1992-96 Amazing Studio\x0A\x1A".