Kelain Posted July 14 Posted July 14 (edited) I need some help. In general, I need help extracting audio from the Spider-Man: Shattered Dimensions game(Streams.dat file). I'm trying to figure out how to do this, maybe someone can suggest some tools or programs that will help extract game audio clips and sounds from this file. Edited Sunday at 10:23 AM by Kelain Marked the platform for the game
Hazza12555 Posted July 15 Posted July 15 Check this forum for help https://web.archive.org/web/20230000000000fw_/https://www.zenhax.com/viewtopic.php?t=8423
Kelain Posted July 19 Author Posted July 19 On 7/14/2025 at 7:21 PM, ikskoks said: Please upload sample file. Take https://drive.google.com/file/d/1qkmBi5kgnXMMO_-KTiTdexZLKUsOyBKF/view?usp=sharing
Kelain Posted July 19 Author Posted July 19 On 7/16/2025 at 1:57 AM, Hazza12555 said: Check this forum for help https://web.archive.org/web/20230000000000fw_/https://www.zenhax.com/viewtopic.php?t=8423 I found something similar, but it won't work because as the author says, "The script is for who wants to work on the format and how to read the raw data, NOT for extraction." But maybe this script can somehow be changed to suit the task that I need and make it extract? https://web.archive.org/web/20230429100701fw_/https://zenhax.com/viewtopic.php?f=9&t=3335
Kelain Posted July 20 Author Posted July 20 On 7/14/2025 at 7:21 PM, ikskoks said: Please upload sample file. Is there any news?
Engineers h3x3r Posted July 23 Engineers Posted July 23 Is that file Streams.dat complete? Coz I see some offsets exceeding total file size. Anyway I was able to play some of raw data in Audacity.
Kelain Posted July 23 Author Posted July 23 45 minutes ago, h3x3r said: Is that file Streams.dat complete? Coz I see some offsets exceeding total file size. Anyway I was able to play some of raw data in Audacity. This is one of the files in which audio fragments are stored, there are three of them in total. I threw one off for an example.
Kelain Posted July 23 Author Posted July 23 55 minutes ago, h3x3r said: Is that file Streams.dat complete? Coz I see some offsets exceeding total file size. Anyway I was able to play some of raw data in Audacity. Will it be possible to create a script for BMS so that it can manually extract audio materials from these files, or only manually if?
Engineers h3x3r Posted July 23 Engineers Posted July 23 Well, send all streams i will look at it. I believe that rest of streams are raw data. First streams include TOC + raw data.
Kelain Posted July 23 Author Posted July 23 1 hour ago, h3x3r said: Well, send all streams i will look at it. I believe that rest of streams are raw data. First streams include TOC + raw data. take https://drive.google.com/file/d/1uXz_Fib2D4UeBflOhCFILyiQizIP7sKi/view?usp=sharing
Engineers h3x3r Posted July 25 Engineers Posted July 25 All right. So here's some info. Most of streams are with unknown compression and I don't know which. This template prints some info. Check Output tab. Firts of all. Create bat file and put this text to it and save. copy /b Streams.dat + Streams1.dat + Streams2.dat + Streams3.dat Streams_all.dat Then put the bat file next to the streams and run. It will create one Streams_all.dat Then you can use 010 Editor Template on on it. //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); local uint32 i,j,TotalFileSize=FileSize(); uint32 Sign; uint32 UnkTableIndex; uint32 LangResourceIndex; uint32 LangIndex; uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; uint32 Unknown_5; uint32 Unknown_6; struct { uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; }UnkTable[UnkTableIndex]; for (i=0; i < LangIndex; i++) struct { for (j=0; j < LangResourceIndex; j++) struct { uint32 ResourceName; uint32 ResourceSize; uint32 ResourceOffset; uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 FFFFFFFF; uint32 Unknown_4; float Duration; //Seconds uint32 ResourceInfoSize; uint32 Unknown_5; uint32 Unknown_6; uint32 PaddSize; uint32 Unknown_7; //Not sure but decompressed size maybe? uint16 Unknown_8; uint16 Channels; uint32 Frequency; uint32 Interleave; //Not sure enum <uint16> { Type_0002_Uncompressed_PCM = 2, Type_0004_Uncompressed_PCM = 4, Type_0012_Uncompressed_PCM = 12, Type_2230_UnknownCompression = 2230, Type_8192_UnknownCompression = 8192, Type_8917_UnknownCompression = 8917, }ResourceType; local string TypeEnum=EnumToString(ResourceType); uint16 BitDepth; uint16 Unknown_9; uint16 Unknown_10; uint32 Unknown_11; uint32 Unknown_12; uint32 Unknown_13; uint32 Unknown_14; uint32 Unknown_15; uint32 Unknown_16; uint32 Unknown_17; uint32 Unknown_18; uint32 Unknown_19; uint32 Unknown_20; local uint32 StreamOffset=ResourceInfoSize + PaddSize; local uint32 StreamSize=ResourceSize - ResourceInfoSize - PaddSize; if (ResourceOffset != 4294967295) Printf(" Lang Index: %u\n Resource Num: %04u\n Resource Name: 0x%08x\n Frequency: %u\n Channels: %u\n Interleave: %u\n Duration: %f sec\n Bit Depth: %u-bit\n Resource Type: %s\nResource Offset: %u\n Resource Size: %u\n Stream Offset: %u\n Stream Size: %u\n\n", i,j,ResourceName,Frequency,Channels,Interleave,Duration,BitDepth,TypeEnum,ResourceOffset,ResourceSize,StreamOffset,StreamSize); }ResourceInfo; Printf("\n\n"); }Lang;
Kelain Posted Friday at 12:03 PM Author Posted Friday at 12:03 PM 7 hours ago, h3x3r said: All right. So here's some info. Most of streams are with unknown compression and I don't know which. This template prints some info. Check Output tab. Firts of all. Create bat file and put this text to it and save. copy /b Streams.dat + Streams1.dat + Streams2.dat + Streams3.dat Streams_all.dat Then put the bat file next to the streams and run. It will create one Streams_all.dat Then you can use 010 Editor Template on on it. //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); local uint32 i,j,TotalFileSize=FileSize(); uint32 Sign; uint32 UnkTableIndex; uint32 LangResourceIndex; uint32 LangIndex; uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; uint32 Unknown_5; uint32 Unknown_6; struct { uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; }UnkTable[UnkTableIndex]; for (i=0; i < LangIndex; i++) struct { for (j=0; j < LangResourceIndex; j++) struct { uint32 ResourceName; uint32 ResourceSize; uint32 ResourceOffset; uint32 Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 FFFFFFFF; uint32 Unknown_4; float Duration; //Seconds uint32 ResourceInfoSize; uint32 Unknown_5; uint32 Unknown_6; uint32 PaddSize; uint32 Unknown_7; //Not sure but decompressed size maybe? uint16 Unknown_8; uint16 Channels; uint32 Frequency; uint32 Interleave; //Not sure enum <uint16> { Type_0002_Uncompressed_PCM = 2, Type_0004_Uncompressed_PCM = 4, Type_0012_Uncompressed_PCM = 12, Type_2230_UnknownCompression = 2230, Type_8192_UnknownCompression = 8192, Type_8917_UnknownCompression = 8917, }ResourceType; local string TypeEnum=EnumToString(ResourceType); uint16 BitDepth; uint16 Unknown_9; uint16 Unknown_10; uint32 Unknown_11; uint32 Unknown_12; uint32 Unknown_13; uint32 Unknown_14; uint32 Unknown_15; uint32 Unknown_16; uint32 Unknown_17; uint32 Unknown_18; uint32 Unknown_19; uint32 Unknown_20; local uint32 StreamOffset=ResourceInfoSize + PaddSize; local uint32 StreamSize=ResourceSize - ResourceInfoSize - PaddSize; if (ResourceOffset != 4294967295) Printf(" Lang Index: %u\n Resource Num: %04u\n Resource Name: 0x%08x\n Frequency: %u\n Channels: %u\n Interleave: %u\n Duration: %f sec\n Bit Depth: %u-bit\n Resource Type: %s\nResource Offset: %u\n Resource Size: %u\n Stream Offset: %u\n Stream Size: %u\n\n", i,j,ResourceName,Frequency,Channels,Interleave,Duration,BitDepth,TypeEnum,ResourceOffset,ResourceSize,StreamOffset,StreamSize); }ResourceInfo; Printf("\n\n"); }Lang; Thanks, it's working. I tried to extract one audio file, but it has a format.bin how can I play and listen?
Engineers h3x3r Posted Friday at 12:23 PM Engineers Posted Friday at 12:23 PM (edited) Here's BMS to unpack Streams_all.dat get BaseFileName basename get Sign uint32 get UnkTableIndex uint32 get LangResourceIndex uint32 get LangIndex uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 get Unknown_5 uint32 get Unknown_6 uint32 for i = 0 < LangIndex get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 next i for i = 0 < LangIndex for j = 0 < LangResourceIndex get ResourceName uint32 get ResourceSize uint32 get ResourceOffset uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get FFFFFFFF uint32 get Unknown_4 uint32 get Duration float get ResourceInfoSize uint32 get Unknown_5 uint32 get Unknown_6 uint32 get PaddSize uint32 get Unknown_7 uint32 get Unknown_8 ushort get Channels ushort get Frequency uint32 get Interleave uint32 get ResourceType ushort get BitDepth ushort get Unknown_9 ushort get Unknown_10 ushort get Unknown_11 uint32 get Unknown_12 uint32 get Unknown_13 uint32 get Unknown_14 uint32 get Unknown_15 uint32 get Unknown_16 uint32 get Unknown_17 uint32 get Unknown_18 uint32 get Unknown_19 uint32 get Unknown_20 uint32 string Name p "%s/Lang_%u/0x%08x.stream" BaseFileName i ResourceName if ResourceOffset != 4294967295 log Name ResourceOffset ResourceSize endif next j next i If it's not compressed you can use Audacity. File > Import Raw > and set the specification printed out by 010 editor Edited Friday at 12:24 PM by h3x3r
Kelain Posted Friday at 12:31 PM Author Posted Friday at 12:31 PM 7 minutes ago, h3x3r said: Here's BMS to unpack Streams_all.dat get BaseFileName basename get Sign uint32 get UnkTableIndex uint32 get LangResourceIndex uint32 get LangIndex uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 get Unknown_5 uint32 get Unknown_6 uint32 for i = 0 < LangIndex get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 next i for i = 0 < LangIndex for j = 0 < LangResourceIndex get ResourceName uint32 get ResourceSize uint32 get ResourceOffset uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get FFFFFFFF uint32 get Unknown_4 uint32 get Duration float get ResourceInfoSize uint32 get Unknown_5 uint32 get Unknown_6 uint32 get PaddSize uint32 get Unknown_7 uint32 get Unknown_8 ushort get Channels ushort get Frequency uint32 get Interleave uint32 get ResourceType ushort get BitDepth ushort get Unknown_9 ushort get Unknown_10 ushort get Unknown_11 uint32 get Unknown_12 uint32 get Unknown_13 uint32 get Unknown_14 uint32 get Unknown_15 uint32 get Unknown_16 uint32 get Unknown_17 uint32 get Unknown_18 uint32 get Unknown_19 uint32 get Unknown_20 uint32 string Name p "%s/Lang_%u/0x%08x.stream" BaseFileName i ResourceName if ResourceOffset != 4294967295 log Name ResourceOffset ResourceSize endif next j next i If it's not compressed you can use Audacity. File > Import Raw > and set the specification printed out by 010 editor
Engineers h3x3r Posted Friday at 01:59 PM Engineers Posted Friday at 01:59 PM (edited) Hmm. It works on my side. Try to download latest qbms. Edited Friday at 01:59 PM by h3x3r
Kelain Posted Friday at 02:56 PM Author Posted Friday at 02:56 PM 57 minutes ago, h3x3r said: Hmm. It works on my side. Try to download latest qbms. Yes, it works!
Hazza12555 Posted Friday at 04:41 PM Posted Friday at 04:41 PM 1 hour ago, Kelain said: Yes, it works! Now comes the pain of sorting through them all.
Engineers h3x3r Posted Friday at 05:57 PM Engineers Posted Friday at 05:57 PM (edited) You can edit the script to output them in folders by ResourceType. string Name p "%s/Lang_%u/0x%08x.stream" BaseFileName i ResourceName to string Name p "%s/Lang_%u/%04u/0x%08x.stream" BaseFileName i ResourceType ResourceName Edited Friday at 06:00 PM by h3x3r
Kelain Posted Friday at 09:38 PM Author Posted Friday at 09:38 PM 9 hours ago, h3x3r said: Here's BMS to unpack Streams_all.dat get BaseFileName basename get Sign uint32 get UnkTableIndex uint32 get LangResourceIndex uint32 get LangIndex uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 get Unknown_5 uint32 get Unknown_6 uint32 for i = 0 < LangIndex get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get Unknown_4 uint32 next i for i = 0 < LangIndex for j = 0 < LangResourceIndex get ResourceName uint32 get ResourceSize uint32 get ResourceOffset uint32 get Unknown_0 uint32 get Unknown_1 uint32 get Unknown_2 uint32 get Unknown_3 uint32 get FFFFFFFF uint32 get Unknown_4 uint32 get Duration float get ResourceInfoSize uint32 get Unknown_5 uint32 get Unknown_6 uint32 get PaddSize uint32 get Unknown_7 uint32 get Unknown_8 ushort get Channels ushort get Frequency uint32 get Interleave uint32 get ResourceType ushort get BitDepth ushort get Unknown_9 ushort get Unknown_10 ushort get Unknown_11 uint32 get Unknown_12 uint32 get Unknown_13 uint32 get Unknown_14 uint32 get Unknown_15 uint32 get Unknown_16 uint32 get Unknown_17 uint32 get Unknown_18 uint32 get Unknown_19 uint32 get Unknown_20 uint32 string Name p "%s/Lang_%u/0x%08x.stream" BaseFileName i ResourceName if ResourceOffset != 4294967295 log Name ResourceOffset ResourceSize endif next j next i If it's not compressed you can use Audacity. File > Import Raw > and set the specification printed out by 010 editor I entered everything that was written there, for example, I want to play some sound from [Lang_0], I enter the data into audacity and I just don't have the track displayed.
Engineers h3x3r Posted Friday at 09:42 PM Engineers Posted Friday at 09:42 PM You must set Stream Offset. The uncompressed_PCM have always zero offset.
Kelain Posted Friday at 09:56 PM Author Posted Friday at 09:56 PM 6 minutes ago, h3x3r said: You must set Stream Offset. The uncompressed_PCM have always zero offset. What if there is noise playing in some of the audio?
Kelain Posted Friday at 10:13 PM Author Posted Friday at 10:13 PM 17 minutes ago, Kelain said: What if there is noise playing in some of the audio? I don't fully understand how to work with this yet.
Engineers h3x3r Posted Saturday at 05:17 AM Engineers Posted Saturday at 05:17 AM These are most probably compressed.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now