Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Audio encoding

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 2nd January 2004, 17:29   #1  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
HowTo correctly avoid resampling problems with Nero AAC encoder in Besweet/Oagmachine

IMPORTANT UPDATE:
thanks to great DSPGuru all the info posted in this thread is now used by besweet (since bsn.dll version 0.21) to automatically set the SSRC resampling values (no need to change that by hand anymore)
now lets hope that the ahead devs dont change any of these values


as i very often read some posts which claimed that you have to always resample to 44.1khz when using the nero aac encoder dlls with besweet/oagmachine, i wanted to make clear that this is not correct! you will get borked output in many cases if you do so!

this thread aims to tell you how to correctly use the ssrc resampling option in besweet/oagmachine to avoid resampling problems:

a) how the nero dlls work (according to menno)
1) the nero encoder dlls themselves dont do any resampling
2) the resampling is done by an own nero resampling plugin
3) the user chooses a bitrate and the encoder requests a specific sampling rate as input for this bitrate
4) now the resampling plugin would normally resample to this specific sampling rate
5) but nencoder and besweet ignore this request, therefore the encoder dlls dont get the requested input sampling rate

example:
a user chooses 80kbps lc-aac as output in the nero encoder. the encoder requests 32khz for that bitrate, but besweet gives him 48khz or 44.1khz (or whatever other, from 32khz different, setting the user choose to resample to in besweet)
->
the output is borked


b) conclusion
you have to feed the nero encoder with the sampling rate he needs for a specific bitrate, otherwise you will get a wrong output
which means in besweet you have to set the correct sampling rate by using ssrc!

i now tested all possible sampling rates at specific bitrates with the following results:

Code:
bitrate samplerate				profile samplerate	
					
CBR						VBR	
					
HE-AAC						HE-AAC	
mono		stereo		5.1		stereo			5.1
8    24000	16   24000	40   24000 	Tape	    44100	Tape 	    44100
10   24000	20   24000 	48   24000 	Radio	    44100	Radio 	    44100
12   32000	24   32000 	64   32000 	Internet    44100	Internet    44100
14   32000	28   32000 	80   32000 	Streaming   44100	Streaming   44100
16   44100	32   44100 	96   44100 			
20   44100	40   44100 	112  44100 			
24   44100	48   44100 	128  44100 			
28   44100	56   44100 	144  44100			
32   44100	64   44100 	160  44100			
40   44100	80   44100 	192  44100			
48   44100	96   44100				
					
LC-AAC						LC-AAC	
mono		stereo		5.1		stereo			5.1
8     8000	16    8000	40    8000 	Tape 	    24000	Tape 	    24000
12   11025	20    8000	48   11025 	Radio 	    32000	Radio       32000
16   16000	24   11025	64   16000 	Internet    44100	Internet    44100
20   16000	28   11025	80   16000 	Streaming   44100	Streaming   44100
24   22050	32   16000	96   22050 	Normal	    44100	Normal	    44100
28   24000	40   22050	128  24000	Extreme	    44100	Extreme	    44100
32   32000	48   22050	160  32000	Audiophile  44100	Audiophile  44100
40   32000	56   24000	192  32000	Transcoding 44100	Transcoding 44100
56   44100	64   32000	225  32000			
64   44100	80   32000	256  44100		
80   44100	96   32000	288  44100	
96   44100	112  44100	320  44100		
112  44100	128  44100	384  44100	
128  44100	144  44100	480  44100	
160  44100	160  44100	512  44100	
		192  44100			
		256  44100
examples:
you want to encode multichannel, vbr, with he-aac and the streaming preset:
you have to set the sampling rate in besweet under ssrc to 44100

you want to encode stereo, cbr, with lc-aac at 96kbps:
you have to set the sampling rate in besweet under ssrc to 32000
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 6th January 2004 at 23:31.
bond is offline  
Old 2nd January 2004, 17:58   #2  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Nice work bond! Thanks for performing these tests. AAC FAQ #19 updated with this info.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline  
Old 2nd January 2004, 18:01   #3  |  Link
bobsc
Registered User
 
bobsc's Avatar
 
Join Date: May 2003
Location: Midwest
Posts: 149
I'm sure the same is true using BeSweetGUI.
__________________
bobsc
bobsc is offline  
Old 2nd January 2004, 18:12   #4  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally posted by bobsc
I'm sure the same is true using BeSweetGUI
of course
this is true for every tool that is based on the nencoder tool, ie besweet (with gui), oagmachine or all tools that use the nencoder commandline tool directly

its nencoders fault that it ignores the request from the encoder plugin for a specific samplerate

foobars foo_nero plugin doesnt use nencoder and handles this request fine already, read more about it here!
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 2nd January 2004 at 18:16.
bond is offline  
Old 2nd January 2004, 18:19   #5  |  Link
bobsc
Registered User
 
bobsc's Avatar
 
Join Date: May 2003
Location: Midwest
Posts: 149
Quote:
Originally posted by bond
foobars foo_nero plugin doesnt use nencoder and handles this request fine already, read more about it here!
foo_nero is based on NEncode.
__________________
bobsc
bobsc is offline  
Old 2nd January 2004, 18:21   #6  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
according to menno it isnt (perhaps it was in the beginning)

but plz discuss foobar issues in the foobar thread
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline  
Old 2nd January 2004, 18:28   #7  |  Link
bobsc
Registered User
 
bobsc's Avatar
 
Join Date: May 2003
Location: Midwest
Posts: 149
In foobar click components then click foo_nero. It says based on NEncode.
__________________
bobsc

Last edited by bobsc; 2nd January 2004 at 18:40.
bobsc is offline  
Old 2nd January 2004, 18:40   #8  |  Link
Tuning
I'm back! :D
 
Tuning's Avatar
 
Join Date: Aug 2003
Location: The Matrix
Posts: 1,029
Thanks bond, this is what i was expecting for ages. I have already done similar tests a while ago, but could not conclude anything.(Though the test was not detailed as you did). And mikeson and I did pointed DSPguru to give a clarification on this phenomenon. But as Dg has no time he could not reply. And for the time I put resampling to 44 in faq like doom9 did in Oagmachine guide. Thanks for clarfying.

Thanks for the detailed table too. Now if an algorithm is made on these table, I think BeSweet also can properly encode at every sampled sound.
For the time being we could manually use this table.


btw I have a doubt, only LC CBR profile (stereo and 5.1) doesn't allow 48khz encoding, mono and VBR can do it perfectly.


btw2, bond if you can again contact menno, can you ask the bitrate distribution question for LC AAC. (2x128+64+1=321kbps) vs (2x96+48+1=241kbps). I still doubt it.

Thanks
__________________
My Blog
Tuning is offline  
Old 2nd January 2004, 18:58   #9  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally posted by Tuning
btw I have a doubt, only LC CBR profile (stereo and 5.1) doesn't allow 48khz encoding, mono and VBR can do it perfectly.
hm how do you get these results?
i now deleted the 48khz marks as i checked it again and it seems, although the encoder can handle 48khz in some cases when accessed through buring rom, that when used with besweet it doesnt handle 48khz input at all

Quote:
btw2, bond if you can again contact menno, can you ask the bitrate distribution question for LC AAC. (2x128+64+1=321kbps) vs (2x96+48+1=241kbps). I still doubt it.
hm simply send him a pm, he also around on doom9
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 2nd January 2004 at 20:53.
bond is offline  
Old 4th January 2004, 14:10   #10  |  Link
mikeson
Registered User
 
Join Date: Dec 2001
Location: Czech Republic
Posts: 261
Ivan Dimkovic already explained it here.
__________________
mikeson
mikeson is offline  
Old 6th January 2004, 11:00   #11  |  Link
Tuning
I'm back! :D
 
Tuning's Avatar
 
Join Date: Aug 2003
Location: The Matrix
Posts: 1,029
Quote:
Originally posted by mikeson
Ivan Dimkovic already explained it here.
mikeson, thanks for putting up the link again. The FAQ question was actually an abstract of this thread. But on thorough reading, I find that he author of thread is asking for AAC bitrates for equvalent "CD-quality". So now from some AAC documentation, I learned that AAC(LC) @ 96kbps is equvalent to "CD-quality". That is causing the doubt above quoted.
So I think instead of using 128, the bitrate should be 96kbps. That is all. I have already PMed menno with this doubt. Hope he will visit doom9 soon and we could get an explanation.
__________________
My Blog
Tuning is offline  
Old 6th January 2004, 22:57   #12  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
thank you bond for your research and posting this informative thread, but the bug had been fixed now (due to tip from menno), and the best way to avoid resampling problems now is just to work with the latest BeSweet binaries.
DSPguru is offline  
Old 6th January 2004, 22:59   #13  |  Link
bobsc
Registered User
 
bobsc's Avatar
 
Join Date: May 2003
Location: Midwest
Posts: 149
Thank you DSPguru.
__________________
bobsc
bobsc is offline  
Old 6th January 2004, 23:27   #14  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
great thanks a lot dspguru!
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline  
Old 7th January 2004, 05:34   #15  |  Link
Tuning
I'm back! :D
 
Tuning's Avatar
 
Join Date: Aug 2003
Location: The Matrix
Posts: 1,029
Quote:
Originally posted by DSPguru
...but the bug had been fixed now (due to tip from menno), and the best way to avoid resampling problems now is just to work with the latest BeSweet binaries.
Thanks DSPGuru, from doom9.org build its working. Yesterdays BeSweet1.5b25, was not working.

Thanks.
__________________
My Blog

Last edited by Tuning; 7th January 2004 at 06:36.
Tuning is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:35.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.