Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Extracting Audio from Hitman Absolution

Get help on any and all audio formats, or chip in and help others!
User avatar
ninearts
ultra-n00b
Posts: 8
Joined: Thu Nov 29, 2012 10:33 pm
Location: Poland, ninearts @ hitmanforum.com
Been thanked: 24 times

Extracting Audio from Hitman Absolution

Post by ninearts »

Having finished playing the game I decided to get my hands on those pretty sounds and songs in the game :)
First of all, I must say I'm new here and I'm a noob when it comes to quickbms, I just started getting the hang of it. The script I created is working just fine and I was able to extract all of the FSB5 banks (the format of all sounds in game, I guess) from .PC_RESOURCELIB files stored in folder pc.layoutconfig.
Here's the code:
[spoiler]

Code: Select all

# Game: Hitman Absolution (PC - Steam Version)
# Archive Format: *.PC_RESOURCELIB
# Audio format: *.fsb (FMOD's sample bank)
# Tip1: use FMOD Designer to play/rebuild banks
# Tip2: use Aezay FSB Extractor 12.07.03 to convert to WAV (PCM uncompressed)
# Copyright 2012-11-29 by ninearts @ Xentax
set NEWNAME string "res_"
set EXTENSION string ".fsb"
set COUNTER 0
for
findloc FSB string "FSB5"
goto FSB 0
get IDFSB long
get UNK1 long
if UNK1 < 16
get ENTRIES long
math ENTRIES *= 4
get HEADERSIZE long
get NAMELENGTH long
get DATASIZE long
savepos IDHEADER
goto IDHEADER 0
goto 36 0 SEEK_CUR
goto HEADERSIZE 0 SEEK_CUR
goto ENTRIES 0 SEEK_CUR
getdstring FILENAME NAMELENGTH
set HEADERINFO 0
math HEADERINFO += 60
math HEADERINFO += HEADERSIZE
math HEADERINFO += NAMELENGTH
math DATASIZE += HEADERINFO
if NAMELENGTH == 0
set RANDOMNAME NEWNAME
math COUNTER += 1
string RANDOMNAME += COUNTER
string RANDOMNAME += EXTENSION
log RANDOMNAME FSB DATASIZE
else
string FILENAME += EXTENSION
log FILENAME FSB DATASIZE
endif
else
findloc FSB string "FSB5"
endif
next
[/spoiler]

Enjoy and happy extracting :)
ninearts

EDIT 17.01.2020

I've created a small program in C# based on that code above.
That should facilitate your endeavors :D
See the attachement
hitmanaudiotools.zip
You do not have the required permissions to view the files attached to this post.
Last edited by ninearts on Fri Jan 17, 2020 12:56 pm, edited 9 times in total.
"Reality check"
Hitman Audio Tools
Image
OrangeC
double-veteran
double-veteran
Posts: 868
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 41 times

Re: Extracting Audio from Hitman Absolution

Post by OrangeC »

Thanks!
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

Someone can convert on MP3 all the audio files in the game and upload it?

I don't know how do it! :(
saitek1911
ultra-n00b
Posts: 9
Joined: Mon Oct 08, 2012 10:26 pm

Re: Extracting Audio from Hitman Absolution

Post by saitek1911 »

ninearts wrote:Having finished playing the game I decided to get my hands on those pretty sounds and songs in the game :)
First of all, I must say I'm new here and I'm a noob when it comes to quickbms, I just started getting the hang of it. The script I created is working just fine and I was able to extract all of the FSB5 banks (the format of all sounds in game, I guess) from .PC_RESOURCELIB files stored in folder pc.layoutconfig.
Here's the code:

Code: Select all

# Game: Hitman Absolution (PC - Steam Version)
# Archive Format: *.PC_RESOURCELIB
# Audio format: *.fsb (FMOD's sample bank)
# Tip1: use FMOD Designer to play/rebuild banks
# Tip2: use Aezay FSB Extractor 12.07.03 to convert to WAV (PCM uncompressed)
# Copyright 2012-11-29 by ninearts @ Xentax
idstring "BILR"
set NEWNAME string "res_"
set EXTENSION string ".fsb"
set COUNTER 0
for
findloc FSB string "FSB5"
goto FSB 0
get IDFSB long
get UNK1 long
if UNK1 < 16
get NUMSTRING long
math NUMSTRING *= 4
get HEADERSIZE long
get NAMELENGTH long
get DATASIZE long
goto FSB 0
goto 60 0 SEEK_CUR
savepos HEADSTART
goto HEADSTART 0
goto HEADERSIZE 0 SEEK_CUR
savepos ENDHEAD
goto ENDHEAD 0
goto NUMSTRING 0 SEEK_CUR
getdstring FILENAME NAMELENGTH
savepos DATASTART
goto DATASTART 0
set HEADERINFO 0
math HEADERINFO += 60
math HEADERINFO += HEADERSIZE
math HEADERINFO += NAMELENGTH
math DATASIZE += HEADERINFO
if NAMELENGTH == 0
set RANDOMNAME NEWNAME
math COUNTER += 1
string RANDOMNAME += COUNTER
string RANDOMNAME += EXTENSION
log RANDOMNAME FSB DATASIZE
else
string FILENAME += EXTENSION
log FILENAME FSB DATASIZE
endif
else
findloc FSB string "FSB5"
endif
next
I know there's someone who could make the code more efficient. Please let me know what you think :)
Enjoy and happy extracting :)

ps. Script is also in the attachement

ninearts

Thanks for the script, but i get out of memory problem all the time on MultiEx
OrangeC
double-veteran
double-veteran
Posts: 868
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 41 times

Re: Extracting Audio from Hitman Absolution

Post by OrangeC »

I can extract the segments but combining them is the problem because apparently there some overlaps at the start and end of each segment. Can anyone figure out how to combine the segments properly?
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

OrangeC wrote:I can extract the segments but combining them is the problem because apparently there some overlaps at the start and end of each segment. Can anyone figure out how to combine the segments properly?
Well, is better than nothing. :D

But, so when you extract the segment what do you have? A small audio file or similar?
OrangeC
double-veteran
double-veteran
Posts: 868
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 41 times

Re: Extracting Audio from Hitman Absolution

Post by OrangeC »

Well each theme in the game is composed of 10 seconds segments. Combining them straight away ius not possible because there are gaps and overlaps that prevent a smooth transition.
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

OrangeC wrote:Well each theme in the game is composed of 10 seconds segments. Combining them straight away ius not possible because there are gaps and overlaps that prevent a smooth transition.
Uhm, understand. :(
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

Some news?
kilik
mega-veteran
mega-veteran
Posts: 195
Joined: Sat Dec 08, 2012 11:14 am
Has thanked: 31 times
Been thanked: 4 times

Re: Extracting Audio from Hitman Absolution

Post by kilik »

how use fmod no way to do batch for him ? fmod don't stop crashing on compile

i try this cmd line
fmod_designercl.exe -pc 01.fdp -pcm

build crash on some fsb but no crash one by one
log not identify source of problem someone got
User avatar
ninearts
ultra-n00b
Posts: 8
Joined: Thu Nov 29, 2012 10:33 pm
Location: Poland, ninearts @ hitmanforum.com
Been thanked: 24 times

Re: Extracting Audio from Hitman Absolution

Post by ninearts »

I've also found out that themes are split into segments, which are of random length. The only thing that remains constant for them is the overlap of 0.4 sec. I used Adobe Audition to put the pcm wav segments together and applied 0.2 sec wave in (except 1 segment) and 0.4 wave out (except last segment). The result caressed my ears LOL. No pops no cracks during play :))
I did all manually, it was quite a mastodontic job. I created scripts for waving in and out, but couldn't come up with an idea of batch processing more of this splendid stuff.
"Reality check"
Hitman Audio Tools
Image
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

ninearts wrote:I've also found out that themes are split into segments, which are of random length. The only thing that remains constant for them is the overlap of 0.4 sec. I used Adobe Audition to put the pcm wav segments together and applied 0.2 sec wave in (except 1 segment) and 0.4 wave out (except last segment). The result caressed my ears LOL. No pops no cracks during play :))
I did all manually, it was quite a mastodontic job. I created scripts for waving in and out, but couldn't come up with an idea of batch processing more of this splendid stuff.
You are great! :]
killer7
n00b
Posts: 17
Joined: Fri Apr 08, 2011 8:50 am
Has thanked: 1 time

Re: Extracting Audio from Hitman Absolution

Post by killer7 »

ninearts wrote:I've also found out that themes are split into segments, which are of random length. The only thing that remains constant for them is the overlap of 0.4 sec. I used Adobe Audition to put the pcm wav segments together and applied 0.2 sec wave in (except 1 segment) and 0.4 wave out (except last segment). The result caressed my ears LOL. No pops no cracks during play :))
I did all manually, it was quite a mastodontic job. I created scripts for waving in and out, but couldn't come up with an idea of batch processing more of this splendid stuff.
Some news?
kangmin
n00b
Posts: 17
Joined: Sun Jun 17, 2012 9:38 am

Re: Extracting Audio from Hitman Absolution

Post by kangmin »

any idea where to get the q toggle shooting sound fx ? @_@ like the after math of grenade explosion the *eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii* sound
kilik
mega-veteran
mega-veteran
Posts: 195
Joined: Sat Dec 08, 2012 11:14 am
Has thanked: 31 times
Been thanked: 4 times

Re: Extracting Audio from Hitman Absolution

Post by kilik »

i try on another computer for fmod design compile but it's crash on build again
Post Reply