READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

EA Layer 3 Extractor/Decoder

Get help on any and all audio formats, or chip in and help others!
Zench
VIP member
VIP member
Posts: 209
Joined: Sun May 04, 2008 9:11 pm
Has thanked: 4 times
Been thanked: 52 times
Contact:

EA Layer 3 Extractor/Decoder

Post by Zench » Tue Aug 24, 2010 7:07 pm

Hi all!

Just a few notes on usage before the link. The program can output either Microsoft .WAV (for multichannel, use switch -mc) and .MP3 (with no information loss; EALayer3 uses the MPEG audio layer 3 codec). If you don't want to output to a multichannel wave, you can uses the switch -s all to extract the streams to different files.

It can read a few different variations on EALayer3 including version 5, version 6 and 7 (though it might be either 6 or 7), two .ASF formats (SCHl PT and SCHl GSTR), and this one (http://hcs64.com/mboard/forum.php?showthread=18598 though only two files of the archive posted there are EALayer3). I'm sure there are more variations out there though.

After browsing a few forums it looks like there is interest in converting from .MP3 or .WAV to EALayer3. This is definitely doable, and shouldn't be too difficult either. :D

On the download page there is a link to the source code, which you're free to use in any project in whole or in part.

http://bitbucket.org/Zenchreal/ealayer3/downloads

Your feedback is greatly appreciated :D
And I said, "The well has finally run dry." So then that will be my battle cry.

OrangeC
double-veteran
double-veteran
Posts: 858
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 33 times

Re: EA Layer 3 Extractor/Decoder

Post by OrangeC » Tue Aug 24, 2010 7:11 pm

Thanks so much zench!!

Rheini
Moderator
Posts: 651
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Rheini » Tue Aug 24, 2010 7:13 pm

Zench wrote:http://bitbucket.org/Zenchreal/ealayer3/downloads
Your feedback is greatly appreciated :D
Nice that you use bitbucket/mercurial 8)
Image

Remember: If you don't want to program a tool yourself, hack another one :wink:
__________
http://www.gameformats.de.vu

Zench
VIP member
VIP member
Posts: 209
Joined: Sun May 04, 2008 9:11 pm
Has thanked: 4 times
Been thanked: 52 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Zench » Tue Aug 24, 2010 7:24 pm

Rheini wrote:
Zench wrote:http://bitbucket.org/Zenchreal/ealayer3/downloads
Your feedback is greatly appreciated :D
Nice that you use bitbucket/mercurial 8)
Yeah, and actually you had something to do with it. When I was downloading your OpenBB project I actually thought BitBucket was pretty convenient so I decided to use it. :]


EA Layer 3 Format:

Or at least some of it. The format used for the blocks is omitted, and all the MPEG stuff is omitted. This should be enough for someone familiar with MPEG to figure it out, though. I'm not an expert, though, so my terminology might be slightly incorrect.

Code: Select all

Inside of each block:

	if version 5:
	
		8 bits - nonzero indicates the presence of uncompressed samples at the end of the granule 
	
	if version 6 or 7 (CHECK):
	
		1 bit - there is an extended header
		1 bit - unknown
		2 bits - unused
		12 bits - total granule size including this small header and uncompressed samples
		
		if extended header:
		
			2 bits - mode
			10 bits - sample frames to discard (mode == 0) or skip (mode == 1 or 2) before outputting the uncompressed samples (CHECK!)
			10 bits - number of uncompressed sample frames at the end of the granule
			10 bits - granule size (can be zero)
	
	all versions:
	
		2 bits - MPEG version
		2 bits - MPEG sample rate index
		2 bits - MPEG channel mode
		2 bits - MPEG mode extension
		1 bit - which granule
		
		if granule is 1 and version is 3 (MPEG 1.0):
		
			channels * 4 bits - MPEG scfsi
			
		MPEG side info beginning after scfsi for each channel
		MPEG data
		
	if version 5 and there are uncompressed samples:
	
		32 bits - number of uncompressed sample frames
		32 bits - offset in the outputted granule these samples go (CHECK)
		channels * uncompressed * 16 bits - uncompressed PCM samples
	
	if version 6 or 7 and there are uncompressed samples:
	
		channels * uncompressed * 16 bits - uncompressed PCM samples


That was one granule. No go back to the beginning!
And I said, "The well has finally run dry." So then that will be my battle cry.

Rheini
Moderator
Posts: 651
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Rheini » Tue Aug 24, 2010 7:44 pm

Zench wrote:Yeah, and actually you had something to do with it. When I was downloading your OpenBB project I actually thought BitBucket was pretty convenient so I decided to use it. :]
Yep, I use Mercurial more and more for all my active projects :)
Image

Remember: If you don't want to program a tool yourself, hack another one :wink:
__________
http://www.gameformats.de.vu

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: EA Layer 3 Extractor/Decoder

Post by AlphaTwentyThree » Tue Aug 24, 2010 7:52 pm

Ladies and gentlemen - Zench scores AGAIN!!!!!

Gotta grab this and try it out on some files! THANKS A LOT!! :)
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

OrangeC
double-veteran
double-veteran
Posts: 858
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 33 times

Re: EA Layer 3 Extractor/Decoder

Post by OrangeC » Tue Aug 24, 2010 7:58 pm

Yep zench you did it again! :D

Works fawlessley on nfs world sns files and Tiberian Twiliight :D

Faqew
advanced
Posts: 71
Joined: Thu Dec 17, 2009 5:42 pm
Location: Germany
Has thanked: 2 times
Been thanked: 3 times

Re: EA Layer 3 Extractor/Decoder

Post by Faqew » Tue Aug 24, 2010 8:11 pm

You are my hero now.:)
I've waited sooooo long for a decoder.

jfwfreo
veteran
Posts: 93
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 18 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo » Wed Aug 25, 2010 10:23 am

Thank you for this decoder, I will be using your code in my C&C3/RA3/C&C4 tools so that my extractor can extract EALayer3 as well as ADPCM.

User avatar
RedDeadRedemption
beginner
Posts: 32
Joined: Tue Jul 13, 2010 3:23 pm
Has thanked: 6 times

Re: EA Layer 3 Extractor/Decoder

Post by RedDeadRedemption » Wed Aug 25, 2010 4:08 pm

It works perfect with SNS files of Burnout: Paradise. Thank You Soooooo much!

Zench
VIP member
VIP member
Posts: 209
Joined: Sun May 04, 2008 9:11 pm
Has thanked: 4 times
Been thanked: 52 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Zench » Wed Aug 25, 2010 9:36 pm

To everyone who replied: you're welcome. I had fun making it. :D
And I said, "The well has finally run dry." So then that will be my battle cry.

User avatar
Mr.Mouse
Site Admin
Posts: 4038
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 552 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Mr.Mouse » Fri Aug 27, 2010 10:54 pm

Zench, you are the man. :) I would click the Thank Post button, were it not that it has gone missing after a phpbb upgrade. :P

brendan19
ultra-veteran
ultra-veteran
Posts: 374
Joined: Thu Aug 12, 2010 8:15 am
Has thanked: 54 times
Been thanked: 82 times

Re: EA Layer 3 Extractor/Decoder

Post by brendan19 » Sat Aug 28, 2010 3:44 pm

Thank you very much Zench for this tool. Glad I can output to .mp3 .wav or even multi-channel .wav (wasn't expecting that but there you go)

Once again, cheers for all your hard work.

Zench
VIP member
VIP member
Posts: 209
Joined: Sun May 04, 2008 9:11 pm
Has thanked: 4 times
Been thanked: 52 times
Contact:

Re: EA Layer 3 Extractor/Decoder

Post by Zench » Sun Aug 29, 2010 2:34 am

I feel absolutely honored :D
And I said, "The well has finally run dry." So then that will be my battle cry.

jfwfreo
veteran
Posts: 93
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 18 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo » Sun Aug 29, 2010 5:12 pm

Your code is great, I already added it to my C&C3/RA3/C&C4 tools.
I also pointed some Sims 3 guys towards your code (because Sims 3 uses EALayer3 for music)

Post Reply