XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Oct 21, 2017 1:25 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Star Wars - The Old Republic Beta Audio Files
PostPosted: Fri Dec 02, 2011 3:41 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time














You can make the ads go away by registering

I have managed to extract the files inside of swtor_main_bnk_audio_1.tor using the EasyMYP Tool (rename .tor to .myp), which gives 12 .txt files. Renaming these to .bnk, I used the bnkextr Tool (attached) to get a large number of small .wav files named in a numerical order.

I am having trouble decoding these files with wav2ogg (attached) and had a look in hex editor. I noticed the RIFF WAVE header, but I cannot decode it.

Image


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Fri Dec 02, 2011 3:19 pm 
Offline
veteran

Joined: Thu Nov 17, 2011 5:33 pm
Posts: 111
Has thanked: 34 times
Have thanks: 129 times
The audio format of TOR is actually one of the easiest file formats. :wink:

Most soundfiles are stored in BKHD/.bnk archives (eg. dialogues, sound effects) and can be extracted with "bnkextr" (see this topic for a link to Russian forum with the download, I recommend using Google Translate).

Once you extract the BKHD archives, you will get multiple .ogg files with the RIFF..6.WAVEfmt header. This is the proprietary audio format used by Wwise. The soundtrack (ie. music) of the game can be found directly in the TOR archives under the folder /bnk/streamed/ and does not need to be extracted, by the way. Once you have the .ogg files, you can convert them with the tool ww2ogg (download here).

The converted files are often missing the duration and cannot be played in all .ogg players. I was able to play them in the Google Chrome audio player and the tool foobar2000, though I have not yet found a good tool to convert the files into WAV or MP3.

If you did not understand something or need more help, just tell me! We're already analysing the file formats in this topic so that's why I could answer so fast. :)


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 12:18 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
I did use the other topic to get into the .tor files, very helpful.

Well I unpacked a few of the .wav files from swtor_main_bnk_streamed_a_1.tor but they would not convert with ww2ogg. I got the error 'Error opening packed_codebooks.bin'. I'm not sure what is it on about as it's definitely there and I've tried copying it into the directory I am working in.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 2:25 am 
Offline
mega-veteran
mega-veteran

Joined: Sun Oct 18, 2009 9:41 pm
Posts: 263
Location: Portland, OR
Has thanked: 3 times
Have thanks: 70 times
packed_codebooks.bin needs to be in the current working directory, where you are running from, not necessarily where the .wav files or the .exe are. Let me know how you are running ww2ogg.exe if you are still having problems.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 2:44 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
Ok that worked, but now it does not play in VLC or FooBar2000. In Google Chrome, it comes out as some high pitched static.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 7:08 am 
Offline
mega-veteran
mega-veteran

Joined: Sun Oct 18, 2009 9:41 pm
Posts: 263
Location: Portland, OR
Has thanked: 3 times
Have thanks: 70 times
If you could upload some of the source files that convert poorly I can take a look, as of 0.17 I am not entirely sure of how to detect a particular format change that has shown up a lot recently, so that may be an issue.

Also make sure you are using the latest version, and as the vgm_ripping page suggests you might want to use revorb to clean up the output files (this at least fixes an issue I've heard for foobar).


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 7:13 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
They all converted poorly, and I have tried using revorb, which just crashes when I use it on any of the files. I tried attaching a .wav but I get a server error message, I'm going to host it somewhere and link to it.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 7:16 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sat Dec 03, 2011 3:29 pm 
Offline
veteran

Joined: Thu Nov 17, 2011 5:33 pm
Posts: 111
Has thanked: 34 times
Have thanks: 129 times
You're right, ww2ogg no longer works with the newest version of the beta files. They very likely changed the audio format so we can no longer convert the files so easily.
I guess now it's back to the drawing board. :(


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 1:16 am 
Offline
mega-veteran
mega-veteran

Joined: Sun Oct 18, 2009 9:41 pm
Posts: 263
Location: Portland, OR
Has thanked: 3 times
Have thanks: 70 times
Yeah, this is an odd one. It looks like every individual unit is being converted in a reasonable way, but some of the codebooks being chosen for residue are invalid (with 0 value mapping). My best guess is that the packed codebooks have changed; usually they are accessed in a very different order than what is seen here (with the mapping 0 codebooks enumerated first, and in no particular order [414, 293, 247, 89, etc]; here the mapping 0 codebooks are scattered around and the enumeration is ordered [38, 39, 40, 41, 41, etc], and yet the residue still gives a contiguous list of codebooks as it used to), so the codebooks may have been shuffled around, or new ones may have been added, etc.

If there are any audiokinetic dlls sitting around could you be so kind as to zip 'em up and send them my way?

Edit:
Yeah, this seems quite likely to be the case. In the changelist for 2011.2.1 (September 21, 2011), they mention:
WG-19004 Updated Vorbis encoder to aoTuV beta 6.03.

Since the old packed_codebooks.bin was generated from codebooks used by the Xiph encoder, it is likely laid out quite differently now. With any luck everything will still work the same and we'll just need to locate the new codebooks.

Edit2:
It appears that this same item has been in the changelists since 2011.2 (July 25), so it's weird that it hasn't come up till now, but I guess it makes sense in terms of dev cycle.


Last edited by hcs on Sun Dec 04, 2011 1:30 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 1:27 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 2:05 am 
Offline
mega-veteran
mega-veteran

Joined: Sun Oct 18, 2009 9:41 pm
Posts: 263
Location: Portland, OR
Has thanked: 3 times
Have thanks: 70 times
No luck, must be linked into something else. I'm grabbing the latest win SDK, it should show up there.

[edit]
ww2ogg 0.18 up now, includes a new file, packed_codebooks_aoTuV_603.bin, which contains the new packed codebooks.
0.18 supports specifying the name of the file to use with the --pcb switch, in order to avoid breaking things it defaults to packed_codebooks.bin, which is the old one. The new packed codebooks works with the file you posted.

For clarity:
Code:
ww2ogg.exe 0AB0A18A_2BFF9306A49537DA.wav --pcb packed_codebooks_aoTuV_603.bin


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 5:07 am 
Offline
n00b

Joined: Fri Dec 02, 2011 3:28 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
It works.

For anyone looking to do a quick batch convert:

Code:
for %f in (*.wav) do ww2ogg.exe %f --pcb packed_codebooks_aoTuV_603.bin
for %f in (*.ogg) do revorb.exe %f


The files will play in VLC after revorb


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 8:22 am 
Offline
mega-veteran
mega-veteran

Joined: Sun Oct 18, 2009 9:41 pm
Posts: 263
Location: Portland, OR
Has thanked: 3 times
Have thanks: 70 times
ww2ogg 0.19 fixes the previous and next window flags. This is something that had been bothering me for a while, the reference decoder doesn't use these, but Tremor does, so files with shortened packets weren't playing right on some players (eg Rockbox) even after revorb.


Top
 Profile  
 
 Post subject: Re: Star Wars - The Old Republic Beta Audio Files
PostPosted: Sun Dec 04, 2011 11:23 am 
Offline
veteran

Joined: Thu Nov 17, 2011 5:33 pm
Posts: 111
Has thanked: 34 times
Have thanks: 129 times
Great job, hcs! Thank you very much for fixing ww2ogg! :)

In the newest version of Wwise, the audio files now have the extension .wem and not .wav, so I used the following lines for a batch file. And I had to use %%f instead of %f for it to work, but I am not an expert with DOS commands so I do not know why this is the case.
Code:
for %%f in (*.wem) do ww2ogg.exe %%f --pcb packed_codebooks_aoTuV_603.bin
pause
for %%f in (*.ogg) do revorb.exe %%f
pause


Furthermore, I now wrote a quickBMS script for extracting the WEM archives that can be found in the localised assets. This is my first BMS script so I hope I did everything correct.
Code:
get numberOfFiles longlong
for i = 0 < numberOfFiles
get fileName string
get fileSize longlong
get fileOffset longlong
log fileName fileOffset fileSize
next i


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group