Important information: this site is currently scheduled to go offline indefinitely by end of the year.

EA Layer 3 Extractor/Decoder

Get help on any and all audio formats, or chip in and help others!
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

daemon1 wrote:
jfwfreo wrote:Well, their format IS actually normal mp3. The only thing they did is storing mp3 data in their own structure. Why? No idea.
Its normal MP3 with their own custom header and the weird "uncompressed samples" stuff at the end.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 »

uncompressed samples may also be in the beginning if i remember correctly
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

Ok so I think I finished playing with EALayer3 now. Things I discovered (and that aren't in the "ea layer 3.txt" file in the ealayer3 code)
For "version 5" data, the first 8 bits have to be 0xEE for the "uncompressed samples present" code to trigger, not "non zero" as the docs imply.
For "version 6/7" data, the second bit in the header (currently marked "unknown") is channel count - 1 (so 0 for mono and 1 for stereo)
The enum used for the "mode" flag in the extended header for "version 6/7" data looks like this
enum rw::audio::core::BlockOffsetMode
{
BLOCKOFFSETMODE_IGNORE = 0x0,
BLOCKOFFSETMODE_PRESERVE = 0x1,
BLOCKOFFSETMODE_MUTE = 0x2,
BLOCKOFFSETMODE_MAX = 0x3,
};
And finally, the function that decodes the "uncompressed" sample data in "version 5" files is named DecodeSpecialBlock. For "version 6/7" files the decode function is named DecodePcm. Not sure why they called it a "special block" for the "version 5" files, just seems weird that they did that.

That's it for interesting EALayer3 discoveries :)
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

Just wanted to say thanks for figuring out that .mus stuff.
There is a related file format (doesn't contain actual audio data but will contain references to the .mus file) called .mpf. I have uploaded a sample mpf file here. The MPF file is connected to data called "PathMusicMap" by the game.
https://mega.nz/#!e9ExFLbY!7uqs3qW-uHb0 ... Nq_FgdpBB0
If anyone can help me figure out its format, I would be very grateful (its one of the only formats in Red Alert 3 that can't currently be edited)
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 »

Checked the file. If anyone will be going to figure out its format, he will also need the files that its connected to. Maybe even the whole game. Because it doesn't contain actual data, but only references, its natural that'd be impossible to figure anything out without the actual data it refers to.
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

As far as I am aware, the only data that the mpf file (which goes with the PathMusicMap data) should be referencing is the PathMusicTrack data (the .mus file). The game has 2 of them, the smaller of the 2 is what I uploaded earlier.

I suspect the best way forward is to go back to my reverse engineering notes from before and continue reverse engineering as much as I can and then write it all up (with data structure definitions, notes and mega.nz links to the various data files involved) and then see if anyone out there can help me fill in the blanks.
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

I have posted all my notes on the PathMusic stuff in viewtopic.php?f=17&t=14927
Hopefully someone will be able to help me reverse engineer all the remaining pieces in the files so its possible to change these files and mess with this data...
PixelBoyZ69
n00b
Posts: 13
Joined: Fri May 12, 2017 7:05 pm

Re: EA Layer 3 Extractor/Decoder

Post by PixelBoyZ69 »

Sorry to bump this forum but i just want to ask...

searching the BF1 Soundtrack somewhere in "sound" folder, found all the EBX File but dunno how to figure out where is the audio (Soundtrack) files located, because some of them are kinda like a trap file for me (some of the EBX are not the Audio Files)
User avatar
Vosvoy
veteran
Posts: 127
Joined: Fri Feb 18, 2011 4:58 pm
Has thanked: 15 times
Been thanked: 15 times

Re: EA Layer 3 Extractor/Decoder

Post by Vosvoy »

PixelBoyZ69 wrote:Sorry to bump this forum but i just want to ask...

searching the BF1 Soundtrack somewhere in "sound" folder, found all the EBX File but dunno how to figure out where is the audio (Soundtrack) files located, because some of them are kinda like a trap file for me (some of the EBX are not the Audio Files)
Did you look in the "Levels" subfolder in the main folder "Sounds" after sound extraction? I remember clearly finding musics loops and stuff in that subfolder (like the epic fight music "Metal Frenzy" in the Storm of Steel mission: "Sounds\Levels\SP\E0\Music\SP_E0_Prologue_CombatInfantry4CH_Loop_Wave 0 0 0.wav"). You will even be able to find unique sound effects only used in those levels, in the same directory (like, again in the prologue, the scream of the guy who's rushing at the character in the outro), if you're interested.

But, if you're looking for the musics in the background from the main menu (like Dawn of a New Time, that I personaly love to the bones), check this subfolder: "Sounds\Music\FrontEnd"

Cordialy
Vosvoy
fuzneck
ultra-n00b
Posts: 1
Joined: Tue Jun 15, 2021 6:21 pm

Re: EA Layer 3 Extractor/Decoder

Post by fuzneck »

Heya. I was curious is there a read me file or tutorial somewhere for this tool?
I'm trying to extract need for speed hot pursuit 2010's audio files from their BNDLs, but can't extract them into a readible file format for the exe only as empty .ealayer3 files.
I'm sure the issue is user error on my behalf.

I've attached pics of the console commands ive tried and the current folder setup if that helps.




Image
Last edited by fuzneck on Sat Jul 10, 2021 10:35 pm, edited 1 time in total.
stamkaly
ultra-n00b
Posts: 2
Joined: Fri Jul 09, 2021 1:40 pm

Re: EA Layer 3 Extractor/Decoder

Post by stamkaly »

Hello everyone, I am trying to use EA Layer 3 to decode an SPS sound file from NFS Most Wanted 2012 of PS Vita but it doesn't work. It says:

Code: Select all

C:\ps vita nfs mw> .\ealayer3.exe -v .\PSVita14729.SPS
EA Layer 3 Stream Extractor/Decoder 0.7.0. Copyright (C) 2010-11, Ben Moench.

L: single block loader incorrect because of compression
L: header B loader incorrect because of block type
L: headerless loader incorrect because of flags
The input is not in a readable file format.
It works fine when extracting the same sound from the PC version of the game, but I want to be able to use my Vita files.
Here are the files mentioned:
PS Vita 14729.SPS
PC 14729.SPS
PC extracted 14729.mp3
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo »

That PS Vita file seems to be compressed or encrypted.
stamkaly
ultra-n00b
Posts: 2
Joined: Fri Jul 09, 2021 1:40 pm

Re: EA Layer 3 Extractor/Decoder

Post by stamkaly »

jfwfreo wrote: Sat Jul 10, 2021 9:46 am That PS Vita file seems to be compressed or encrypted.
I figured that might be the case. I guess they might be compressed since the majority of them have almost half the size of the PC version. I tried looking for any possible headers of this filetype in the PS Vita version of SPEECHEVENTSEQUENCES.SWC0 (in the PC version it's multiple SPS files glued together). Unfortunately I wasn't able to figure anything out on my own.

I would be very grateful if you could give me a hint or two as to how to go about this. I can provide the whole PS Vita game files and any from the PC version for comparison if needed.

Essentially what I want to do is replace the sound files the game uses for when you are near a jackspot with a file of no sound. It's pretty annoying when it plays on top of the in-game music and there's no way to turn it off..
Hinki
ultra-n00b
Posts: 7
Joined: Sun Apr 25, 2021 8:41 am

Re: EA Layer 3 Extractor/Decoder

Post by Hinki »

I have no idea how to create files for Def Jam Icon but if I use --verbose on one of the files it gives me

Code: Select all

L: single block loader incorrect because of compression
L: header B loader incorrect because of block type
L: headerless loader correct
P: EAL3 ver. 6 and 7 incorrect with exception: Ver. 6 and 7 header: granule size set incorrectly.
P: EAL3 ver. 5 correct
Parsing blocks...
P: EAL3 ver. 5: null granule encountered, end of block
perqosuette
ultra-n00b
Posts: 1
Joined: Sat Jul 22, 2023 9:30 am

Re: EA Layer 3 Extractor/Decoder

Post by perqosuette »

Hello does this work for windows 10?
Post Reply