Created
July 31, 2022 03:51
-
-
Save psyouloveme/9216121fad20cd98a014f7b98bf83844 to your computer and use it in GitHub Desktop.
Extract & convert Shenmue 1 (DC) audio to WAV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM Extract and Shenmue 1 Audio files in SCENE/##/STREAM/*.AFS and convert to WAV. | |
@REM Run from SCENE/##/STREAM/ | |
@REM Windows batch script to extract .AFS files in the current directory | |
@REM and then convert any extracted .str files to .wav files. | |
@REM Requires in path: | |
@REM AFSPacker: https://github.com/MaikelChan/AFSPacker | |
@REM vgmstream: https://github.com/vgmstream/vgmstream | |
@REM Manually update SCENE on the CSV line as necessary. | |
@ECHO off | |
ECHO Starting extract | |
ECHO Starting extract > extract_audio.log | |
ECHO SCENE, STREAM, STR > result.csv | |
FOR /R %%G IN (*.AFS) DO ( | |
ECHO Extracting %%~nxG | |
ECHO Extracting %%~nxG >> extract_audio.log | |
AFSPacker -e %%~nxG %%~nG >> extract_audio.log | |
ECHO Moving JSON reuslt file to %%~nG >> extract_audio.log | |
move %%~nG.json %%~nG >> extract_audio.log | |
ECHO Writing CSV row 02, %%~nG, %%~nJ >> extract_audio.log | |
ECHO 02, %%~nG, >> result.csv | |
ECHO Start processing STR files in %%~nxG | |
ECHO Start processing STR files in %%~nxG >> extract_audio.log | |
FOR /R %%J IN (%%~nG\*.str) DO ( | |
ECHO Converting %%~nG\%%~nxJ to %%~nG\%%~nJ.wav >> extract_audio.log | |
vgmstream -o %%~nG\%%~nJ.wav %%~nG\%%~nxJ >> extract_audio.log | |
ECHO Writing CSV row 02, %%~nG, %%~nJ >> extract_audio.log | |
ECHO 02, %%~nG, %%~nJ >> extract_audio_result.csv | |
ECHO Removing STR file %%~nG\%%~nxJ >> extract_audio.log | |
DEL /F /Q %%~nG\%%~nxJ >> extract_audio.log | |
) | |
ECHO Finished processing STR files in %%~nxG | |
ECHO Finished processing STR files in %%~nxG >> extract_audio.log | |
) | |
ECHO Extract finished | |
ECHO Extract finished >> extract_audio.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment