diff --git a/README.md b/README.md index b59ac89..b9fdc2e 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Extract audio from .pck and .hdiff to mp3 with this tool. It can in theory extra 1. Get repo by cloning it -> `git clone https://github.com/Escartem/WwiseExtract` or [downloading it](https://github.com/Escartem/WwiseExtract/archive/refs/heads/master.zip) 2. Install dependencies -> `pip install -r requirements.txt` -3. Place all of your `.pck` files in the *original* folder and `.pck.hdiff` in the *hdiff* folder -> ⚠️ If you want to extract an hdiff content, you must place the pck file with the same name before patch in the original folder, pck's that do not have a corresponding hdiff file will be extracted normally, when they do have a corresponding hdiff file, only the hdiff file content is extracted and not the full pck +3. Place all of your `.pck` files in the *audio* folder and `.pck.hdiff` in the *patch* folder +> ⚠️ If you want to extract an hdiff content, you must place the pck file with the same name before patch in the *audio* folder, pck's that do not have a corresponding hdiff file will be extracted normally, when they do have a corresponding hdiff file, only the hdiff file content is extracted and not the full pck 4. Start the program -> `python extract.py` 5. After finishing, everything will be in the *output* folder in the mp3 format (ogg may be added later) diff --git a/hdiff/.keep b/audio/.keep similarity index 100% rename from hdiff/.keep rename to audio/.keep diff --git a/extract.py b/extract.py index 6ce55bb..c0e5658 100644 --- a/extract.py +++ b/extract.py @@ -32,8 +32,8 @@ def main(): shutil.rmtree("output") # Get all files to process - hdiff_files = [f for f in os.listdir("original") if f.endswith(".pck") and os.path.exists(f"hdiff/{f}.hdiff")] - alone_files = [f for f in os.listdir("original") if f.endswith(".pck") and not os.path.exists(f"hdiff/{f}.hdiff")] + hdiff_files = [f for f in os.listdir("audio") if f.endswith(".pck") and os.path.exists(f"patch/{f}.hdiff")] + alone_files = [f for f in os.listdir("audio") if f.endswith(".pck") and not os.path.exists(f"patch/{f}.hdiff")] files = [*hdiff_files, *alone_files] print(f"{len(files)} file(s) to extract") iteration = 0 @@ -58,7 +58,7 @@ def main(): if os.path.exists("temp"): shutil.rmtree("temp") os.makedirs(path("temp"), exist_ok=True) - shutil.copy(f"original/{file}", f"temp/{file}") + shutil.copy(f"audio/{file}", f"temp/{file}") output_path = "original_decoded" if alone: @@ -92,7 +92,7 @@ def main(): curr += 1 # update files - shutil.copy(f"hdiff/{file}.hdiff", f"temp/{file}.hdiff") + shutil.copy(f"patch/{file}.hdiff", f"temp/{file}.hdiff") shutil.move(f"temp/{file}", f"temp/{file.split('.')[0]}.original.pck") # prepare args diff --git a/original/.keep b/patch/.keep similarity index 100% rename from original/.keep rename to patch/.keep