Aller au contenu

Photo

How to convert/extract DA2 *.bnk files to audio (Guide)


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
DahliaLynn

DahliaLynn
  • Members
  • 1 387 messages
After doing quite a bit of research, and following this thread , I managed to convert bnk files in order to extract DA2's sound effects and other files not found in the *.ogg erfs.

(Apologies if this is posted somewhere, I couldn't find it anywhere and figured I would share my findings)


1. Extract the DA2 *.erf soundbanks (Modules_Campaign base, etc) using pyGFF by clicking on file > export all

You will have a list of *.bnk files

2. Download Quickbms and extract to the same folder (for simplicity)

3. Create a new text document using notepad and insert the following script: (which I found here)

for i = 1
   FindLoc OFFSET STRING "WAVEfmt" 0 ""
   if OFFSET != ""
      math OFFSET -= 8
      goto OFFSET
      FindLoc DATA STRING "data" 0 ""
      math DATA += 4
      goto DATA
      get SSIZE long
      savepos HEADER
      math HEADER -= OFFSET
      set SIZE HEADER
      math SIZE += SSIZE
      get NAME basename
      string NAME += "_"
      string NAME += i
      string NAME += ".wav"
      log NAME OFFSET SIZE
   else
      cleanexit
   endif
next i

4. Save this with any name you wish with the extension *.bms (or *.txt , doesn't matter)

5. Double click on Quickbms.exe and follow the directions carefully. Select the file you wish to convert, the script you just saved, and the output folder.

This should extract any audio file found in the *.bnk with a filesize above 1 kb.

You will end up with various wave files that are in ogg format (though listed as wav).

6. Once you've done this download the ogg converter found here

7. Extract these files to the same folder (again for simplicity).

8. Create a new text file in notepad and insert the following line:

FOR %%a in (*.wav) do ww2ogg "%%a"

(please note: in cases where you wish to convert files with the *.ogg extension, you need to edit the contents of the parenthesis accordingly )

Save this file as "runthis2wwogg.bat" (making sure the extension is changed from *.txt to *.bat)

9. Run the batch file and convert the audiofiles.

They should now be playable or importable by your audio program.

Modifié par DahliaLynn, 11 août 2012 - 09:57 .


#2
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
thank you. how to convert those to uncompressed wav, however, rather than ogg?

#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
also, most of the wav files converted are abruptly cut off. how to solve this?