Important information: this site is currently scheduled to go offline indefinitely by end of the year.

decompress audio file of archive KAT

Get help on any and all audio formats, or chip in and help others!
Post Reply
domingo
n00b
Posts: 16
Joined: Thu Mar 24, 2016 11:43 pm
Has thanked: 7 times

decompress audio file of archive KAT

Post by domingo »

He I need help to extract audio tracks from this file KAT
HEX
Image

Link archive Kat

Code: Select all

 https://mega.nz/#!2EtyQAgQ!_pExM5uoRAoK-U9H0vDwGVO6JpiiI5gsX2MOJO2iqf0 
I think what are adpcm samples, but can not find the way to extract all audio files
Last edited by domingo on Fri Mar 25, 2016 1:49 pm, edited 3 times in total.
brendan19
ultra-veteran
ultra-veteran
Posts: 389
Joined: Thu Aug 12, 2010 8:15 am
Has thanked: 54 times
Been thanked: 93 times

Re: decompress audio file of archive KAT

Post by brendan19 »

Post a sample of .KAT archive
domingo
n00b
Posts: 16
Joined: Thu Mar 24, 2016 11:43 pm
Has thanked: 7 times

Re: decompress audio file of archive KAT

Post by domingo »

I added the link to the file KAT, are 60 mg compressed in rar file and 80mg decompressed
RedEyeX32
ultra-n00b
Posts: 8
Joined: Sun Sep 21, 2014 9:38 pm
Been thanked: 2 times

Re: decompress audio file of archive KAT

Post by RedEyeX32 »

domingo wrote:I added the link to the file KAT, are 60 mg compressed in rar file and 80mg decompressed
The structure is fairly simple, it goes as the following:

Code: Select all

struct kat_audio_entries
{
   int unk1;
   int file_offset;
   int file_length;
   int unk2;
   __int64 unk3;
   char file_name[28];
}
Each entry is 0x40 (64) bytes. This isn't a complete structure, but it is sufficient to do the things you want to do.
domingo
n00b
Posts: 16
Joined: Thu Mar 24, 2016 11:43 pm
Has thanked: 7 times

Re: decompress audio file of archive KAT

Post by domingo »

Ok thanks, I'll go testing, have if I get results
domingo
n00b
Posts: 16
Joined: Thu Mar 24, 2016 11:43 pm
Has thanked: 7 times

Re: decompress audio file of archive KAT

Post by domingo »

Just I try for 2 hours and not get extract the contents :(
RedEyeX32
ultra-n00b
Posts: 8
Joined: Sun Sep 21, 2014 9:38 pm
Been thanked: 2 times

Re: decompress audio file of archive KAT

Post by RedEyeX32 »

domingo wrote:Just I try for 2 hours and not get extract the contents :(
It's not that hard, just go to the file_offset and extract the data that equals to the file_length in the struct. Then rename that data to .wav and you will be able to play that audio. Also this is a Little Endian format.

The extracted raw data is a headerless wav file, so it won't play in Windows Media Player. I used Audacity to play it, import it as raw data.

I have extracted the first audio entry which is Escapeloop.wav, I'll attach it below.
https://mega.nz/#!IglGyLTD!yUyNbRMkJCsn ... _mRBDQGfg8
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 496 times

Re: decompress audio file of archive KAT

Post by Gh0stBlade »

This looks like a game archive, I'll move this thread to Audio file formats, hopefully someone can put together a quickbms script. I'd do it but I've forgotten most of the syntax as it has been years since I've written one.

Could you also let us know what game this has come from?

Cheers.

---
Edit:
Just quickly updated this struct.

Code: Select all

struct KAT
{
   int m_fileID;     //This seems to decrease, I assume it's the file ID, while loop till this is 1.
   int m_fileOffset;
   int m_fileLength;
   int m_sampleRate;
   __int64 m_unk1;
   char m_fileName[28];
}
Data does not look compressed so someone will need to write an unpacker that also creates a valid RIFF header.
Click the thanks button if I helped!
domingo
n00b
Posts: 16
Joined: Thu Mar 24, 2016 11:43 pm
Has thanked: 7 times

Re: decompress audio file of archive KAT

Post by domingo »

ok, will try
Yes.the audio is raw,I have the Sound Forge Pro for to play
You can give an example of the structure of excapeloop.wav? to guide me? please

The game is Star war Episode 1 Racer, Dreamcast versión and I would like to replace the audio for the Spanish version of pc
Post Reply