Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: @Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant? (Read 9279 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

I searched through a lot of more or less complicated posts and documents, but couldn't find a simple clear answer, if anyone knows, please help:

There is an MPEG-2 AAC standard and an extended MPEG-4 AAC standard. The question is: Is the "old" MPEG-2 AAC compliant to the MPEG-4 ISO specs?

For example, this is what I found:

"What about MPEG-4. Is there a relationship between AAC and MPEG-4?
Yes there is. AAC will be part of MPEG-4. So all future MPEG-4 decoders should be able to decode MPEG-2 AAC bitstreams as well, at least if provided as a raw data stream without any transmission protocol.

So MPEG-4 AAC will be the same as MPEG-2 AAC?
No, not exactly the same. MPEG-4 AAC will be a superset of MPEG-2 AAC. There are some additional features, namely a different predictor, a method called Perceptual Noise Substitution and a different coding kernel which facilitates scaleable systems, called BSAC (Bit Sliced Arithmetic Coding). For details, please visit our MPEG-4 web pages."

Or:

"MPEG-2 file (normal LC profile) is identical to MPEG-4 LC except 2 bytes in ADTS header. Raw mode without header is identical."
"The MPEG-4 systems layer allows codecs according to existing (MPEG) standards, e.g. MPEG-2 AAC, to be used."

But as I have no clue about this header thing, I don't know, if the MPEG-2 header is compliant also, or only MPEG-4 header...

Another one:

"The presence of the MPEG-2 AAC standard within the MPEG-4 tool set provides for general compression of audio in the upper bitrate range."

But does this refer to MPEG-4 Header? Or MPEG-2 Header. The problem is AACENC LC Profile gives you an MPEG-2 Header (any hidden settings to force it to MPEG-4?) and its raw mode doesn't work with mp4creator. That's why I am using LTP Profile at the moment, which is only part of mpeg-4 to ensure compatibility.

And much more...but it does never clearly state, if MPEG-2 AAC is in ISO-specs, so you can use it without modification (for example this ADTS header thing...is it also compliant with MPEG-2 header)...and there might be other differences between MPEG-2 AAC and MPEG-4 AAC, I don't even know of...

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #1
Lemessee if I can clarify things for you.

Theoretically, any player capable of playing MPEG4 AAC is able to play MPEG2 AAC. First, because MPEG2 AAC is identical to MPEG4 AAC - except for the famous 2 bits in the ADTS header. There isn't any kind of "MPEG2 AAC"-only technology - like the "MPEG4 AAC"-only technologies: PNS, LTP and, soon, SBR (I just finished coding the Huffman tables for SBR AAC. )

MPEG2 AAC is completely compliant with MPEG4 AAC. They share the same compression algorithms. That's why I said somewhere that there's no sense in saying that a RAW AAC file is MPEG4 or MPEG2 - there's no difference! It's plain MPEG AAC.

The headers are the same too. The same structure, either ADIF or ADTS. And both MPEG2 and MPEG4 AAC use these headers.

The raw AAC mode doesn't work with MP4 creator for the simple reason that it's RAW! MP4creator can't guess how many channels there are in the stream, nor the sampling rate.

If you feed a raw AAC to the winamp plugin or FAAD, it will suppose it's 41kHz, 2channels, 16bit; and try to play.

I have already used MPEG2 AAC LC files with MP4creator, and they muxed and played fine. But LTP is fine, too.

Hope it helped.

Regards;

Roberto.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #2
Thanx for your detailed answer!

I also had used MPEG2 AAC LC files with MP4Creator, but just that it works, doesn't mean it's compliant. But now you said, it is :-)

Is there any difference left in the muxed mp4-files, one from MPEG-2 AAC LC with its own header and one from the same as MPEG-4 AAC LC with its own header ? I mean is the 2 bits difference somehow carried over to the final file or is it only information for the muxer?

But if MPEG-2 AAC really is compliant, it makes no difference anyway...just asking...

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #3
Quote
Originally posted by Chibi Jasmin
I mean is the 2 bits difference somehow carried over to the final file or is it only information for the muxer?

But if MPEG-2 AAC really is compliant, it makes no difference anyway...just asking...


I'm not 100% sure, but I guess the difference is carried. The reason I believe it is that, if you open a MP4 file in MP4 Winamp plugin (in_mp4), the file info box will show if the audio stream is MPEG2 or MPEG4 AAC.

Regards;

Roberto.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #4
Good idea to check with WinAmp info box... :-)

And you are 100% sure that even these files with MPEG-2 headers are MPEG4-ISO-compliant? I know you described it already...I understood that compression is the same and all that...but there is a slight difference in the header...I just want to be sure, even the files with MPEG-2 headers are 100% compliant...(imagine a player sticking strictly to the specs and the mpeg-2 headers are not in the specs...although it's the same compression algo, it would not play...)

Sorry, don't wanna bore you...

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #5
If a mpeg-4 aac player can play a mpeg-2 aac file because the coding schemes are identical, then a mpeg-2 aac player can play, at least, a  mpeg-4 aac LC file. Am I right?

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #6
Well, if the mpeg-2 player understands the mpeg-4 header :-)

mpeg-2 was before mpeg-4, maybe it doesn't, who knows...I'm just trying to find out the opposite :-)

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #7
couldn't you change the type of the aac file by just modifying those two bits anyway?  :confused:  what's the problem?
A riddle is a short sword attached to the next 2000 years.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #8
Quote
Originally posted by Chibi Jasmin
And you are 100% sure that even these files with MPEG-2 headers are MPEG4-ISO-compliant? I know you described it already...I understood that compression is the same and all that...but there is a slight difference in the header...I just want to be sure, even the files with MPEG-2 headers are 100% compliant...(imagine a player sticking strictly to the specs and the mpeg-2 headers are not in the specs...although it's the same compression algo, it would not play...)


Well, I guess that a player that sticks 100% to the MPEG2 specs and only these specs would recognize those 2 bits as bad data. Maybe not. Besides those 2 bits, the headers are identical. Someone with an Expanium could clarify. (Although I doubt the Expanium sticks only to the MPEG2 specs)

Quote
Sorry, don't wanna bore you...


Hehe, no problem.

Quote
Originally posted by ssamadhi97
couldn't you change the type of the aac file by just modifying those two bits anyway?  :confused:  what's the problem?


Yes, you could. But I never heard of a program to do that. You would probably need a Hex editor and some knowledge of the AAC file structure.

Regards;

Roberto.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #9
It's not that the 2 bits are different, they are just not there. So I guess it's impossible to hack it with a hex editor. Converting them should be possible, by copying the files bit for bit and skipping those 2 bits on every frame.

Menno

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #10
Quote
Originally posted by rjamorim


Well, I guess that a player that sticks 100% to the MPEG2 specs and only these specs would recognize those 2 bits as bad data. Maybe not. Besides those 2 bits, the headers are identical. Someone with an Expanium could clarify. (Although I doubt the Expanium sticks only to the MPEG2 specs)



:-) Wanted to know the opposite :-)

Does a 100% MPEG4-compliant player play an MPEG-2 AAC LC?

Although the difference is 2 bits, these 2 bits might be out of spec? In spec might be only the header with these 2 bits in MPEG4-format...anyone knows an answer: Is MPEG-2 AAC LC 100% compliant to MPEG4-ISO specs?

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #11
Without the ADTS headers they are the same.

Menno

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #12
I know, but the question is:

Do the MPEG-4 specs for AAC audio include MPEG-2(!) AAC LC? Or only MPEG-4(!) AAC LC, although the difference is only in the headers, it's a difference and it could be only MPEG-4 headers are in the specs (although it would be stupid).

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #13
The MPEG-4 ADTS headers are in the MPEG-4 spec only and the MPEG-2 ADTS headers are in the MPEG-2 AAC spec only.

Menno

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #14
Is that really true? Conclusion:

Psytel Enc default profile output is not MPEG-4 compliant as it is MPEG-2 AAC LC

Is there a possibility to use LC with AAC enc with MPEG-4 headers?

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #15
Note:

Cisco's MP4Creator will make .mp4 object type ID to "MPEG-2 AAC LC" when it creates .mp4 files out of PsyTEL 2.15 AAC bitstreams (except LTP profile)

Although, there is absolutely no difference between these two streams except in one byte - Envivio Player won't play files with MPEG-2 flag!

I forwarded the problem to Envivio Staff, and I hope they'll react soon

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #16
If the above is true, that MPEG-2 headers are not in MPEG-4 specs, I wouldn't call it a problem, if a player that claims to play MPEG-4 doesn't play mp4's with MPEG-2 AAC... :-) Of course, it doesn't hurt....I would be happy having a switch in aacenc to make it use MPEG-4 AAC LC. There might be more of these "MPEG4-Players" software or hardware, that stick to specs, I don't know...

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #17
I would call it rather a bug in Envivio player (or missed feature) than sticking to specs.

I have AACEnc that generates MPEG-4 profiles only - but I will add a separate switch to a new release.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #18
Not that I think, it's a good idea to have a player that refuses to play Mpeg2-aac lc but plays mpeg4-aac lc happily....but as you can see by this example there are people implementing it that way....while I have you here Ivan, do you also say that mpeg-2 aac lc is not in mpeg-4 specs but only mpeg-4 aac lc (yeah sure, the one byte difference, but that's what I mean)? You should be the one to know for sure...

And thanx for adding the switch :-)

 

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #19
MPEG-2 AAC LC/Main stream is identical to the MPEG-4 AAC LC/Main stream in the .mp4 container. The only difference is Object Type ID byte field.

Although it is not required by the standard - but it would be ridiculous not to support MPEG-2 AAC streams, because of one byte (?!)

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #20
Quote
Originally posted by Ivan Dimkovic
I have AACEnc that generates MPEG-4 profiles only - but I will add a separate switch to a new release.


  Hmm? I thought AACEnc 2.15 was already capable of generating MPEG-4 LC streams. At least, those seem to be what I was getting with the "--profile 4" switch (no longer documented in the info, but still there!). Did I miss something?

    - M.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #21
Hmm.. damn - I will have to take a look at that part of the code (command-line processor) - I haven't done it for a while...

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #22
Quote
Originally posted by Ivan Dimkovic
Note:

Cisco's MP4Creator will make .mp4 object type ID to "MPEG-2 AAC LC" when it creates .mp4 files out of PsyTEL 2.15 AAC bitstreams (except LTP profile)

Although, there is absolutely no difference between these two streams except in one byte - Envivio Player won't play files with MPEG-2 flag!


I know about the difference between MPEG-4 AAC and MPEG-2 AAC, and the difference only in ADTS. Just you said.

But I don't know about the .mp4 file header, And where can I get Cisco's MP4Creator? PLS help.

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #23
MP4 files don't have ADTS header - this header is stripped out in the MP4 file, because there is no need for it.

So, there is no difference between AAC streams in MP4 file (if no MPEG-4 tools like PNS or LTP are used) except one byte in the file header - so there is no need for any changes to play MPEG-2 AAC

www.mpeg4ip.net

@Ivan: Is MPEG-2 AAC MPEG-4 ISO-compliant?

Reply #24
I thank you for your information...and sure, I think so, too...no need not to play the files...I just thought some people might implement their players not playing it with mpeg-2-"byte"...and you told me I was right (see Envivio)...

Learned a lot... :-)