bnnm / wwiser Goto Github PK
View Code? Open in Web Editor NEWwwiser - Wwise .bnk explorer and audio simulator.
wwiser - Wwise .bnk explorer and audio simulator.
hi bro, I found that it seems not possible to use wwiser as a module after reviewing the source code. Will you provide an update in the future?
That's what I want to do.
bnk files can be obtained from other files but not written to disk, but directly read in memory. The information parsed from the file can also be directly returned by the function for other operations.
Hello,
I've noticed that AkMediaMap has a field named sourceId
while AkMediaInformation's field has name sourceID
(with capital "D").
Is this inconsistency on purpose or just a mistake?
Thanks.
These files have the .uasset extension, but they're clearly BNK. In fact, if you open them with HxD you can see BKHD inside. Plus, I'm quite sure because they're in a folder called Banks. I tried to rename the extension, but anyway they're not recognized as BNK files. It keeps saying: not a Wwise bank. I also try with a file cutter but it didn't work.
Here: Sea of Thieves BNK
Thanks in advance.
Hello,
This repo seems a little dead, but I'm desperate.
I'm trying to parse Cyberpunk 2077's sfx_container.bnk
which has many entries in the HIRC section.
Wwiser seems to not like that, because it's replaces them with following in dumped banks:
<fld ty="u32" na="NumReleasableHircItem" va="178879"/>
<lst na="listLoadedItem" co="0"/>
<error me="unlikely count 178879"/>
<skip si="0xbc5627"/>
I am trying to parse bnks myself with help of wwiser's source code, but there's so much information...
Is there anything that could be done? I don't even know where the error comes from, it's nowhere in the master branch.
Thanks
What's the best way to send you a list of wwnames for a game for you to add to the wwiser-utils/wwnames archive?
When attempting to unpack banks from World of Tanks, the program errors out, returning the following message:
parser: unsupported bank version 3539317264
Not sure if this helps, but the game's documentation specifies a wwise version of "2019.2.3 or higher".
Nothing else, it fix :)
The last time I cut the files did the trick but now looks like it's a little different. The settings you suggested work with some files, but not with other ones. Especially with larger files.
Have a look: BNK
I'm playing with the settings to see if I can get the BNK, but I had no luck so far.
Update
I managed to get the BNK files but they don't load into Wwiser. I keep getting the parsing error issue.
Once I have everything I link them hoping it's possible to find a solution.
Let me know if you need all the banks or just a few ones.
Thanks in advance!!
So, trying to extract the TXTP files from Luigi's Mansion 3's 1355168291.bnk file with wwiser.pyz -g 1355168291.bnk
gives me the following error:
generator: WARNING! no .txtp were created (find+load banks with events?)
I'm not sure if I'm using it incorrectly. If more information is required, please let me know! :)
Hello,
Thanks for making wwiser, this really helps me for ripping music from Switch games!
I'm currently working on the music from Pokemon Legends Arceus and I encountered some problems.
To explain, during some point of the game (battle with wild Pokemon, trainers, ...), some part of the music disappear when we open the menu. Unfortunetly, I don't understand how to get these music variants with wwiser.
To clarify the problem, I uploaded here a ZIP file that contains the battle music against a wild Pokemon in .txtp format (with the .wem if you wants to play it). The name of the file generated by default is BGM-1733-event (2776459532=3902110436)(bgm_battle=3189526517)(1204638696=-) {s}
. I also put a second file BGM-1733-event (2776459532=3902110436)(bgm_battle=3189526517)(1204638696=-) {s} {edited}
with the specific variation we can hear ingame (I only comment out some .wem in the .txtp file to obtain the variant). I was wondering how can we get the information of which .wem have to be mutted to get the variation and I figured out that under each .wem comment part in the .txtp file, we can find a line named "CAkEvent", so I concluded that every variant file will have this line to identify the .wem track that have to be mutted. But, for an another file also included into the ZIP file and correspond to the trainer battle (BGM-2315-event (3832295740=4178474359) {d}
), there is no "CAkEvent" line, but a variant for this music also exists (I created a BGM-2315-event (3832295740=4178474359) {d} {edited}
with one .wem commented out to get the variant). I'm a little bit confused about this and I'm wondering how is it posible to generate the .txtp associated with the variant. I read the doc to understand how the .wem and .txtp formats works, but I'm still lost with some parameters in the .txtp file (#@layer-v
for example).
Here the link to the ZIP file : https://drive.google.com/file/d/1zb2kYFedaKy8_-u016s8QHW7mKj3Z3sf/view?usp=sharing
So I'm looking for help to learn how to identify and separate variant from a single .txtp file, and also if it's possible, how to get names for the files instead of event ID, I don't really understand the steps to generate the .txt files with wwiser-utils.
Thanks for your help, have a nice day!
OK, so i came across some unplayable txtp. actually, not much of them really but they kinda stood out for just how unplayable they are with vgmstream so... yeah.
here are the relevant files i guess.
[psychonauts_2][windows_10]borked_txtp.7z
and here are the settings i used for creating the txtp. at least, the ones that i thought mattered anyway.
oh, almost forgot. here are the relevant json/xml files.
[psychonauts_2][windows_10]forgotten_json_xml_files.7z
how to open wwiser.py
Hello! I am looking inside of Init.bnk that was made using v140. I can see the properties of other effects like Guitar Distortion, however the Harmonizer just displays this. Am I by chance missing something?
Thanks!
Here are the relevant files:
init.zip
Excuse me for coming to you, can you help me? Is it at all possible to edit BNK files? Or is it possible to present it in some format, so it can be read by Wwise? I just want to understand how this bnk file was created, so that I can create these files in Wwise myself.
Hello! I've got a .bnk
file for Borderlands 3 which generates a bunch of TXTPs. At least one of the TXTPs in question is a multi-segment file which plays a bunch of .wem
s in order, but Wwiser's putting them in the wrong order. As an example, here's the original TXTP as-generated by wwiser:
https://apocalyptech.com/scratchpad/wwiser/Oak_VO_Radio_Bunkers_and_Badasses_01%20%7br%7d.txtp (links taken down)
... and here's a fixed version with the .wem
s in the correct order (also note that the single random-group element occurs twice throughout the TXTP, rather than once as in the originally-generated version):
https://apocalyptech.com/scratchpad/wwiser/Oak_VO_Radio_Bunkers_and_Badasses_01-fixed.txtp
The .bnk
in question, and all the .wem
files necessary to play that particular TXTP file, can be downloaded here: https://apocalyptech.com/scratchpad/wwiser/wem_and_bnk.zip
You'd want to use https://raw.githubusercontent.com/bnnm/wwiser-utils/master/wwnames/Borderlands%203%20(PC).txt for wwnames.txt
for this one.
Let me know if I can provide any more info, etc!
First off many thanks for making this tool without which proper music extraction from games using .bnk containers would not have been possible.
I am sorry if this has already been discussed here.
By using WWISER, I have managed to generate TXTP file for the music files of Zone of the Enders 2nd Runner MARS. I am also able to join them all up as a wav file with vgmstream and most of the music tracks are properly getting extracted by vgmstream.
The way I use vgmstream to extract the music file is by opening the TXTP file with vgmstream and that starts an conversion process which creates the wav file next to the TXTP file.
Some of the generated TXTP files are unable to be converted by vgmstream to wav and I am not sure if it is due to vgmstream's file limitation or if its with WWISER. I have linked the generated TXTP file along with the extracted wem files kept in the wem folder below.
https://drive.google.com/file/d/1mKFVwqmWbSwe0bhMaTl04QpkujOsBLvL/view?usp=sharing
The bnk file is also inside the wem folder and you can check this out to see where the issue lies.
Now if this turns out to be an issue with vgmstream, then can you like add an function in WWISER that puts an additional name mark to the generated TXTP file name. with this an TXTP file can easily be identified as unable to be played or converted by vgmstream.
generator threw out some "PROCESS_ERROR" and demanded me report this here.
so here it is.
wwiser.log
apologies for the lack of details.
When I try to load a BNK it says:
parser: parsing E:/3_Kingdoms/BNK/battle_advice__core.bnk
parser: unsupported bank version 2147483777
I'm currently working on another game and I've got the same problem as before.
Can you please take a look and see if there's a way to fix it? The last tweak you did worked perfectly.
Here are the BNK files: A Total War Saga Troy
Thanks.
I'm having some trouble understanding how to properly use wwnames.txt. I have a list of event IDs and their corresponding names for Nier Replicant. I'm trying to link event IDs to wem IDs so that every wem uses it's event name.
I've read the guide at https://github.com/bnnm/wwiser-utils/blob/master/doc/NAMES.md, but putting the event names into wwnames.txt doesn't give any results after running wwiser.pyz nameextract\*.bnk -sl -sm
. I've put all bnks and wems from the game into that folder, but the resulting wwnames list has the event IDs missing their names.
Is there any way to manually specify event IDs and their corresponding names?
wwnames:
Hi,
I wanna know what i can be doing wrong, as foobar2000 isn't being able to recognise and play/convert majority of created txtp files (playback error shows "Unable to open item for playback (Unsupported format or corrupted file)");
Yes, i'm using the latest version of vgmstream plugin on foobar2000 (i downloaded it 2 days ago! lol ).
I placed bank, wem and txtp files in same root folder, as i understood after reading https://github.com/bnnm/wwiser/blob/master/doc/WWISER.md txtp part of that link.
Do other non-txtp files need to be on other paths/folders/subfolders? Or what?
Hello! How do I get the long event name from the short event name (Event ID), for example: "Play_Zomb_Egypt_Gargantuar_Mvmt_Attack_Throw"?
Looks like I made I mistake, my bad. You can delete this!
Right now the tool works with some version 89 banks, but fails on ones that have music segments in them. In the viewer it gives me this error for music segments:
error: {attrs[message]} {body}
(skipped {attrs[size]}) {body}
inside of the AkMusicMarkerWwise object.
In the console for generating txtps I get these errors:
wwiserlog.txt
Here's one of the bank that it fails on:
A3497A81.zip
and here's one of the files it exports txtps from correctly, this one only has dialogue:
0A60D080.zip
Both of these bnks are from the PS4 version of Destiny 1, and both are version 89/0x59.
Thanks!
Hi,
Great work on your project, we are using it to try to figure out how to add new audio to Mass Effect 2 and 3 Legendary Edition since we need to figure how to connect to the busses in init.bnk. Our project, Legendary Explorer, is based in C#, along with all of our audio handling code. I'm wondering what the license for this project is, since for us to effectively use this, we will probably need to port a bunch of it to C# so we can do some reverse engineering on a bunch of WwiseBanks to figure out the IDs of the audio busses we need to use so that it respects proper environmental and user settings.
In the readme it says feel free to use the info, but wanted to check and know the license, as our project is GPL.
Thanks,
Mgamerz
i think the title speaks for itself, but for brevity sake i'll try to explain everything.
so, there's this option in wwiser - the option to "Use shorter .txtp names and put full names in !tags.m3u" - that can be toggled in WWISER GUI version.
so i toggled it while generating entire txtp files.
and as the txtp files were generating, i got this...
txtp: saving 'Music-00360.txtp' (3379549342411585202)
generator: PROCESS ERROR! (report)
Traceback (most recent call last):
File "C:\Users\###\Desktop\[python]wwiser\wwiser.pyz\wwiser\wgenerator.py", line 149, in generate
self._write_tagsm3u()
File "C:\Users\###\Desktop\[python]wwiser\wwiser.pyz\wwiser\wgenerator.py", line 438, in _write_tagsm3u
with open(outname, 'w', newline="\r\n") as outfile:
FileNotFoundError: [Errno 2] No such file or directory: 'txtp/!tags.m3u'
gui: generator stopped on error
i'm using the latest wwiser version available (v20210210), not using CLI version atm.
python 3.9.2 already installed into my Windows 10 PC.
So I ran into some filenames which were too long on Linux, and a perusal of https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits suggests that support for filenames longer than 255 characters is practically unheard of (though there are a couple exceptions). I see that the code is already enforcing a maximum 240-char full path on Windows (which might not be necessary, given that link above?), but I've added in a 240-char limit on the filename itself, as well. I was using this patch to do so:
diff --git a/wwiser/wtxtp.py b/wwiser/wtxtp.py
index 4b52731..aa6cd4f 100644
--- a/wwiser/wtxtp.py
+++ b/wwiser/wtxtp.py
@@ -6,6 +6,9 @@ from . import wgamesync, wtxtp_tree, wtxtp_info, wversion
#long paths can be enabled on Windows but detection+support is messy...
WINDOWS_MAX_PATH = 240
+#use a bit less than 255 for "base" filenames, too.
+MAX_FILENAME_LENGTH = 240
+
# Builds a TXTP tree from original CAkSound/etc nodes, recreated as a playlist to simplify generation.
#
# For example a path like this:
@@ -224,6 +227,14 @@ class Txtp(object):
outdir = os.path.join(self._basepath, outdir)
os.makedirs(outdir, exist_ok=True)
+ # https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits
+ # ^ This suggests that enforcing a maximum 255-char filename is a pretty
+ # safe assumption. Very few FSes support more than that.
+ if len(name) > MAX_FILENAME_LENGTH:
+ if not longname:
+ longname = name
+ name = "%s~%04i%s" % (name[0:MAX_FILENAME_LENGTH], self.txtpcache.created, '.txtp')
+
outname = outdir + name
info = self._get_info(name, longname)
... the filenames there would actually be likely to approach 250 chars or so, since I just cut it off at 240 and then add the .created
index plus .txtp
. If you wanted this as a PR instead, I could clean it up and send it through that way. I wasn't sure if you'd like this implementation at all, though, or if you'd approve of my hijacking of longname
in there. I also wonder if the Windows-specific check should be taken out, unless there really is a tighter pathname limit than I'm aware of.
You mention a discord in the readme, but I don't know which discord you are referencing.
Seems to be from function name mismatch:
https://github.com/bnnm/wwiser/blob/master/wwiser/generator/wtags.py#L71
https://github.com/bnnm/wwiser/blob/master/wwiser/generator/wtags.py#L179
So, when trying to use wwiser with XCOM2, I get this error.
Here is the log:
wwiser v20201228 (python 3.7.9)
parser: parsing D:/Steam/steamapps/common/XCOM 2/XCom2-WarOfTheChosen/XComGame/CookedPCConsole/WwiseDefaultBank_SoundMissionSoundtracks.bnk
parser: done
names: loading names
names: done
generator: start
generator: ERROR! node 4241966981 in WwiseDefaultBank_SoundMissionSoundtracks.bnk
generator: PROCESS ERROR! (report)Traceback (most recent call last):
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 776, in make_txtp
self._process_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 1256, in _process_txtp
self._process_next(ntid, txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 426, in _process_next
bnode = self.builder._get_bnode_by_ref(bank_id, tid, sid_info=self.sid, nbankid_info=nbankid)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 283, in _get_bnode_by_ref
bnode = self._get_bnode(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 340, in _get_bnode
bnode.init_node(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 400, in init_node
self._build(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 1216, in _build
self._build_transitions(node, True)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 622, in _build_transitions
self.builder.add_transition_segment(ntid)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 207, in add_transition_segment
__ = self._get_bnode(node) #force parse/register, but don't use yet
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 340, in _get_bnode
bnode.init_node(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 400, in init_node
self._build(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 1432, in _build
self._build_audio_config(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 560, in _build_audio_config
bank_id = nstateid.get_root().get_id()
AttributeError: 'NoneType' object has no attribute 'get_root'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 776, in make_txtp
self._process_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 974, in _process_txtp
self._process_next(self.ntid, txtp, self.nbankid)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 431, in _process_next
bnode.make_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 779, in make_txtp
raise ValueError("Error processing TXTP for node %i" % (self.sid)) #from e
ValueError: Error processing TXTP for node 820279197During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 776, in make_txtp
self._process_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 863, in _process_txtp
self._process_next(ntid, txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 431, in _process_next
bnode.make_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 779, in make_txtp
raise ValueError("Error processing TXTP for node %i" % (self.sid)) #from e
ValueError: Error processing TXTP for node 320739215During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wgenerator.py", line 147, in generate
self._write()
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wgenerator.py", line 271, in _write
self._write_bank(bank)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wgenerator.py", line 347, in _write_bank
self._make_txtp(node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wgenerator.py", line 388, in _make_txtp
self._rebuilder.begin_txtp(txtp, node)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 356, in begin_txtp
bnode.make_txtp(txtp)
File "D:\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\CookedPCConsole\wwiser.pyz\wwiser\wrebuilder.py", line 779, in make_txtp
raise ValueError("Error processing TXTP for node %i" % (self.sid)) #from e
ValueError: Error processing TXTP for node 4241966981
gui: generator stopped on error
Attached also the bnk file plus the txt file. And two UPK files which share the same name.
Greetings,
Would it be possible to explore having --txtp-lang
accept multiple languages rather than single one to avoid multiple executions, such as:
# generate txtp
...
..
.
for lang in args.txtp_lang:
locator.set_txtp_path(args.txtp_outdir + lang)
locator.setup()
generator.set_lang(lang)
generator.generate()
Let me know what would be more fitting, would attempt to PR it.
Thanks
the tool not compatible with xbnk extension, can you update it to extract the playable audio from .bnk files ?
I'll be glad.
I have the vgmstream component installed, but it still says that the format is not supported. Please let me know what to provide to resolve this issue :)
While recreating soundbanks in Wwise, I had an issue where the AttenuationID would be a very tiny value. However, I found that if I modified the source code to make it register as an sid rather than an uid, it would work perfectly, allowing me to see the correct id it is assigned to. This happens with v140 banks and v134 banks. Not that big of an issue but I just wanted to let you know anyways!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.