Skip to content

Commit

Permalink
-updated unpack to mp3 conversion
Browse files Browse the repository at this point in the history
-reorganized common script structure
  • Loading branch information
mortalis13 committed Feb 12, 2021
1 parent c96c947 commit 909f1bf
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 69 deletions.
1 change: 0 additions & 1 deletion Decoding/.keep

This file was deleted.

1 change: 0 additions & 1 deletion MP3/.keep

This file was deleted.

1 change: 0 additions & 1 deletion OGG/.keep

This file was deleted.

47 changes: 6 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
# Wwise-Unpacker
Unpack game audio Wwise files (pck, bnk)

**This guide is for Windows-64bit only!** I'll be using the game Life is Strange **as an example**.
See the **README** in the original repository.

Here's the archive structure:
------

* Wwise Unpacker
* MP3 (Unpacked MP3s)
* OGG (Unpacked OGGs)
* Game Files (PCK and BNK files)
* Tools (Tools used for the unpacking process)
* Unpack to MP3.bat
* Unpack to OGG.bat

Now we have to find the audio files to unpack. Life is Strange uses Wwise audio so files are packaged in either .PCK or .BNK containers.
You can just search for *.PCK or *.BNK but I prefer the following method: go to the game folder (C:/Program Files (x86)/Steam/steamapps/common/Life Is Strange) and search for "WwiseAudio" which will show you the audio folder for each chapter.
This modified version includes:

Inside each folder you will find the following types of files which are quite self explanatory:

* Music
* Ambiance
* Cutscene
* Sfx
* Voice files are inside "English(US)" in each folder, they start with "VO_" (Voice-over).

Keep in mind these are containers, inside each there could be either one or hundreds of audio files. Some of the largest VO containers have **over 500!** Fortunately they are all properly labeled with episode, character, location, action and mood after unpacking.
For example: *VO_E2_2A.STM_15~Cue_E2_2A_Diner_ChloePuzzle02Happy_IGE_Chloe_200.ogg*

Find any containers you want to decode and copy them to the "Game Files" folder inside Wwise Unpacker (they can be either PCK or BNK, the unpacker handles it), then simply open "Unpack to MP3.bat" or "Unpack to OGG.bat" depending on which you like and it will do all the work for you.
Once finished you can find all decoded files inside the "MP3" or "OGG" folder respectively.

**Things you should know about the decoder:**

* Depending on the number and size of the files it can take a while, let it run until you see the ASCII tornado.
* The decoder will offer to delete files in "Game Files" so you don't accidentally decode the same files again.
* Sometimes there can be filename conflicts while decoding (multiple files with the same name), just type "r" and hit enter on the command window when prompted. This will rename the files so you can keep all of them.
* When decoding MP3 files are first unpacked as OGG and then converted with FFmpeg and the LAME MP3 encoder. If you want the best quality possible don't use MP3, unpack it as OGG.
* The unpacker can be used for any game that uses Wwise audio, not only Life is Strange.

**I unpacked to .OGG for the best quality, how do I even open these files?**

You'll need a player that supports the format! Personally I use "foobar2000" but feel free to search around and find what's best for you.

---

If you end up doing something with the audio (videos for example) let me know, I really enjoy looking at other people's work. Hope this helped someone!
- **Unpack to WAV** script
- updated versions for **quickbms**, **vgmstream**
- reorganized scripts structure
2 changes: 0 additions & 2 deletions Unpack to OGG.bat

This file was deleted.

53 changes: 30 additions & 23 deletions _unpack_common.bat
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
@echo off

mkdir Decoding > nul 2>&1
mkdir OGG > nul 2>&1
mkdir MP3 > nul 2>&1
mkdir WAV > nul 2>&1

set TYPE=%1

echo === Wwise_Unpacker v1.1 ===
echo.
echo -- Unpacking to '%TYPE%'
@echo on

if "%TYPE%"=="WAV" (
FOR %%a IN ("Game Files\*.PCK") DO ("Tools\quickbms.exe" "Tools\wwise_pck_extractor.bms" "%%a" "Decoding")
FOR %%b IN ("Game Files\*.BNK") DO ("Tools\bnkextr.exe" "%%b" & REN *.wav *.wem & MOVE *.wem "Decoding")
FOR %%a IN ("Decoding\*.WEM") DO ("Tools\vgmstream-cli.exe" -o "WAV\%%~na.wav" "%%a" & echo.)
)
goto:start

if "%TYPE%"=="OGG" (
FOR %%a IN ("Game Files\*.PCK") DO ("Tools\quickbms.exe" "Tools\wavescan.bms" "%%a" "Decoding")
FOR %%b IN ("Game Files\*.BNK") DO ("Tools\bnkextr.exe" "%%b" & MOVE *.wav "Decoding")
FOR %%c IN (Decoding\*.WAV) DO ("Tools\ww2ogg.exe" "%%c" --pcb Tools\packed_codebooks_aoTuV_603.bin & DEL "%%c")
FOR %%d IN (Decoding\*.OGG) DO ("Tools\revorb.exe" "%%d" & MOVE "%%d" "%TYPE%")
)
rem ================= Methods
:UNPACK_WAV
echo -- UNPACK_WAV
mkdir Decoding > nul 2>&1
mkdir WAV > nul 2>&1
echo ... Running 'quickbms'
FOR %%a IN ("Game Files\*.PCK") DO ("Tools\quickbms.exe" "Tools\wwise_pck_extractor.bms" "%%a" "Decoding")
echo ... Running 'bnkextr'
FOR %%b IN ("Game Files\*.BNK") DO ("Tools\bnkextr.exe" "%%b" & REN *.wav *.wem & MOVE *.wem "Decoding")
echo ... Running 'vgmstream-cli'
FOR %%a IN ("Decoding\*.WEM") DO ("Tools\vgmstream-cli.exe" -o "WAV\%%~na.wav" "%%a" & echo.)
goto:eof

:UNPACK_MP3
echo -- UNPACK_MP3
mkdir MP3 > nul 2>&1
rem call :UNPACK_WAV
echo ... Running 'ffmpeg'
FOR %%e IN (WAV\*.WAV) DO (echo Converting %%e & "Tools\ffmpeg.exe" -loglevel error -y -i "%%e" -acodec libmp3lame -q:a 0 -y "MP3\%%~ne.mp3" & DEL "%%e")
goto:eof


rem ================= Main
:start
if "%TYPE%"=="WAV" (
call :UNPACK_WAV
)
if "%TYPE%"=="MP3" (
FOR %%e IN (MP3\*.OGG) DO ("Tools\ffmpeg.exe" -i "%%e" -acodec libmp3lame -q:a 0 -y "MP3\%%~ne.mp3" & DEL "%%e")
call :UNPACK_MP3
)

@echo off

rem ================= Footer
echo.
echo.
echo.
Expand All @@ -57,10 +66,8 @@ echo Watch out, it's the tornado!

echo.
echo -------------------------------------------------------------

echo Unpack finished! Files should be in the '%TYPE%' folder

echo -------------------------------------------------------------
echo.

pause
pause

0 comments on commit 909f1bf

Please sign in to comment.