Audio Ripping Extraction & Converting Tutorial?

(Modding and other series related projects)

Audio Ripping Extraction & Converting Tutorial?

Postby ReeceKun » Thu Feb 18, 2010 8:49 pm

I really want to be able to rip ALL audio (Speech & Music) from Shenmue1+2 but I cant find any documentation on doing it from start to finish, there are links to random programs and converters but no explanation on how to use or play them.
Maybe once their all converted to wav.mp3 they could be hosted somewhere.
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby SiZiOUS » Fri Feb 19, 2010 7:01 am

Hi there,

I have seen several sound formats in this game:
  • ADPCM (.STR)
  • CRI Middleware (.AHX/.ADX)
  • AM2 DTPK (.SND)

For decoding STR files, you'll need vgmstream. You can also use my ADPCM Streaming Toolkit, based on vgmstream as well but optimized for Shenmue STR files.

For CRI AHX/ADX files, you'll need the ADX Tools SDK from CRI.

And for the lastest format, the AM2 DTPK files, you'll need dsfdtpk from kingshriek.

All these tools are command-lines based.

Enjoy!
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby Master Kyodai » Fri Feb 19, 2010 8:25 am

If i got the time at the weekend i will try to make a more detailed guide about the tools and different formats, i remember that at least with kingshriek's python scripts i fought quite for a while untill i got results, at least for me it was not "that easy" to get them to extract what i want.
User avatar
Master Kyodai
"After Burner...Great!"
"After Burner...Great!"
 
Joined: May 2003

Postby ReeceKun » Fri Feb 19, 2010 9:14 am

Image

These are all the file types from Shenmue Disc 1 all copied into their own folders.

I know that AFS are container type files (usually containing ADX audio) but these AFS containers only seem to contain Bin files (which I think is probabally the speech audio) GZ are containers too mostly with SPR's in them.

I downloaded both DFS+Streams from a link in the Rip Compendum Thread

Ive installed winamp I cant get 'Highly experimental or VGAstreams' to work at all , I downloaded dsfdtpk.py and Python , I have no idea how to run the command line via python'

I understand that the speech audio files are long audio files, this is the same as resident evil audio and im sure I heard conversations in that that weren't in the game.

My Ultimate goal is to learn everything from the audio, Ive never seen the cutscene about megumi being allowed to keep the kitten .. and I fed that lil furry bastard everyday, or the cutscene were the "friends" come round for tea ... and they never got me a christmas present!
Point being as fun as it is playing the game and talking to every character asking them every question multiple times and learning that Nozomi talks about Ryo everynight, ... ripping the audio just seems more productive.
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby SiZiOUS » Fri Feb 19, 2010 9:35 am

GZ stands for GZip archive (I'm sure you know it), mostly then contains SPR indeed but sometimes PKS / PKF file too. Look at the TEXTURES.PKS file in the MISC folder. It's a PAKS GZipped file.

AFS are usually containing ADX audio, that's right, but in this game it's not really only that:

For example the HUMANS.AFS file contains NPC PKS/PKF files, standing for NPC characters in the Free Quest mode. All AFS in the STREAM directory contains cutscenes data, in fact STR (or AHX for Shenmue II) and SRF file. STR are an audio format (for the voices) and .SRF is the subtitle file (can be opened with Cinematics Editor).

I'll try to use the tools to decode sound if you want, and post the commands to use there.

For STR files I can help you because I made the package.

1. Get the tool and unzip it in a directory (in this example the output dir = "ADPCM_TOOL")
2. Extract an AFS from the STREAM folder, for example \SCENE\01\STREAM\01BEDA.AFS (i'm working on the PAL release of Shenmue 1). Open it with an AFS extractor, like AFS Utils or AFS Explorer.
3. Get the .STR files from the extracted AFS and open a command prompt (Start menu > Run > "cmd" and OK).
4. Navigate in the "ADPCM_TOOL" directory created (using the cd command).
5. Type str2wav myfile where myfile is the input file, myfile.str. An output myfile.wav will be generated.
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby ReeceKun » Fri Feb 19, 2010 10:30 am

SiZiOUS wrote:For STR files I can help you because I made the package.

1. Get the tool and unzip it in a directory (in this example the output dir = "ADPCM_TOOL")
2. Extract an AFS from the STREAM folder, for example \SCENE\01\STREAM\01BEDA.AFS (i'm working on the PAL release of Shenmue 1). Open it with an AFS extractor, like AFS Utils or AFS Explorer.
3. Get the .STR files from the extracted AFS and open a command prompt (Start menu > Run > "cmd" and OK).
4. Navigate in the "ADPCM_TOOL" directory created (using the cd command).
5. Type str2wav myfile where myfile is the input file, myfile.str. An output myfile.wav will be generated.


This is great and it worked :)
I wouldnt have known to use something like str2wav because the AFS explorers only identify the files as .bin files , for a file noob its difficult when ppl talk about shenmue file types I cant even see, (I have no idea where dfs files come from)

Ultimately I want it ALL , Images, Sounds, Models .... and then the Rebirth will begin *insert evil laughter here* .. 'ahem' but thanks SiZiOUS looks like your doing great things for Shenmuedom I also found the SpriteUtils program (SPR = Multiple PVRs Now i know :) )
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby SiZiOUS » Fri Feb 19, 2010 12:51 pm

ReeceKun wrote:I wouldnt have known to use something like str2wav because the AFS explorers only identify the files as .bin files , for a file noob its difficult when ppl talk about shenmue file types I cant even see, (I have no idea where dfs files come from)

OK I understand now. You are working on a ripped version of Shenmue. The Shenmue original untouched dump shows you the files type inside of AFS. That means "shrinked" AFS have their "file table" ripped out so you see only ".bin" files, not real "files type". When I open my 01BEDA.AFS file from my rip, I get:
Image

As you can see, the files entries in the AFS have file extensions, STR and SRF. STR are sounds files (voices) and SRF, the subtitles table for the cutscene.
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby Master Kyodai » Fri Feb 19, 2010 1:13 pm

That is for the "untouched" dump which normal users don't have. I tried it on the echelon rip and the extensions were distorted as well for some reason. I know they shouldn't, but the "touched" rips seem to suffer from that quite often. COuld also be a problem of the afs ripper used, there are several afs extractors available, some having odd limitations. WHat always helps is the file header - for shenmue the file extension is quite clear, but for other games the programmers have chosen random or no file extension at all.
User avatar
Master Kyodai
"After Burner...Great!"
"After Burner...Great!"
 
Joined: May 2003

Postby SiZiOUS » Fri Feb 19, 2010 1:36 pm

Yeah you right. Ripped version like ECHELON or else have their AFS files shrinked (with AFS Compactor tool for example). In fact, the AFS file table which contains AFS embeeded filesnames isn't required. So in group releases rip, all AFS were shrinked. This was done for retrieve the maximum size for selfboot the game... I guess.

The TOSEC GDI dump is an untouched dump.

For Shenmue, the extension has really a signification so it's better to work with untouched images. :)
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby ReeceKun » Sat Feb 20, 2010 5:33 pm

SiZiOUS wrote:1. Get the tool and unzip it in a directory (in this example the output dir = "ADPCM_TOOL")
2. Extract an AFS from the STREAM folder, for example \SCENE\01\STREAM\01BEDA.AFS (i'm working on the PAL release of Shenmue 1). Open it with an AFS extractor, like AFS Utils or AFS Explorer.
3. Get the .STR files from the extracted AFS and open a command prompt (Start menu > Run > "cmd" and OK).
4. Navigate in the "ADPCM_TOOL" directory created (using the cd command).
5. Type str2wav myfile where myfile is the input file, myfile.str. An output myfile.wav will be generated.


Is there any way I can use this for mass extraction? I know my favorite Gooey creator could do it :)

"*wink wink nudge nudge* know what I mean eh?"
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby ReeceKun » Mon Feb 22, 2010 3:50 am

Im trying to write a .bat file so I can convert each folder in one go and as their all named the same in each folder its perfect

Code: Select all
@echo off.
str2wav file_1 1.wav
(?)
str2wav file_2 2.wav


This only converts file_1, I dont know what command to use between 1 and 2 to get it to run the 2nd line , anyone know what it needs?
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby SiZiOUS » Mon Feb 22, 2010 7:40 am

Grab the ADPCM Streaming Toolkit v1.1. I just included in the archive a batch file in order to batch convert STR files.

To use this:
1. Copy your .STR in the Input directory.
2. Double-click on the "batch.cmd" file.
3. Retrieve your .WAV in the Output directory.

Cheers ReeceKun!
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby ReeceKun » Mon Feb 22, 2010 11:41 am

SiZiOUS wrote:Grab the ADPCM Streaming Toolkit v1.1. I just included in the archive a batch file in order to batch convert STR files.

To use this:
1. Copy your .STR in the Input directory.
2. Double-click on the "batch.cmd" file.
3. Retrieve your .WAV in the Output directory.

Cheers ReeceKun!


Domo SiZiOUSkun ^_^

It works, but the only way this works is if I rename the 'Files' with an .STR extension so your .bat recognises the STR files which will end up being alot of renaming to do.
The way I had it setup it just automatically accepted that the 'File' was an STR and converted the file to wav.

So surely there must be a simple command to just get the .bat to move to the next line. :) either that or you could make a superdooper GUI :)

Image
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Postby SiZiOUS » Mon Feb 22, 2010 12:11 pm

Yup, it's normal, only files with the STR extension will be reconignzed. here is the command to rename your "file_x" to file_x.str" :
Code: Select all
ren * *.str


Cheers!
User avatar
SiZiOUS
Asia Travel Representative
Asia Travel Representative
 
Joined: February 2010

Postby ReeceKun » Mon Feb 22, 2010 12:28 pm

SiZiOUS wrote:Yup, it's normal, only files with the STR extension will be reconignzed. here is the command to rename your "file_x" to file_x.str" :
Code: Select all
ren * *.str

Cheers!


Thankyou ive been looking for something that could rename multiple files types for years :)
User avatar
ReeceKun
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: North Wales (UK)
Favorite title: Shenmue
Currently playing: Skyrim

Next

Return to Community Projects

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000-
ShenmueDojo.net