XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Sep 22, 2017 9:16 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 84 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:07 pm 
Offline
VIP member
VIP member

Joined: Sun May 04, 2008 9:11 pm
Posts: 209
Has thanked: 4 times
Have thanks: 50 times

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

You can make the ads go away by registering


_________________
And I said, "The well has finally run dry." So then that will be my battle cry.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:11 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 829
Has thanked: 5 times
Have thanks: 32 times
Thanks so much zench!!


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:13 pm 
Offline
Moderator

Joined: Wed Oct 18, 2006 9:48 pm
Posts: 650
Location: Germany
Has thanked: 19 times
Have thanks: 41 times
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


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:24 pm 
Offline
VIP member
VIP member

Joined: Sun May 04, 2008 9:11 pm
Posts: 209
Has thanked: 4 times
Have thanks: 50 times
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:
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.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:44 pm 
Offline
Moderator

Joined: Wed Oct 18, 2006 9:48 pm
Posts: 650
Location: Germany
Has thanked: 19 times
Have thanks: 41 times
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


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:52 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 596 times
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 ;)


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 7:58 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 829
Has thanked: 5 times
Have thanks: 32 times
Yep zench you did it again! :D

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


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Tue Aug 24, 2010 8:11 pm 
Offline
advanced

Joined: Thu Dec 17, 2009 5:42 pm
Posts: 69
Location: Germany
Has thanked: 2 times
Have thanks: 3 times
You are my hero now.:)
I've waited sooooo long for a decoder.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Wed Aug 25, 2010 10:23 am 
Offline
veteran

Joined: Sat Nov 15, 2008 1:31 am
Posts: 83
Has thanked: 0 time
Have thanks: 13 times
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.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Wed Aug 25, 2010 4:08 pm 
Offline
beginner
User avatar

Joined: Tue Jul 13, 2010 3:23 pm
Posts: 32
Has thanked: 6 times
Have thanks: 0 time
It works perfect with SNS files of Burnout: Paradise. Thank You Soooooo much!


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Wed Aug 25, 2010 9:36 pm 
Offline
VIP member
VIP member

Joined: Sun May 04, 2008 9:11 pm
Posts: 209
Has thanked: 4 times
Have thanks: 50 times
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.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Fri Aug 27, 2010 10:54 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4010
Location: Dungeons of Doom
Has thanked: 411 times
Have thanks: 550 times
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

_________________
Please like our Facebook page!


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Sat Aug 28, 2010 3:44 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Thu Aug 12, 2010 8:15 am
Posts: 340
Has thanked: 54 times
Have thanks: 70 times
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.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Sun Aug 29, 2010 2:34 am 
Offline
VIP member
VIP member

Joined: Sun May 04, 2008 9:11 pm
Posts: 209
Has thanked: 4 times
Have thanks: 50 times
I feel absolutely honored :D

_________________
And I said, "The well has finally run dry." So then that will be my battle cry.


Top
 Profile  
 
 Post subject: Re: EA Layer 3 Extractor/Decoder
PostPosted: Sun Aug 29, 2010 5:12 pm 
Offline
veteran

Joined: Sat Nov 15, 2008 1:31 am
Posts: 83
Has thanked: 0 time
Have thanks: 13 times
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)



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 84 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group