Log in

View Full Version : BeSweet's aac/mp4 encoding. sampling-rate ?


E-Male
6th May 2004, 15:17
EDIT2 (plus a new topic yet again):

ok, to get the facts right:

It is possible to encode 48khz aac with besweet
But the audio gets resampeld to 44.1khz when you use the config switch

so to get your 48khz aac audio you need to do this:
1. start the encode with the config switch
2. set all your options and close the config dialoge
3. abort the encoding
4. restart encoding without the config switch
(skip 1-3. if you wanna re-use the configuration of your last encode)

i hope i got everything right now

bond
6th May 2004, 17:48
good question
if you encode with aac in nero burning rom its possible to keep the 48khz, but in besweet it gets automatically downsampled
dunno why, maybe dspguru hardcoded it :confused:

E-Male
6th May 2004, 18:37
foobar also keeps the samplerate
so it must be hardcoded in besweet

i'd really love to see that removed, because 48khz aac is my 5.1 audio codec of choice, and not being able to produce it with besweet is just :( :( :(

E-Male
6th May 2004, 18:52
i looked at the bsn.dll code (not that i knew much about programming, but a bit) and to me it seems the forced conversion is not in there, so it must be in besweet itself (which i didn't find the code for, i thought it was gpl)

btw: i also tried renaming shibatch.dll, but then every try to convert to aac will give an error asking for it

bond
6th May 2004, 19:07
hm strange, its maybe a bug than, or nero changed something in their code, which besweet doesnt handle atm

afaik both, bsn and foobar use the same nero wrapper: nencoder, so i wonder what the difference is :(

E-Male
6th May 2004, 20:47
when bsn is used besweet automatically calls the resample dll
AFAIK it's not bug, it was introduced at a time when 48khz aac didn't work properly (or wasn't optimized or whatever)
this should really be removed with the next version as it is not up2date (i thought it already was and i just was to stupid to find it, that's why i posted)
and IMHO forcing something that already can be done with an existing option isn't good anyway (@dspguru: no offense, just a request)

E-Male
6th May 2004, 20:55
---------------FIRST POST EDITED---------------------

E-Male
6th May 2004, 20:56
i hope the thread stays readable, i'm trying my best

i also hope dspguru will read the request and will consider it for the next version of besweet

DSPguru
6th May 2004, 21:29
Originally posted by bond
dunno why, maybe dspguru hardcoded it :confused:
Originally posted by E-Male
and IMHO forcing something that already can be done with an existing option isn't good anyway (@dspguru: no offense, just a request)
nothing is forced/hardcoded. stop spreading disinformation.
bsn's source-code is public. feel free to update it to your needs.

pogo stick
6th May 2004, 22:11
Originally posted by E-Male
as it seems besweet still doesn't allow encoding aac at 48khz
If you use -bsn( -6chnew ) without -config then aac will be at 48khz.

E-Male
6th May 2004, 22:26
so the -config parameter makes that difference?

strange, but i'll try

SeeMoreDigital
6th May 2004, 23:46
Originally posted by E-Male
foobar also keeps the samplerate
so it must be hardcoded in besweet You can alter the sample rate in Foobar2000, if you go to: Settings | DSP Manager | ReSampler.

Cheers

E-Male
7th May 2004, 02:10
ok, i made a quick test:

and pogo stick was right:
without the config switch the 48khz stay

so i wanna apologize to dspguru and all besweet users for spreading wrong information, sorry guys'n'girls

so the way to encode 48khz aac with besweet would be:
1. start the encode with the config switch
2. set all your options and close the config dialoge
3. abort the encoding
4. restart encoding without teh config switch
(skip 1-3. if you wanna re-use the configuration of your last encode)

I'll change the first post and the topic again :)

@dspguru: just out of curiousity: why is the samplerate conversion autimaticly activated when the config switch is used?

E-Male
7th May 2004, 02:16
---------------FIRST POST EDITED---------------------again

pogo stick
7th May 2004, 05:34
Originally posted by E-Male
1. start the encode with the config switch
2. set all your options and close the config dialoge
3. abort the encoding
Also it is possible to configurate settings through registry.
But I guess it's better not to use settings that not suppose to work with config window.
See this thread (http://forum.doom9.org/showthread.php?threadid=74489).
Originally posted by E-Male
@dspguru: just out of curiousity: why is the samplerate conversion autimaticly activated when the config switch is used?
This situation with samplerate is little bit unclear to me too.
I was told that using Nero dlls in besweet resampling is a good thing.
But then why it is possible to encode at 48khz within Nero programs?
Ahead are updating there programs often. Maybe things have changed?
It would be very interesting to read opinions of people who knows about quality audio encoding.

DSPguru
7th May 2004, 08:50
Originally posted by E-Male
@dspguru: just out of curiousity: why is the samplerate conversion autimaticly activated when the config switch is used? all those decisions are made in bsn.dll.
again, i welcome any developer who has the time to catch up with nero's tricks, to release an updated dll.

relevant code is under the function BSN_Init:int BSN_Init(int* SampleRate, int ChannelsCount,char* OutFileName,int BitsPerSample,int ShowDialog,char* path,char** argv,int argc)
you have:/* init encoder */
sprintf(fullDestPath,OutFileName);
format.m_iSamplesPerSecond=*SampleRate;
format.m_iChannels=ChannelsCount;
format.m_iBitsPerSample=BitsPerSample;thenif (ShowDialog)
{
nRetCode = pIC->Configure(); asserT(nRetCode);
nRetCode = pAacIAC->Done(); asserT(nRetCode);
}and at the end format_in= pAacIAURW->GetRawFormat();*SampleRate=format_in.m_iSamplesPerSecond;
if the sample-rate value is updated in this process, BeSweet will resample to bsn's desired sample-rate.


about the registry entries mentioned in here (http://forum.doom9.org/showthread.php?threadid=74489),
it is also possible that bsn.dll would be configured via commandline, that, if someone implements a small module that reads the argv params and update the relevant registry values.

bond
7th May 2004, 09:45
Originally posted by pogo stick
If you use -bsn( -6chnew ) without -config then aac will be at 48khz.great info, thanks :)
btw it also works with stereo

E-Male
7th May 2004, 21:53
Originally posted by DSPguru if the sample-rate value is updated in this process, BeSweet will resample to bsn's desired sample-rate.
ah, so besweet only resamples in reaction to nero
thx for clarifiing this
sorry if my questions sounded disrespectfull in some way, that was not intended

Originally posted by DSPguru
again, i welcome any developer who has the time to catch up with nero's tricks, to release an updated dll.
i won't be any help there, i'm much to new to c++, not mentioning my total lack of knowledge of the inner-workings of audio processing, but:

Originally posted by DSPguru
about the registry entries mentioned in here (http://forum.doom9.org/showthread.php?threadid=74489),
it is also possible that bsn.dll would be configured via commandline, that, if someone implements a small module that reads the argv params and update the relevant registry values.
maybe i can get this done
i'll try

bond
10th May 2004, 18:19
to point something out: if the show dialog option isnt choosen besweet will never downsample, in that case it simply always encodes with 48khz
basically that way its also possible to encode at something like 32kbps with 48khz, which obviously doesnt make sense...

E-Male
10th May 2004, 19:21
possibilities are mever bad
the user is responsible for not doing something "which obviously doesnt make sense"

btw, i'm working on gettind teh source of bsn.dll to compile, without success i might add, so don't expect a commandlien version too soon

kilg0r3
27th May 2004, 09:26
Sorry people,

but I still have this resampling issue.
I am trying to convert a 5.1 Ac3 file to 5.1 LC-AAC. Why? Because space is not an issue but mp4 compatibility is. I know that foo bar can do this too but I need to assert a certain delay.

When I leave the "-config" switch in the command line, the result is downsampled to 44100. If I take it out the result is 48000 _and_ plays o.k.

The dll and executables in the besweet direfctory are all fresh btw.

Thanks in Advance