[Tool] FSB Extractor
This is not exactly modding per se, but it does have to do with the files of NS2, so I thought I would share it here.
[color=#98fb98][b]Description[/b][/color]
I've written a small tool to extract the sound samples of FSB files, and I just recently made it compatible with the FSB5 format, which is what NS2 uses now.
I'm aware of the FMOD Designer program, but if all you need is to extract and play the music, then you don't really want to install a large program.
[color=#98fb98][b]FSB Extractor - FMOD Sample Bank Extraction Tool[/b][/color]
With the tool, you can display and extract the sound samples contained within an FSB file. FSB stands for "FMOD Sample Bank".
Supports the FSB3, FSB4 and FSB5 file formats. Currently, there might be a few issues with FSB5, but the basics should work.
This program was originally made to open the FSB files of "Dragon Age", but has since been expanded into a general FSB Extractor.
[color=#98fb98][b]Official Site[/b][/color]
[url=http://aezay.dk/aezay/fsbextractor/]http://aezay.dk/aezay/fsbextractor/[/url]
[color=#98fb98][b]Direct Download[/b][/color]
[url=http://aezay.dk/aezay/fsbextractor/FsbExtractor13.03.09.rar]FsbExtractor13.03.09.rar[/url] - Support for FSB files with basic headers.[color=#ff8080]
FsbExtractor13.02.11.rar - Proper FSB3 and FSB4 mode flags. Changes to how the WAVE header is written.
FsbExtractor13.01.13.rar - Properly detects FSB5 sample format, including Ogg Vorbis. Fixed a few errors.
FsbExtractor13.01.04.rar - Samples with same name no longer overwrites each other. Directory listing for other FSB files in same folder.
FsbExtractor12.12.20.rar - Support for command line parameters and detailed verbose logging.
FsbExtractor12.07.03.rar - It now fully supports all FSB5 files of NS2.
FsbExtractor12.06.29.rar
FsbExtractor12.06.26.rar
FsbExtractor12.06.15.rar
[/color]
[color=#98fb98][b]Description[/b][/color]
I've written a small tool to extract the sound samples of FSB files, and I just recently made it compatible with the FSB5 format, which is what NS2 uses now.
I'm aware of the FMOD Designer program, but if all you need is to extract and play the music, then you don't really want to install a large program.
[color=#98fb98][b]FSB Extractor - FMOD Sample Bank Extraction Tool[/b][/color]
With the tool, you can display and extract the sound samples contained within an FSB file. FSB stands for "FMOD Sample Bank".
Supports the FSB3, FSB4 and FSB5 file formats. Currently, there might be a few issues with FSB5, but the basics should work.
This program was originally made to open the FSB files of "Dragon Age", but has since been expanded into a general FSB Extractor.
[color=#98fb98][b]Official Site[/b][/color]
[url=http://aezay.dk/aezay/fsbextractor/]http://aezay.dk/aezay/fsbextractor/[/url]
[color=#98fb98][b]Direct Download[/b][/color]
[url=http://aezay.dk/aezay/fsbextractor/FsbExtractor13.03.09.rar]FsbExtractor13.03.09.rar[/url] - Support for FSB files with basic headers.[color=#ff8080]
FsbExtractor13.02.11.rar - Proper FSB3 and FSB4 mode flags. Changes to how the WAVE header is written.
FsbExtractor13.01.13.rar - Properly detects FSB5 sample format, including Ogg Vorbis. Fixed a few errors.
FsbExtractor13.01.04.rar - Samples with same name no longer overwrites each other. Directory listing for other FSB files in same folder.
FsbExtractor12.12.20.rar - Support for command line parameters and detailed verbose logging.
FsbExtractor12.07.03.rar - It now fully supports all FSB5 files of NS2.
FsbExtractor12.06.29.rar
FsbExtractor12.06.26.rar
FsbExtractor12.06.15.rar
[/color]
Comments
Don't you need the project file in addition to the fsb and fev files in order to do that ? Could we get it ?
It does indeed. It was originally made to extract the music from Dragon Age Origins, then later, I found out that there are actually many games that uses FSB files, and it worked for those games as well. The FSB5 format which NS2 just switched to, has a quite confusing data structure, there are actually a few of NS2's files it cannot properly play yet.
Don't you need the project file in addition to the fsb and fev files in order to do that ? Could we get it ?<!--QuoteEnd--></div><!--QuoteEEnd-->
yes u would need the project file, ive let charlie know that this should be given out with the builds, he agrees, it just hast happened yet but it will, probably for version 1, ill also do a nice tutorial on how to get your own sounds into the game.
cheers
simon
cheers
simon<!--QuoteEnd--></div><!--QuoteEEnd-->
Sounds great! I would love to see something like a video series covering most important stuff in FMOD.
There if anyone else is looking.
i cant download your tool,
is it outdated?
or, your website is offline?
EDIT: Tool is online thx
Is there a tool to build FSB5 files? I'd like to overwrite some of the origical sounds and make a sound mod.
It seems that Planetside2 uses FSB5 for it's audio but when i drop one of the files on it i get the following error:
Access Violation at address 004506C0 in module
'FsbExtractor.exe'. Read of address 00000004.
The program doesn't crash, but if i then dump that file out the RIFF header looks fine but if i try and play it back in various programs it doesn't work, in foobar2k it gives me: Unsupported format or corrupted file.
I can provide example files if you'd like.
Many thanks,
Intrinsic
Which program are you using to unpack the assets pack files of PlanetSide 2?
After unpacking a few FSB data from the pack files using a hex editor, they seem to be stored in the ADPCM format, and there has always been issues with that format and getting it to play properly. I will advice using VLC for playing ADPCM format files.
I'm interested in knowing how you made the program crash, which pack file and specific FSB file made this happen, all of them? Also, are you using the latest release, since I did fix a few errors in the one I put out a few days ago.
Thx
I am using the latest version: FsbExtractor13.01.04.rar
I have a python(2.7.3) script which unpacks all the .pack files into their individual asset, the game has 81k FSB files, i guess most of them are samples.
I get the error i mentioned when opening any of the decently sized files, the really small ones(1k -10k in filesize for example) just lock up the application and it sits there grinding my HD and the memory use going up and up
VLC just gives noise/static when playing back an extracted .wav. I already tried this last time but forgot to mention it as i tried so many programs to play it back i forgot which one it was ;p
Example files, all give the same error:
2.2Mb: <a href="http://www.zenadsl5706.zen.co.uk/PS2/MX_MAIN_THEME_nc.fsb" target="_blank">http://www.zenadsl5706.zen.co.uk/PS2/MX_MAIN_THEME_nc.fsb</a>
150Kb: <a href="http://www.zenadsl5706.zen.co.uk/PS2/VEH_SCYTHE_ENG_EXT_IDLE_LP.fsb" target="_blank">http://www.zenadsl5706.zen.co.uk/PS2/VEH_S...EXT_IDLE_LP.fsb</a>
2.5Kb: <a href="http://www.zenadsl5706.zen.co.uk/PS2/DX_SOLDIER_VS_F02_MELEE_ATTACK_01_es_ES.fsb" target="_blank">http://www.zenadsl5706.zen.co.uk/PS2/DX_SO...CK_01_es_ES.fsb</a>
<img src="http://www.zenadsl5706.zen.co.uk/PS2/FSBExtractWindow.png" border="0" class="linked-image" />
<img src="http://www.zenadsl5706.zen.co.uk/PS2/FullAssetDump.png" border="0" class="linked-image" />
Hopefully this post will be of some use to you.
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>##file is in big endian
##
##a pack file has several parts which are all identical in structure.
##there is no global header. not even magic
##
##
##START OF ONE PACK FILE PART
##
##metadata section (0x2000 bytes):
## uint32: absolute offset for the next part of the pack file (end of current part)
## if last pack part: 00000000
## uint32: number of entries
##
## strings prefixed with uint32 length, no trailing zero!
## 3 uint32 after the string
## 1 absolute offset (this can be in another pack part)
## 2 length
## 3 crc32 of the payload
##
## padding so the section has 0x2000 bytes
##
##
##payload section (trivial)
from struct import unpack,pack
import sys
import os
def ps2int(num):
intstr=str(num)
if len(intstr)==1: return "00"+intstr
elif len(intstr)==2: return"0"+intstr
else: return intstr
class entry:
pass
root=sys.path[0]+"\\"
inputfolder=root
targetfolder=root+"assets"+"\\"
ij=0
while 1:
partSize=1 #anything non-zero to make a do-while
entrylist=[]
fname=inputfolder+"Assets_"+ps2int(ij)+".pack"
if not os.path.exists(fname): break
f=open(fname,"rb")
print fname
while partSize:
partSize=unpack(">I",f.read(4))[0]
numEntries=unpack(">I",f.read(4))[0]
for i in xrange(numEntries):
ent=entry()
stringlen=unpack(">I",f.read(4))[0]
ent.name=f.read(stringlen)
ent.offset,ent.size,ent.crc32=unpack(">III",f.read(12))
entrylist.append(ent)
end=entrylist[-1].offset+entrylist[-1].size
f.seek(partSize)
for ent in entrylist:
extension = os.path.splitext(ent.name)[1][1:]
f.seek(ent.offset)
targetfolder2=targetfolder+extension+"\\"
if not os.path.isdir(targetfolder2): os.makedirs(targetfolder2)
f2=open(targetfolder2+ent.name,"wb")
f2.write(f.read(ent.size))
f2.close()
f.close()
ij+=1</div>
81k FSB files, whoa, that is a lot. Wonder why they aren't packed together?
After checking out those FSB files you linked to, I did find two minor bugs, but nothing that would lock up the program and cause the HD and memory usage to freak out. One of the errors would happen when you dragged and dropped a file to open it, the other was just a small display error with the "unknown extra id number".
The noise/static you get is as I mentioned before, they're ADPCM files, and they are compressed in a special way, different to regular ADPCM files, that I have no idea how to play back properly. VLC can play some of them, Natural Selection 2 for example, but not all.
I'll update here if I figure out more.
<a href="http://www.zenadsl5706.zen.co.uk/PS2/freaksout-AMB_AIR_HISS_LP_01.fsb" target="_blank">http://www.zenadsl5706.zen.co.uk/PS2/freak..._HISS_LP_01.fsb</a>
ADPCM was used on the GameCube and had it's own compression type so i check that and it's not one of those, but i know people(over at encode.ru) who if anyone is going to know it'll be them or one of their colleagues in the world of compression, although they aren't specifically working on sound stuff but may have an idea if it's a known algorithm and not some private FMOD one.
Some samples are however in ADPCM, and just like some of the ADPCM samples in NS2, they won't play properly even when using the in_xbadpcm Winamp plugin <a href="http://aluigi.altervista.org/papers.htm#xbox" target="_blank">from here</a>. ADPCM from what I understand is encoded using a common conversion table, and perhaps FMOD is just using their own specific tailored one for the FSB files.
The new release will show the PS2 samples as being Ogg Vorbis. Just make sure to disable the "Add Wave Header" option, as I didn't turn that specifically off for the Vorbis format. Or perhaps some players will work with the data better in a RIFF WAVE container?
Are you finding both <a href="http://aezay.dk" target="_blank">http://aezay.dk</a> as well as <a href="http://aezay.site11.com" target="_blank">http://aezay.site11.com</a> unavailable?
Aezay.dk immediately redirects to aezay.site11.com for me, so yes.
I noticed site11 is a subdomain for 000webhost. Don't they have a sort of routine maintenance or something that results in sites being unavailable for a bit? Could that be it?
Edit: I was able to access the site and download to my dropbox from my phone, but for whatever reason my PC can't connect to the site. Weird.
Seems while it is Ogg, PS2 uses some newer FMod stuff that does funny things to it so it may take a while for someone to figure it out.
<b>UPD:</b> nvm, extractor works fine, it is ww2ogg that cannot parse it. Damn.
Can't find anything else that looks like it.
Edit: managed to get on the site earlier and got it. Can't find the chuckle though
I'm trying to extract the music for a PC game : Might & Magic Clash of Heroes.
The res folder contains these two files (MMCoH_Music_Bank.fsb, MMCoH_Music.fev) amongst others.
When trying to load the fsb with Aezay's extractor, the response is that the file is invalid.
Looking at the .fev file content reveals that several dozen audio files are referenced...
Is there another way to determine which fsb format (or variation thereof) has been used for this game?
Thanks.
It's probably one of the "alien_2.fsb\taunt" or "alien_3.fsb\taunt*" samples, which all happens to be of the unplayable ADPCM format sadly.
eshazear
It's possible that those FSB files are encrypted, if you take a look at them in a hex editor, the 3 first characters of an FSB file should be FSB, otherwise it's encrypted or not an FSB file at all. The fourth character is the major FSB version, usually "3", "4" or "5".
Thank you so much for your FSB extract tool. I would like you know that it works wonderfully on Star Trek Online's .fsbs.
I have a feature request, however: is there any way to add all fsb's from a folder for mass convert using your tool, command or gui? I could find no such feature, even in the readme- although you gave instructions on how to run it in console mode, I would rather not manually list all of the files as stated- could you add this feature or is there something that I missed?
Jimmy
What stuff u guys recomend to repack fsb data?
I have fsb files in version 4