FSB OGG Unpacker

Codecs, formats, encoding/decoding of game audio, video and music
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

FSB OGG Unpacker

Post by spider91 »

fsbext unpacks files as well, but they still headerless and can't be played. Is there any possibility to add headers and make them playable? Here's the fsb (vorbis) file from Transistor https://mega.co.nz/#!45wTFTxA!ZpDbHImxl ... htmMo-7I8k
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

The chunked OGG files in the FSB archives are in my TODO list from long time, but I have still not checked them because I think they may take a good amount of time.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

aluigi wrote:The chunked OGG files in the FSB archives are in my TODO list from long time, but I have still not checked them because I think they may take a good amount of time.


Maybe there's a way to dump them using functions from original fmod*.dll from game? Mafia extractor worked that way. It could be the simplest way...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

Alternatively someone can write a tool to read the extracted chunked ogg using (or trying to use) the fmod API.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

Downloaded programmers api for fmod studio. There's an example file play_stream.exe that uses fmod.dll to play sounds directly from fsb. Replaced example .fsb with one from the game and it worked, but it plays only the first file. There is a c++ description for doing that, but i'm a newbie on this things, so could someone try to write an unpacker using that functions from fmod.dll? Examples: https://mega.co.nz/#!1gJUXZ4L!xiCjm-e-l ... aXR5IYp5hk
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

Interesting, the reason why it plays only the first file is the usage of 0 in getSubSound.

Anyway when I will figure out how to build a playable ogg from the chunked ogg used in FSB, I will update fsbext.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

aluigi wrote:Interesting, the reason why it plays only the first file is the usage of 0 in getSubSound.


Yep, i've understood that. The problem is that i can't recompile that tool from an example and included libraries. Embarcadero c++ gives me an error when i try to compile that.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

Syntax error or some missing library?
Anyway it's better if you use Visual Studio, it's possible that the library is compiled with a calling convention not used by other compilers (just like Steamworks).
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

All libraries are present, dunno what kind of error is that, never had it before. Here is a screenshot http://s001.youpic.su/pictures/14121936 ... eac741.png . If it's really error of RAD Studio i'll try to download Visual Studio and use it.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

I suspect it wants main() and so returns error because there is no main there.
You can try one of the following two things:

1) Append the following:

Code: Select all

int main(void) {
return FMOD_Main();
}

2) replace FMOD_Main() with main(void)
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

Because the compiler doesn't find the FMOD library.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

Well, that was stupid... But still dosen't work. Added it to the project, but received an error of COFF. Google said that i need VS for that kind of libraries... downloading it now, will try tomorrow again with VS.

upd.

It worked with VS 2013. Just need to figure out how to save all files to hdd.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: FSB OGG Unpacker

Post by AlphaTwentyThree »

Any progress on this? The new Shadow Warrior also uses ogg in fsb archives.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

The last time I checked it many months ago, it seemed a not-so-simple task.
I have no longer checked from that time.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

Thats pretty sad news... I.ve figured out how to make a player from fmod examples by number of track, but my skills are too bad for making an extractor... even with api. Also there are packer for fsb5, but there is no any possibility to unpack thata sounds as well. The last hope is you, aluigi.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

My idea was being able to rebuild the chunks in a classical ogg file, so without conversion.
But, as already said, probably it's not a simple task.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

So why don't you want to use fmod api for your tool? Isn't that more simple? Or you have your own rules for tools that doesn't permit you to use another tools?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSB OGG Unpacker

Post by aluigi »

Because my tool is an extractor that keeps the original file and quality, instead fmod will decode the audio.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSB OGG Unpacker

Post by spider91 »

fmod has a lot of options and you can disable all effects that are used in game.

P.S.
What about raw pcm topic?