PDA

View Full Version : mp4box incorrect header information


CQCmaster
16th April 2009, 03:30
Hey guys,

I am having a little issue with the mp4box. I have been trying to find a solution to this for few hours now but nothing, so here's my problem...

I have these two files...
-video.mp4 (1280x544@25fps encoded with x264)
-audio.mp4 (5.1, 48k Hz, Nero AAC LC format encoded from ac3 file using foobar2000)

I then mux those with mp4box (using Yamb) in which I get the mp4 container with no errors... but now the header of the file reads this for the channels and sampling... stereo, 24k Hz??

Even though the audio is in 5.1, 48k Hz, the header shows stereo, 24k?? I don't know if this is a bug or am I doing something wrong here? btw, I am using the latest Yamb. Also I should note that the details on the video are good. Just the Audio is what's bugging me.

Please help.

p.s.
I forgot to mention that I have also tried mkvmerge to see if the same issue would arise but fortunately with mkvmerge all the headers are in perfect order. Just having trouble with mp4box.

Thanks.

qyot27
16th April 2009, 06:46
What's the bitrate you told Nero to use for the audio? I suspect that, if you set it too low (and 'low' for multichannel is different than 'low' for stereo, due to the extra channels) then Nero kicked into HE-AAC mode. If not, then I've noticed HE-AAC tag info being written to files even if they're really Low Complexity - the only reason I know this is that dBPowerAMP's shell extension (at least as of r10, maybe it was fixed since then) would show High Efficiency on files that were clearly full frequency, high bitrate, stereo, Low Complexity encodes, and which FAAD - via CoreAAC - decoded as such, and not as High Efficiency. There could be a chance that one of the tools is spazzing out on you, whether it's mp4box, or Nero.

If you listen to the audio, is it noticeably lower in quality? If so, then it wasn't LC you encoded to, and somewhere along the line the HE-AAC SBR data got stripped off. mkvmerge will read this info from the MP4 file and apply it as needed. MP4Box should as well for MP4 files, although for AAC you need to declare it (although as I don't really work with HE-AAC I could be wrong about MP4Box detecting it from an MP4).

The reason I suspect this is because HE-AAC works by halving the frequency and using SBR data to recreate those frequencies on playback. This is to allow the use of lower bitrates, as the lower your frequency is, the lower the possible bitrate threshold is to maintain decent quality, and with the SBR data, the perceived quality is higher relative to the bitrate of the same stream without it. This fits in with the intended purpose of HE-AAC, which is mostly streaming (although audio with mostly speech would probably benefit from it too). Lower bitrate = better bandwidth usage. 'High Efficiency' in this case is somewhat of a misnomer, as most people associate 'Efficiency' with 'Precision', which is not true in the case of HE-AAC's relationship with LC-AAC. And considering your observation that it's reporting only half of the intended frequency, HE-AAC is the most logical culprit here.

CQCmaster
16th April 2009, 07:50
I have used 220Kbps/5.1 (2-pass) and I have set it on AAC-LC. When i first encode the audio it stays with the correct header and there isn't any quality loss whatsoever. But when I mux it with mp4box, the header changes but the quality stays the same. And as I have said, when I mux the same audio file with mkvmerge, I get the correct header. So this has to be mp4box that is causing this.

Although, when I add the audio file in Yamb, in description it reads as... AAC-LC-SBR - time - 220Kbps - 6ch - 48.0 KHz

So it has SBR data but it isn't in HE?


**UPDATE**

So I took your advice and raised the bitrate to 256. This time the SBR data wasn't there. After muxing it with mp4box the mp4 container had a correct header this time.
You were right all along.
Thank You very much for the help qyot27... I owe you one buddy :D