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.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Star Wars - The Old Republic Beta Audio Files
Star Wars - The Old Republic Beta Audio Files
You do not have the required permissions to view the files attached to this post.
-
- veteran
- Posts: 112
- Joined: Thu Nov 17, 2011 5:33 pm
- Has thanked: 35 times
- Been thanked: 132 times
Re: Star Wars - The Old Republic Beta Audio Files
The audio format of TOR is actually one of the easiest file formats.
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.
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.
Re: Star Wars - The Old Republic Beta Audio Files
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.
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.
-
- mega-veteran
- Posts: 263
- Joined: Sun Oct 18, 2009 9:41 pm
- Location: Portland, OR
- Has thanked: 3 times
- Been thanked: 79 times
- Contact:
Re: Star Wars - The Old Republic Beta Audio Files
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.
Re: Star Wars - The Old Republic Beta Audio Files
Ok that worked, but now it does not play in VLC or FooBar2000. In Google Chrome, it comes out as some high pitched static.
-
- mega-veteran
- Posts: 263
- Joined: Sun Oct 18, 2009 9:41 pm
- Location: Portland, OR
- Has thanked: 3 times
- Been thanked: 79 times
- Contact:
Re: Star Wars - The Old Republic Beta Audio Files
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).
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).
Re: Star Wars - The Old Republic Beta Audio Files
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.
Re: Star Wars - The Old Republic Beta Audio Files
The contents of this post was deleted because of possible forum rules violation.
-
- veteran
- Posts: 112
- Joined: Thu Nov 17, 2011 5:33 pm
- Has thanked: 35 times
- Been thanked: 132 times
Re: Star Wars - The Old Republic Beta Audio Files
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.
I guess now it's back to the drawing board.
-
- mega-veteran
- Posts: 263
- Joined: Sun Oct 18, 2009 9:41 pm
- Location: Portland, OR
- Has thanked: 3 times
- Been thanked: 79 times
- Contact:
Re: Star Wars - The Old Republic Beta Audio Files
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.
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.
Re: Star Wars - The Old Republic Beta Audio Files
The contents of this post was deleted because of possible forum rules violation.
-
- mega-veteran
- Posts: 263
- Joined: Sun Oct 18, 2009 9:41 pm
- Location: Portland, OR
- Has thanked: 3 times
- Been thanked: 79 times
- Contact:
Re: Star Wars - The Old Republic Beta Audio Files
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:
[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: Select all
ww2ogg.exe 0AB0A18A_2BFF9306A49537DA.wav --pcb packed_codebooks_aoTuV_603.bin
Re: Star Wars - The Old Republic Beta Audio Files
It works.
For anyone looking to do a quick batch convert:
The files will play in VLC after revorb
For anyone looking to do a quick batch convert:
Code: Select all
for %f in (*.wav) do ww2ogg.exe %f --pcb packed_codebooks_aoTuV_603.bin
for %f in (*.ogg) do revorb.exe %f
-
- mega-veteran
- Posts: 263
- Joined: Sun Oct 18, 2009 9:41 pm
- Location: Portland, OR
- Has thanked: 3 times
- Been thanked: 79 times
- Contact:
Re: Star Wars - The Old Republic Beta Audio Files
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.
-
- veteran
- Posts: 112
- Joined: Thu Nov 17, 2011 5:33 pm
- Has thanked: 35 times
- Been thanked: 132 times
Re: Star Wars - The Old Republic Beta Audio Files
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.
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.
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: Select all
for %%f in (*.wem) do ww2ogg.exe %%f --pcb packed_codebooks_aoTuV_603.bin
pause
for %%f in (*.ogg) do revorb.exe %%f
pause
Code: Select all
get numberOfFiles longlong
for i = 0 < numberOfFiles
get fileName string
get fileSize longlong
get fileOffset longlong
log fileName fileOffset fileSize
next i