[FFmpeg-trac] #6168(avcodec:new): support Wing Commander Privateer Audio vpk files
FFmpeg
trac at avcodec.org
Tue Feb 21 14:16:36 EET 2017
#6168: support Wing Commander Privateer Audio vpk files
-------------------------------------+-----------------------------------
Reporter: compn | Owner:
Type: enhancement | Status: new
Priority: wish | Component: avcodec
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by dmjc):
File is an LZW compressed Creative VOC File. I have the format spec here:
A header starting with the file size then read 4 bytes at a time, which
points to a bunch of entries: first begins at offset 0x1c, second at
0x602a, third at 0xdbd4, etc (in an example file, the offsets vary in each
file.)
Each of these entries is LZW compressed. Start reading 9 bits at a time,
expect symbol 257 as a stop symbol (although only some games honour that),
and dictionary entries start on symbol 258. As dictionary expands towards
entry 512, read 10 bytes at a time, and so on. You read at most 12 bytes
at time, the dictionary doesn't grow beyond that (4096 entries... with the
first 256 entries being the ASCII table itself) and symbol 256 resets the
dictionary.
Unpack these and you get a Creative VOC file, which you'll be able to play
in VLC, or a similar player. The format is PCM, which means it's not
compressed by any predictive audio compression algorithm. It's just plain
8-bit (unsigned), 11025Hz, mono audio.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6168#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list