Page 1 of 1

decompress audio file of archive KAT

Posted: Fri Mar 25, 2016 12:04 am
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

Re: decompress audio file of archive KAT

Posted: Fri Mar 25, 2016 4:22 am
by brendan19
Post a sample of .KAT archive

Re: decompress audio file of archive KAT

Posted: Fri Mar 25, 2016 1:53 pm
by domingo
I added the link to the file KAT, are 60 mg compressed in rar file and 80mg decompressed

Re: decompress audio file of archive KAT

Posted: Sat Apr 02, 2016 4:13 pm
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.

Re: decompress audio file of archive KAT

Posted: Sun Apr 03, 2016 11:21 am
by domingo
Ok thanks, I'll go testing, have if I get results

Re: decompress audio file of archive KAT

Posted: Wed Apr 06, 2016 3:01 pm
by domingo
Just I try for 2 hours and not get extract the contents :(

Re: decompress audio file of archive KAT

Posted: Thu Apr 07, 2016 1:17 am
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

Re: decompress audio file of archive KAT

Posted: Thu Apr 07, 2016 1:59 pm
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.

Re: decompress audio file of archive KAT

Posted: Thu Apr 07, 2016 11:12 pm
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