Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 26-02-2022, 14:38
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,159
Thanks: 284
Thanked 1,349 Times in 612 Posts
Masquerade is on a distinguished road
Thumbs up How to properly compress FMOD vorbis audio

How to properly compress FMOD vorbis audio

Good evening everyone. I will not spend too long writing up this one since I detailed a lot in the WWise guide.

Like I noted in my guide for WWise audio, the WAV version of FMOD can be compressed with MSC just fine. FSB files contain OGG audio or WAV (and in some cases, both). OGGs, when done correctly, can be compressed with Oggre, saving you some space.

Here is the guide for how to properly compress FMOD audio. Part credits go to sowwyitsanalt for helping dig up some of these tools to help with the process.

Guide

Step 1: if you have an FMOD .bank file
  1. Dump the bank to an fsb file using BankDumper.
    Code:
    BankDumper Master.bank Master.FSB

Step 2: now that you have a file that starts with FSB5 header

  1. Download the attachment from below - "Python-FSB5.7z". This is a modified version of this library used to dump FMOD audio into playable OGGs and WAVs. Thanks to anadius for the modifications.
  2. Extract the 7z.
  3. Install Python if you do not have it installed, you will need it to run the script.
  4. Open a command window in the folder containing your bank
  5. Run: extract.py "<fsb file>" -o "<output folder"
    Code:
    extract.py Master.FSB -o Master
  6. Pray that it works. If you get an error message, I would stop using this bank and move on, but it's up to you.

Step 3: Building the big ogg file
  1. Use Bincat by Aluigi to concatenate the oggs in the output folder into a single file. If there are wavs, concatenate them into a separate file.

    Code:
    bincat Master\*.ogg Master.TMP
    Code:
    bincat Master\*.wav Master.TMP2

Step 4: OGG to FMOD
  1. At this point, we are working on our recompression steps. Use oggvorbis2fsb5 to turn your big ogg file into an FMOD audio file.
    Code:
    oggvorbis2fsb5 Master.TMP Master.DAT
    This tool will crash if any non OGG data is in the big file, so this is why we separate our wavs. If you have any wav data, use Bincat to combine the output from oggvorbis2fsb5 with the WAV TMP file you made earlier.
    Code:
    bincat Master.DAT Master.TMP2 Master.FSB_NEW

Step 5: Make a patch to the original bank
  1. Depending on your output from step 4, you will either have a DAT file or a FSB_NEW file. You can now use XDelta or HDiffZ to make a patch from this file to the original bank. See how small it is!

    If you use this method for installation, follow step 4 after extracting your archive to build the FMOD compatible data then instead of making the patch, apply the patch you made in step 5 to restore the original file.



Hopefully you now understand the process of compressing FMOD audio.

Referring to the above method, Master.TMP will be able to be compressed with oggre leading to smaller size than if you ran LZMA or whatever over the BANK.

This method is hit and miss, since there can be frequent errors with the python script. It isn't perfect.

If you would like a visual example, with screenshots and demonstration on a sample bank, please let me know and I shall provide.
Attached Files
File Type: 7z Python-FSB5.7z (447.4 KB, 52 views)

Last edited by Masquerade; 26-02-2022 at 14:55.
Reply With Quote
The Following 9 Users Say Thank You to Masquerade For This Useful Post:
:( Sad8669 (26-02-2022), dixen (27-02-2022), ffmla (28-02-2022), Gehrman (26-02-2022), Junior53 (24-06-2023), kj911 (07-04-2022), rambohazard (04-03-2022), Wanterlude (26-02-2022), wareck (15-04-2024)
Sponsored Links
  #2  
Old 06-04-2022, 18:53
L33THAK0R's Avatar
L33THAK0R L33THAK0R is offline
Registered User
 
Join Date: Feb 2021
Location: Saudi Arabia
Posts: 350
Thanks: 119
Thanked 58 Times in 37 Posts
L33THAK0R is on a distinguished road
Has anyone else encountered/attempted to apply this method to a "*.fsb" file present amongst a selection of "*.bank* files? I'm currently attempting to do so with the title "Hades" and have unfortunately had little success. Rebuilding the extracted Vorbis OGG audio files into a generated "*.tmp" fails, crashing "bincat", which I assume is likely due to the ~20,000 files extracted. Attempting to create 2 seperate ".tmp" files and manually merging them also seems to not be possible however further experimentation is required to discern whether the methods employed are at fault rather than the concept itself. I believe figuring out a viable solution is important for this title as the "VO.fsb" makes up for 655 MB out of the total 1.09 GB of FMOD audio containers present.

Last edited by L33THAK0R; 06-04-2022 at 18:59.
Reply With Quote
  #3  
Old 07-04-2022, 00:04
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,159
Thanks: 284
Thanked 1,349 Times in 612 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by L33THAK0R View Post
"VO.fsb" makes up for 655 MB out of the total 1.09 GB of FMOD audio containers present.
Please may you upload this file and send it to me? I would love to take a look.
Reply With Quote
  #4  
Old 28-06-2022, 23:27
fabrieunko fabrieunko is online now
Registered User
 
Join Date: Sep 2021
Location: france
Posts: 132
Thanks: 195
Thanked 30 Times in 23 Posts
fabrieunko is on a distinguished road
Hello, I try your tutorial but I have this message on all the files I test. Is this normal?

Code:
extract.py VO_FR.FSB -o VO_FR
Traceback (most recent call last):
  File "F:\fmod\extract.py", line 131, in <module>
    main()
  File "F:\fmod\extract.py", line 127, in main
    exit(app.run(sys.argv[1:]))
  File "F:\fmod\extract.py", line 120, in run
    with open(fname, 'rb') as f:
PermissionError: [Errno 13] Permission denied: 'VO_FR.FSB'

and if I directly indicate the name of the fsb file I have this message


Code:
f:\fmod>extract.py VO_FR.dat -o VO_FR
Traceback (most recent call last):
  File "F:\fmod\extract.py", line 131, in <module>
    main()
  File "F:\fmod\extract.py", line 127, in main
    exit(app.run(sys.argv[1:]))
  File "F:\fmod\extract.py", line 121, in run
    self.handle_file(f)
  File "F:\fmod\extract.py", line 110, in handle_file
    for sample_fakepath, sample_name, sample_data in self.read_samples(fakepath_prefix, fsb, ext):
  File "F:\fmod\extract.py", line 86, in read_samples
    yield sample_fakepath, sample.name, fsb.rebuild_sample(sample)
  File "F:\fmod\fsb5\__init__.py", line 211, in rebuild_sample
    from . import vorbis
  File "F:\fmod\fsb5\vorbis.py", line 12, in <module>
    vorbis = load_lib('vorbis')
  File "F:\fmod\fsb5\utils.py", line 76, in load_lib
    raise LibraryNotFoundException("Could not load the library %r" % (names[0]))
fsb5.utils.LibraryNotFoundException: Could not load the library 'vorbis'

Last edited by fabrieunko; 28-06-2022 at 23:36.
Reply With Quote
  #5  
Old 29-06-2022, 00:53
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,159
Thanks: 284
Thanked 1,349 Times in 612 Posts
Masquerade is on a distinguished road
Put libogg.dll and libvorbis.dll from that archive in System32. That's how I fixed this.
Reply With Quote
  #6  
Old 14-04-2024, 07:38
wareck wareck is offline
Registered User
 
Join Date: Dec 2017
Location: Mars
Posts: 40
Thanks: 9
Thanked 16 Times in 11 Posts
wareck is on a distinguished road
Hello
I follow this guide but I've got some but I'm having trouble finalizing the project...

What I've done:
file.bank => extract FSB file with quickbms
PythonFSB5=>extract all .ogg file
bincat to concatenate all .ogg file

now i do not understand that :
if I use oggvorb2fsb on this file I have a very small gain durring compression almost nothing
If i use oggre I have a very high gain , but crc error when I unpack file...

for now if I do this
file.bank => extract FSB file with quickbms
PythonFSB5=> extract all .ogg files
bincat => one big file
oggvorb2fsb5 => one big encoded file
hdiffpatch between original.bank and my new file
compress encoded file + diff file

during unpack
hpatchz encoded + diff file => restore my original file.bank

It works but very small ratio gain in conversion...

thanks for your help

regards
Reply With Quote
  #7  
Old 14-04-2024, 13:34
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,159
Thanks: 284
Thanked 1,349 Times in 612 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by wareck View Post
If i use oggre I have a very high gain , but crc error when I unpack file...
Use another hdiff patch from the decoded data from oggre_dec.exe to the concatenated ogg files. That hdiff patch should be tiny. Don't use oggre under freearc if you get a CRC fail.
Reply With Quote
The Following User Says Thank You to Masquerade For This Useful Post:
wareck (15-04-2024)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to correctly process WWise Vorbis Audio | Guide + WemTool Masquerade Conversion Tutorials 25 01-09-2024 22:45
Anno 1701 won't load, just get a blue screen! Shadow22 General Gaming 5 28-08-2012 12:52
CPU jumps up to 100% now, not before dav6 Software 11 24-05-2008 03:33
air force delta snake DC Games 0 15-04-2001 04:34
air force delta snake DC Games 1 13-04-2001 20:04



All times are GMT -7. The time now is 11:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com