Log in

View Full Version : AAC encoding problems


moko
13th January 2004, 23:08
I am new to the AAC/MP4 format and have tried couple of tests with it using the nero encoder using both nero itself and besweet. I have some problems with the file so I've read the FAQ and searched the forums but couldn't find good answers, so any help would be great.

1) I've read that when encoding with nero it adds a wrong header to the files, so I encoded with besweet but the resulting files wouldn't play whereas the nero files worked just fine (I have tried winamp and wmp using the AAC dshow filter).
2) when encoding with low bitrates the files are allways encoded with the LC profile though I select the HE profile.
3) the files allways have some some silent moments at random points. I can tell for sure it's not a problem with the decoder, that's how the files are.

and some other questions:
4) can I force the encoder to use a specific sample rate? because everytime I encode at low bitrates the files are downsampled.
5) what exactly does the PNS option do?

KpeX
14th January 2004, 02:25
1. Your header will be fine as long as you use the latest (v 0.21) bsn.dll.

2. Are you sure it's low enough for he-aac? Check Q14 of the AAC FAQ. How are you checking that it is HE? Make sure it's wrapped in an MP4 container, this can't be determined from the ra AAC IIRC.

3. This sounds strange. Post your logfile if from besweet. I doubt this is really a BeSweet/Nero problem.

4. No, but if you're using the latest bsn.dll, this is the way it should be.

5. It is an AAC feature, see more info here (http://www.audiocoding.com/wiki/index.php?page=PNS), it has been known to cause problems with HE AAC.

moko
14th January 2004, 08:58
Thanks for the reply. it turned out that I actually didn't read the whole AAC FAQ - now I did, however, things are still not working out.

1) I am using the bsn.dll 0.21 and the besweet files still don't work.
2) the bitrate is good for HE. I checked with winamp but according to what you say it's not accurate so I guess the profile is fine.
3) not happening anymore. probably accured because of the PNS (I did use it with HE).
4) it's not, the files are still downsampled. the FAQ points out that the nero encoder expects a specific rate, I have tested especially at 28 kbps and the expected rate at this bitrate according to the FAQ is 32 khz, but when typing it in ssrc it's still not good, I have also tested encoding input files that allready 32 khz (so no downsampling for them) and when doing that besweet crashed. I returned to nero (48 khz input again) and noticed that it downsamples to 24 khz (at 28 kbps), so again I tried besweet with 24 khz input this time and again it crashed.
5) understood. personally, I think it sucks, and it also caused me problems as I mentioned before.

bond
14th January 2004, 13:04
Originally posted by moko
1) I've read that when encoding with nero it adds a wrong header to the files, so I encoded with besweet but the resulting files wouldn't play whereas the nero files worked just fine (I have tried winamp and wmp using the AAC dshow filter).where did you read that nero burning rom adds wrong headers? never heard that!

1) I am using the bsn.dll 0.21 and the besweet files still don't work.make sure you use the latest beta besweet and latest gui!
btw you cant rename .aac to .mp4

4) can I force the encoder to use a specific sample rate? because everytime I encode at low bitrates the files are downsampled.they are downsampled for a reason ;)
it helps quality
with the latest besweet/gui/bsn.dll ssrc autmoatically resamples, you dont need to set it manually

maybe it resamples to the wrong samplerate (afaik neros resampler is still not used in besweet)
plz tell us your exact settings with 28kbps!

moko
14th January 2004, 15:15
OK, the "wrong header" I was talking about is the ADTS header and now I understand that it's the correct header.
After installing a few more plugins for dshow and winamp I am now able to play all the files no matter the program used, so I guess the besweet files didn't work before because they are raw. Still, another problem with the besweet files: winamp can now play raw aac for me and when playing besweet files it says that the files are 44.1 khz/128 kbps, and that's not the settings I used! after looking at the log I found out that all my aac encodings at besweet were 44.1 khz, but I am using latest besweet and bsn.dll.
The profile used is still LC everytime, and now I'm sure after putting the files in MP4 container and checking out. as I said before I'm dealing mostly with 28 kbps files so the HE profile should be used.

Anyway, here's the log of my typical aac encoding using besweet:

BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using bsn.dll v0.21 by DPeshev,Richard,DSPguru (http://DSPguru.Doom9.org).

Logging start : 01/14/04 , 15:39:27.

e:\BeSweetv1.5b25\BeSweet.exe -core( -input C:\a3.ac3 -output C:\a3.aac -logfilea E:\BeSweetGUIv0.7b2\BeSweet.log ) -azid( -s stereo -c light -L -3db ) -bsn( -2ch -config ) -ota( -G 0.97 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : C:\file.ac3
[00:00:00:000] | Output: C:\file.aac
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 448kbps
[00:00:00:000] | Output Stereo mode: Stereo
[00:00:00:000] | Total Gain: 0.000dB, Compression: Light
[00:00:00:000] | LFE levels: To LR -3.0dB, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz >>> ?
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +---------------------
[00:01:05:952] Gain of 10.2dB had been asserted to file.
[00:01:05:952] Conversion Completed !
[00:01:05:952] Actual Avg. Bitrate : 29kbps
[00:00:37:000] <-- Transcoding Duration

Logging ends : 01/14/04 , 15:40:04.

bond
14th January 2004, 15:55
latest besweet doesnt output .aac files

it outputs .mp4 files, if you rename these to .aac or force .aac output you will get .mp4 files with the worng .aac extension

->
rename your output .aac to .mp4!

tiki4
14th January 2004, 16:43
Originally posted by moko
BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using bsn.dll v0.21 by DPeshev,Richard,DSPguru (http://DSPguru.Doom9.org).

Logging start : 01/14/04 , 15:39:27.

e:\BeSweetv1.5b25\BeSweet.exe -core( -input C:\a3.ac3 -output C:\a3.aac -logfilea E:\BeSweetGUIv0.7b2\BeSweet.log ) -azid( -s stereo -c light -L -3db ) -bsn( -2ch -config ) -ota( -G 0.97 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : C:\file.ac3
[00:00:00:000] | Output: C:\file.aac
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 448kbps
[00:00:00:000] | Output Stereo mode: Stereo
[00:00:00:000] | Total Gain: 0.000dB, Compression: Light
[00:00:00:000] | LFE levels: To LR -3.0dB, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +---------------------
[00:01:05:952] Gain of 10.2dB had been asserted to file.
[00:01:05:952] Conversion Completed !
[00:01:05:952] Actual Avg. Bitrate : 29kbps
[00:00:37:000] <-- Transcoding Duration

Logging ends : 01/14/04 , 15:40:04. ]

You know that you apply post-gain (-ota( -G .. )) to your MP4 file. While BeSweet really can do this, no decoder (including FAAD2, in_mp4.dll, foobar2000, CoreAAC, 3ivx DirectShow filters) can make use of that. You will get a file that has a very low volume compared to '-azid( --maximize )'.

tiki4

moko
14th January 2004, 17:42
Originally posted by bond
latest besweet doesnt output .aac files

it outputs .mp4 files, if you rename these to .aac or force .aac output you will get .mp4 files with the worng .aac extension

->
rename your output .aac to .mp4!
Thanks for pointing that out, works perfectly now.

Originally posted by bond
You know that you apply post-gain (-ota( -G .. )) to your MP4 file. While BeSweet really can do this, no decoder (including FAAD2, in_mp4.dll, foobar2000, CoreAAC, 3ivx DirectShow filters) can make use of that. You will get a file that has a very low volume compared to '-azid( --maximize )'.

That I know, but thanks anyway.


The only problems left now is that the files are still encoded in the LC profile instead of HE.

tiki4
14th January 2004, 18:01
Don't trust Winamp with that. A reliable way to check this is to look at the CoreAAC display or foobar2000. If your file is HE both show something like +SBR and in CoreAAC you see additionally something like 22050 => 44100.

tiki4

moko
14th January 2004, 19:16
I don't trust winamp with that, but also mp4UI and AviMux indicates it's LC. for some reason I can't check with CoreAAC because it only shows me the about screen. anyway, I'm sure it's LC.

EDIT: just checked with foobar2000 and it shows me that the file is HE, but it also claims it's 44.1 khz when it's actually 24 khz...

tiki4
15th January 2004, 09:25
Originally posted by moko

EDIT: just checked with foobar2000 and it shows me that the file is HE, but it also claims it's 44.1 khz when it's actually 24 khz...

This is correct behaviour. Nothing wrong with that.

Btw. there is really a problem with BeSweet and bsn.dll. I tried to encode from 5.1 source to 5.1 HE-AAC at 128 kBit/s. This does not work. The resulting file is LC-AAC.

tiki4

bond
15th January 2004, 09:58
tiki what setting did you use?

tiki4
15th January 2004, 10:32
I used:

besweet -core( -input in.ac3 -output %some_path%\out.mp4 -logfile BeSweet.log ) -azid( -c normal --maximize ) -bsn( -6chnew -config )

I chose '128 kBit CBR', 'High' and 'High Efficiency'. Nero version is 6.3.0.2 and BeSweet 1.5b25. There's nothing wrong with the logfile (I don't have it here), but the resulting file has been resampled to 44.1 kHz (good), but is definitely LC-AAC (verified with CoreAAC, 3ivx and foobar2000).

tiki4

bond
15th January 2004, 10:42
hm i guess the problem is that the nero gui doesnt detect the 5.1 input and changes always to lc-aac for 128kbps (as it assumes the input is stereo)
but i think cbr is not tuned for multichannel anyways, i would choose a vbr setting

tiki4
15th January 2004, 10:59
I think VBR works flawlessly. You're perhaps right as HE-AAC is restricted up to 96 kBit CBR for stereo input, everything else gets LC.

About not using CBR 128 for 5.1. Hm, maybe you try it for yourself. There are some movies it really sounds nice. No way with concert DVD, though.

tiki4

moko
15th January 2004, 13:42
I have one last question and then I believe all my questins regarding AAC are answered: when putting AAC file into MP4 container (with or without video), do I need to put a raw AAC file or one with ADTS header?

bond
15th January 2004, 14:08
adts should work fine