The Forum is up for sale: XeNTaX Forum looking for new owner

Some informations about EALayer3 MPEG

Get help on any and all audio formats, or chip in and help others!
zano
ultra-n00b
Posts: 5
Joined: Mon Jun 29, 2009 5:40 pm

Some informations about EALayer3 MPEG

Post by zano »

Hi all,

Is where anybody who can give me some good informations about the EALayer3 mpeg from Electronic Arts ?... It seems that EA don't give any information about this codec and all informations we can get from Wiki or else are out of date, obsolete, etc...

Is this codec / compression algorithm Confidential Defense ? lol 8D

Nice day to all.
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Re: Some informations about EALayer3 MPEG

Post by Rheini »

Don't think so, if you are lucky it has been reverse engineered in some project like ffmpeg.

Seems like there one was a description about EA's in-house audio library but it has gone. If you find it, tell me.
http://wiki.multimedia.cx/index.php?tit ... ronic_Arts

I think EA's tool SoundXchange supports converting it.
OrangeC
double-veteran
double-veteran
Posts: 868
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 41 times

Re: Some informations about EALayer3 MPEG

Post by OrangeC »

I don't think so. I tried it on some red alert 3 .cdata files and nfs undercovers mus but no luck.
zano
ultra-n00b
Posts: 5
Joined: Mon Jun 29, 2009 5:40 pm

Re: Some informations about EALayer3 MPEG

Post by zano »

Ok guys,

Thanks for your support and advices ... I see that I've only one way : reverse engineering because
ffmpeg is great but can't master this kind of compression :?

No matter as soon as I find something interesting, I give you feedback.

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

Re: Some informations about EALayer3 MPEG

Post by Faqew »

Would be great to find a way to convert it. The music from Burnout Paradise still isn't extractable.
The thread is here: viewtopic.php?f=10&t=2905

aluigi wrote a script which extracts .dat files out of the .sns sound files, but no one knows what to do with it.
Apollo
veteran
Posts: 145
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 24 times

Re: Some informations about EALayer3 MPEG

Post by Apollo »

Well, having looked at the sns file, it is indeed ealayer3 like EALA has also used in Command & Conquer 3 while RA3 has an newer variant of it.
zano
ultra-n00b
Posts: 5
Joined: Mon Jun 29, 2009 5:40 pm

Re: Some informations about EALayer3 MPEG

Post by zano »

OK all,

Thanks a lot for these informations... I think I can do something usefull with them... I give you feedback as soon as possible.

So long.
pietastesgood
advanced
Posts: 72
Joined: Sun Oct 26, 2008 2:41 am
Has thanked: 3 times
Been thanked: 4 times

Re: Some informations about EALayer3 MPEG

Post by pietastesgood »

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

Re: Some informations about EALayer3 MPEG

Post by Faqew »

zano wrote:OK all,

Thanks a lot for these informations... I think I can do something usefull with them... I give you feedback as soon as possible.

So long.

This sounds awesome!:)
OrangeC
double-veteran
double-veteran
Posts: 868
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 41 times

Re: Some informations about EALayer3 MPEG

Post by OrangeC »

zano wrote:OK all,

Thanks a lot for these informations... I think I can do something usefull with them... I give you feedback as soon as possible.

So long.

Great, looking forward to anything great about decoding this codec.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Some informations about EALayer3 MPEG

Post by hcs »

I've been looking at this a bit tonight, someone had sent me a sample of EA Layer 3 (I think from some C&C) called 166b084d.46410f77.03cfdd8a.96acd5f2.cdata. I notice that it has the same kind of layout as EA's packed XMA thing, where it stores short frames/packets. Unfortunately there's nothing resembling a standard MPEG-1 audio header there, so I'm having to poke around at random.

Pretty confident about the overall stream layout:
0x00-0x03: total frame size (including header, thus offset to next frame, if this is the last frame high bit is set)
0x04-0x07: samples in this frame (for layer 3 the first frame has a low count due to the decoder latency and the last frame has a high count due I guess to the same thing, all the frame in between have either 1152 or 2304 samples so one or two complete MPEG-1 frames).

I don't know how many of the following bytes are part of the header or which are the beginning of the MPEG frame body:
0x08: 00
0x09: 0xd4 or 0xd6 (in my sample file its d4: 1652 d6: 1435, very roughly an 8:7 ratio)
0x0A: a small byte value, never goes about 0x4e

Looking at the frame sizes, there is never a single frame (that is, a frame in this stream layout containing only 1 MPEG frame, distinguishable by the sample count, and 2304 sample ones are quite rare) that is > 0x417 bytes (though several at exactly that). If we assume that this contains MPEG-1 Layer III, this corresponds almost exactly to 44100 Hz at 320kbps, which has a frame size of 0x414 (0x415 with padding which would be used about 90% of the time). If they are encoding at 320kbps and getting rid of the padding, thus enabling them to get vbr performance without a vbr decoder, this would make sense.

8 bytes of each frame are occupied by stuff we know to be only stream framing material (the frame size and sample count), which leaves 0x40F bytes for the MPEG payload in the largest chunks. Assuming a fixed MPEG header (4 bytes) is slapped on each frame as it comes across, this would put the largest total MPEG frame at 0x413 bytes, still short of the proper size. If more than 8 bytes are stream framing then we come up even shorter. I haven't been able to put together anything that generates a valid stream yet. It may be that there's some deeper modifications, or I have to use the d4/d6 for different joint stereo modes, or some such. I also haven't been able to spot where the second frame begins in the 2304-sample packets.

I've got a copy of the MPEG-1 Layer III standard so I'll try to get a feel for it from that angle, and I'll keep poking at it, but I thought I'd post my progress so far to help anyone else who wants a crack at it.
Faqew
advanced
Posts: 71
Joined: Thu Dec 17, 2009 5:42 pm
Location: Germany
Has thanked: 2 times
Been thanked: 3 times

Re: Some informations about EALayer3 MPEG

Post by Faqew »

The contents of this post was deleted because of possible forum rules violation.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Some informations about EALayer3 MPEG

Post by hcs »

Interesting, here the d4/d6 I was looking at is instead c4/c6, and at a much different ratio (2098:5330). The "small byte value" goes up to 0x58. Otherwise seems the same. Good to have more to chew on, in any case.
Kataah
beginner
Posts: 39
Joined: Thu May 24, 2007 7:21 pm
Has thanked: 13 times
Been thanked: 4 times

Re: Some informations about EALayer3 MPEG

Post by Kataah »

The contents of this post was deleted because of possible forum rules violation.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Some informations about EALayer3 MPEG

Post by hcs »

Hm, interesting to hear about sox, did it have some special support or was it just MP3? Or does it come in through ffmpeg? I'm hoping that all I'll have to do is reframe this data.
Post Reply