FSBext - FSB files extractor

Do you know a tool, link or website for working on a specific game files or to help game research? Let's collect them here!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

same, doesn't it work?
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: FSBext - FSB files extractor

Post by Shokoniraya »

aluigi wrote:same, doesn't it work?

yes, dumping list works!
Dimi46
Posts: 6
Joined: Tue Sep 17, 2019 8:01 pm

Re: FSBext - FSB files extractor

Post by Dimi46 »

Hi Luigi, i'm having trouble getting the .wav files from this bank file. I guess its encrypted and could you help me find the password or something as i've read on the forum, i'm confused how decrypting works. Can you point me to correct direction to extract all the sound files because it only extracts a very small one and the bank file is 3.5mb big. Thanks
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: FSBext - FSB files extractor

Post by spider91 »

*deleted*
ili
Posts: 81
Joined: Wed Sep 17, 2014 2:28 pm

Re: FSBext - FSB files extractor

Post by ili »

not sure what's we got here
fsb look truncated
i try fmod and fsbext and eazay
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

@ili
Do you mean the output of fsbext is invalid?
As far as I can see all the mp3 frames have been assembled in the output file and it plays (althought I don't know what he says).
iii333
Posts: 1
Joined: Sat Aug 07, 2021 2:49 pm

Re: FSBext - FSB files extractor

Post by iii333 »

Hi Luigi, when unpacking the files do not open https://drive.google.com/file/d/1tYsaab ... ZAHHH2xwm/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

Because the ogg data stored in FSB files is not compatible with the ogg format, it's like a sequence of ogg encoded blocks without any header.
I ever suggest to use this other solution here because I don't have other ways for "reassembling" the ogg data in something readable by players:
viewtopic.php?f=17&t=1901
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

MPEG encoded audio has some special stuff done to it not only during encoding but during playback in FMOD for seamless looping, of which the playback part is not preserved, resulting in a very audible gap, making it anything but seamless (seamful?)
is there any way to fix that?
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

Upon further investigation, it seems that the first frame is skipped?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

Do you mean that the mp3 file extracted by fsbext is invalid?

The file is created by reassembling the frames in FSB, it's not a direct dump so everything is possible.
By the way, fsbext has two options that may be useful in debugging:
-M dumps the frames of each channel in the mp3
-m dumps the data as-is (the result is not playable)

Please let me know if that's what you are referring to.
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

no the dump is valid, but only for a oneshot playback
FMOD seems to discard the first frame if the audio is encoded and played as a loop on any subsequent loops, at least in the case of MPEG, as if it were forcing the loop start point a frame ahead, perhaps an option to discard the first frame could help in that
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

I don't think I understand.
This topic is about fsbext only.
fsbext doesn't dump any meta information about loops and similar, just the audio data for playing.
If you are talking about a problem of the FMOD framework, that's not related to fsbext.
If you are talking about the rebuilding feature of fsbext, that's an old experimental feature that was useful a decade ago.
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

I'm talking about the manipulation FMOD does when encoding banks with MPEG compression
it's detailed in the FMOD docs here https://documentation.help/FMOD-API/qualitybitrate.html
what it seems to actually do is rather than actually discarding the last frame, it just moves everything forward by a frame, leaving a garbage frame that it skips when looping back to start
I tested this by building a custom looped back using fsbank
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

oh and for some reason a bit of the next subsound is added to the end of any subsound that isn't the last in the bank
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

actually I think I know what it's doing
the last frame is combined with the first at runtime, so maybe a loop prepriming option could be added? although that'd probably require a conversion to WAV or some other lossless format to avoid recompressing the first frame
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

hrmm but not all banks sound correct when I do that
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBext - FSB files extractor

Post by aluigi »

Should I fix something in fsbext?
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

the extraction is technically fine, but adding an option to perhaps automate the fixing of looping audio to loop properly once extracted would be nice

gotta see if FMOD stores the difference between the length of the source file and the output mpeg stream though
LBPPlayer7
Posts: 23
Joined: Mon Jul 17, 2017 10:36 am

Re: FSBext - FSB files extractor

Post by LBPPlayer7 »

FMOD seems to use the technique described in more detail here https://www.compuphase.com/mp3/mp3loops.htm