Log in

View Full Version : BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)


Pages : 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

tebasuna51
19th July 2006, 11:03
Aften support (not tested yet, please report)

Starting job Bueno.wav->Bueno_t2.ac3
Found Audio Stream
Channels=6, BitsPerSample=16, SampleRate=48000Hz
Aften.exe -v 0 -b 448 -m 1 -s 0 -cmix 1 -smix 2 -dsur 0 -dnorm 26 - "D:\Internet\AudioTest\aften\Bueno_t2.ac3"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Error: System.IO.IOException:
Bitrate must be: -b 448000

Edit: Valid values for bitrate only exact:
32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 Kb/s

dimzon
19th July 2006, 12:02
Starting job Bueno.wav->Bueno_t2.ac3
Found Audio Stream
Channels=6, BitsPerSample=16, SampleRate=48000Hz
Aften.exe -v 0 -b 448 -m 1 -s 0 -cmix 1 -smix 2 -dsur 0 -dnorm 26 - "D:\Internet\AudioTest\aften\Bueno_t2.ac3"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Error: System.IO.IOException:
Bitrate must be: -b 448000

Edit: Valid values for bitrate only exact:
32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 Kb/s
Ok, will be fixed tonight

marnix88
19th July 2006, 18:22
Is there a way to run BeHappy with commandline parameters or run FFmpeg with AviSynth without Behappy?

Don't get me wrong, Behappy does exacty what I need, but I'm creating a frontend for AVI to DVD and FFmpeg can't encode 5.1 channels correctly just by itself. If I have to use BeHappy to do the work, then it's going to take tons of 'SendKeys' to control it.

I thought I had figured it out with FFmpeg, but I don't. If I encode 5.1 channel 448kbps AC3 to 5.1 channel 384kbps AC3, then the center channel is moved to the front right channel.

What is BeHappy exactly doing to keep all the channels correct? I know it's using FFmpeg and AviSynth, but how is FFmpeg executed with the script to keep the channels in the correct place?

This is the AviSynth script Behappy gives me.

########################################
#Created by BeHappy v0.1.8.35345
#Creation timestamp: 19-7-2006 18:20:49
########################################
#Source FileName:D:\TestAudio.ac3
#Target FileName:D:\TestAudioEncoded.ac3
########################################

########################################
# [Source: NicAc3Source]
########################################
NicAc3Source("D:\TestAudio.ac3")

EnsureVBRMP3Sync() # Some black magic to avoid desync

########################################
# [Encoder: ffmpeg AC3 @ 384 kbps]
########################################
6==Audiochannels(last)?GetChannel(last,1,3,2,5,6,4):last

tebasuna51
19th July 2006, 19:58
What is BeHappy exactly doing to keep all the channels correct? I know it's using FFmpeg and AviSynth, but how is FFmpeg executed with the script to keep the channels in the correct place?
NicAc3Source("D:\TestAudio.ac3")
6==Audiochannels(last)?GetChannel(last,1,3,2,5,6,4):last
First line decode the ac3 to wav in correct wav order (L,R,C,LFE,SL,SR).

Last line, if there are 6 channels, re-order the channels from (L,R,C,LFE,SL,SR) to (L,C,R,SL,SR,LFE)

You can use Bepipe instead BeHappy with this command line:

Bepipe --script "NicAc3Source(^D:\TestAudio.ac3^).GetChannel(1,3,2,5,6,4)" | ffmpeg -i - -y -acodec ac3 -ab 384 "D:\TestAudioEncoded.ac3"
Or with new Aften encoder
Bepipe --script "NicAc3Source(^D:\TestAudio.ac3^)" | Aften -b 384000 - "D:\TestAudioEncoded.ac3"

marnix88
19th July 2006, 21:01
That works great!

Thank you very much, tebasuna51 :)

BigDid
22nd July 2006, 20:31
Error: System.IO.IOException:
Same for me here, waiting for an update :o
Dimzon, Thanks in advance.

Edit: Valid values for bitrate only exact:
32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 Kb/s
@Tebasuna
Valid values in what sense? Regarding Dolby specs? or non-compliant for soft players? SAP players?
I would like to DRC/Normalize AC3-6ch with a lower bitrate than original; ie: 352 or 288 ...actually limited to 320 or 256 with ffmpeg ...?
Thanks for the info.

Did

tebasuna51
22nd July 2006, 21:07
@BigDid, bitrate must be discrete values, see 5.4.1.4 frmsizecod and Table 5.18 at: ATSC Standard: Digital Audio Compression (AC-3), Revision A (http://www.dolby.com.cn/gb/assets/pdf/tech_library/a_52a.pdf)

Edit: Each ac3 frame (32 msec. if 48 KHz) must have a discrete value, the VBR method is obtained with different bitrate frames. This method is not well supported.

BigDid
22nd July 2006, 22:39
@BigDid, bitrate must be discrete values, see 5.4.1.4 frmsizecod and Table 5.18 at: ATSC Standard: Digital Audio Compression (AC-3), Revision A (http://www.dolby.com.cn/gb/assets/pdf/tech_library/a_52a.pdf)

So it's in the specs.

Edit: Each ac3 frame (32 msec. if 48 KHz) must have a discrete value, the VBR method is obtained with different bitrate frames. This method is not well supported.
I'll try to reformulate: Not being a "discrete value"(aka one one the supported bitrate from the specs) a Vbr resulting ac3 stream should not be well supported ...
Is it correct?
BTW I was speaking of CBR, not VBR but I suppose same conclusions applies.
Sorry to be dumb but I am not so... performant in audio matters :D
Thanks.

Did

Sakuya
26th July 2006, 03:38
I was wondering if anyone has achieved good results when converting from 6ch AAC to 6ch AC3 using BeHappy?

I converted my AAC file to a 6ch WAV file using audio2wav. Right now, I'm pondering whether I should add BeHappy's Digital Signal Processing. If I keep to the original, it won't change a thing and directly convert that to AC3 am I right?

tebasuna51
26th July 2006, 12:35
I was wondering if anyone has achieved good results when converting from 6ch AAC to 6ch AC3 using BeHappy?
Without problems using DirectShowSource and ffdshow Audio decoder properly configured.
I converted my AAC file to a 6ch WAV file using audio2wav. Right now, I'm pondering whether I should add BeHappy's Digital Signal Processing. If I keep to the original, it won't change a thing and directly convert that to AC3 am I right?
I don't understand your question.
If you use faad decoder (audio2wav) the 6ch wav (with WAVE_FORMAT_EXTENSIBLE header) can be converted directly to ac3 with Aften encoder.
If you want open the 6ch wav in BeHappy you need BassAudio
because WAVE_FORMAT_EXTENSIBLE header.

alwa
26th July 2006, 20:29
I don't understand your question.
I guess Sakuya wanted to know, whether there are disadvantages of BeHappy(Avisynth) instead of audio2wav(WAV) as source for the encoder(e.g. Aften).
Guessed answer :D : You are rigth, there should be no differences!

raquete
27th July 2006, 14:24
@ dimzon

why Aften adjust max 448K and not 640K?

thanks.

tebasuna51
28th July 2006, 12:14
@Dimzon
At http://www.un4seen.com/bass.html there are a new Bass version 2.3, but don't work with your BassAudio.dll for v2.2.

There are also info to upgrade from 2.2. Maybe is only:
"BASS_MusicGetName
This function is replaced by BASS_ChannelGetTags"
and is enough compile this new bassAudio.cpp (http://www.mytempdir.com/831665)

Thanks.

thuongshoo
30th July 2006, 09:24
Hi ! For nearly day, I can't convert files into mp4/AAC .
I use newest version of Behappy. All versions on my computer say like that. I also re-install .NET frame work but the bug is the same . I copied command line and run in cmd, the bug is the same . If I dont' use -rawpcm option, enc_aacplus work
Starting job [Star News]Shoo@ShowbizExtra(ArirangTV20060409)=bcnsmy=_audio.wav->[Star News]Shoo@ShowbizExtra(ArirangTV20060409)=bcnsmy=_audio.m4a
Found Audio Stream
Channels=2, BitsPerSample=16, SampleRate=48000Hz
enc_aacPlus.exe - "E:\[Star News]Shoo@ShowbizExtra(ArirangTV20060409)=bcnsmy=_audio.m4a" --rawpcm 48000 2 16 --mp4box --cbr 64000
Writing PCM data to encoder's StdIn
Finalizing encoder
Error: System.ApplicationException: Abnormal encoder termination 1
at BeHappy.Encoder.encode()
#### Encoder StdOut ####
Error - 2 input names specified, please check usage
********************************************************************
* AACPlus v2 Encoder (using Winamp 5.2 enc_aacplus.dll)
* Source timestamp Mon May 15 17:24:26 2006
* Build May 15 2006, 17:24:35
********************************************************************
* NOTE! enc_aacplus.dll must be into executable directory
* get it from Winamp 5.2 plugins directory
* tested on Winamp 5.2 Release Feb 23 2006 Full (Not Pro) version)
********************************************************************
Input file: -
Output file: E:\[Star News]Shoo@ShowbizExtra(ArirangTV20060409)=bcnsmy=_audio.m4a
SampleRate: 48000
ChannelCount: 2
BitsPerSample: 16
Bitrate: 64000
ChannelMode: Stereo
Encoder: aacPlus v2 (HE-AAC+PS)
Creating MP4...Can't create MP4!

buzzqw
30th July 2006, 13:49
just a suggestion try removing @,[,] from name

BHH

thuongshoo
1st August 2006, 08:35
I'm sorry ! above information isn't correct. aac_encplus don't work when I use --mp4box . --rawpcm still work
just a suggestion try removing @,[,] from name thanks ! I will try to do this

thuongshoo
1st August 2006, 15:38
NO !
Starting job da-sua_audio.ac3->da-sua_audio.m4a
Found Audio Stream
Channels=2, BitsPerSample=16, SampleRate=48000Hz
enc_aacPlus.exe - "E:\da-sua_audio.m4a" --rawpcm 48000 2 16 --mp4box --cbr 90675
Writing PCM data to encoder's StdIn
Finalizing encoder
Error: System.ApplicationException: Abnormal encoder termination 1
at BeHappy.Encoder.encode()
#### Encoder StdOut ####
Error - 2 input names specified, please check usage
********************************************************************
* AACPlus v2 Encoder (using Winamp 5.2 enc_aacplus.dll)
* Source timestamp Mon May 15 17:24:26 2006
* Build May 15 2006, 17:24:35
********************************************************************
* NOTE! enc_aacplus.dll must be into executable directory
* get it from Winamp 5.2 plugins directory
* tested on Winamp 5.2 Release Feb 23 2006 Full (Not Pro) version)
********************************************************************
Input file: -
Output file: E:\da-sua_audio.m4a
SampleRate: 48000
ChannelCount: 2
BitsPerSample: 16
Bitrate: 90675
ChannelMode: Stereo
Encoder: aacPlus v2 (HE-AAC+PS)
Creating MP4...Can't create MP4!


C:\Program Files\BeLight\behappy>enc_aacPlus.exe - "E:\da-sua_audio.m4a" --rawpc
m 48000 2 16 --mp4box --cbr 90675
********************************************************************
* AACPlus v2 Encoder (using Winamp 5.2 enc_aacplus.dll)
* Source timestamp Mon May 15 17:24:26 2006
* Build May 15 2006, 17:24:35
********************************************************************
* NOTE! enc_aacplus.dll must be into executable directory
* get it from Winamp 5.2 plugins directory
* tested on Winamp 5.2 Release Feb 23 2006 Full (Not Pro) version)
********************************************************************
Input file: -
Output file: E:\da-sua_audio.m4a
SampleRate: 48000
ChannelCount: 2
BitsPerSample: 16
Bitrate: 90675
ChannelMode: Stereo
Encoder: aacPlus v2 (HE-AAC+PS)
Creating MP4...Error - 2 input names specified, please check usage
Can't create MP4!

C:\Program Files\BeLight\behappy>enc_aacPlus.exe "E:\da-sua_audio.dat" e:\out.m
4a --rawpcm 48000 2 16 --mp4box --cbr 90675
********************************************************************
* AACPlus v2 Encoder (using Winamp 5.2 enc_aacplus.dll)
* Source timestamp Mon May 15 17:24:26 2006
* Build May 15 2006, 17:24:35
********************************************************************
* NOTE! enc_aacplus.dll must be into executable directory
* get it from Winamp 5.2 plugins directory
* tested on Winamp 5.2 Release Feb 23 2006 Full (Not Pro) version)
********************************************************************
Input file: E:\da-sua_audio.dat
Output file: e:\out.m4a
SampleRate: 48000
ChannelCount: 2
BitsPerSample: 16
Bitrate: 90675
ChannelMode: Stereo
Encoder: aacPlus v2 (HE-AAC+PS)
Creating MP4...Error - 2 input names specified, please check usage
Can't create MP4!

C:\Program Files\BeLight\behappy>enc_aacPlus.exe "E:\da-sua_audio.dat" e:\out.m
4a --rawpcm 48000 2 16 --cbr 90675
********************************************************************
* AACPlus v2 Encoder (using Winamp 5.2 enc_aacplus.dll)
* Source timestamp Mon May 15 17:24:26 2006
* Build May 15 2006, 17:24:35
********************************************************************
* NOTE! enc_aacplus.dll must be into executable directory
* get it from Winamp 5.2 plugins directory
* tested on Winamp 5.2 Release Feb 23 2006 Full (Not Pro) version)
********************************************************************
Input file: E:\da-sua_audio.dat
Output file: e:\out.m4a
SampleRate: 48000
ChannelCount: 2
BitsPerSample: 16
Bitrate: 90675
ChannelMode: Stereo
Encoder: aacPlus v2 (HE-AAC+PS)
Done

C:\Program Files\BeLight\behappy>

BigDid
1st August 2006, 17:25
Hello,

@Dimzon

Any news for the Aften interface fix?

http://forum.doom9.org/showthread.php?p=853494#post853494
http://forum.doom9.org/showthread.php?p=854674#post854674
http://forum.doom9.org/showthread.php?p=853509#post853509
:thanks:

Did

dimzon
1st August 2006, 18:27
Hello,

@Dimzon

Any news for the Aften interface fix?

http://forum.doom9.org/showthread.php?p=853494#post853494
http://forum.doom9.org/showthread.php?p=854674#post854674
http://forum.doom9.org/showthread.php?p=853509#post853509
:thanks:

Did
I'm sorry, I'm too busy IRL

Score Report Authentication
The Pearson VUE Testing System recorded the following information for this score report.
Exam Date: Friday, July 28, 2006 at 4:00 PM
Candidate: DMITRY ALEXANDROV
Candidate ID: 3715915
Registration #: 216581226
Exam Series: 070-536
Exam: TS: Microsoft® .NET Framework 2.0 - Application Development Foundation
Validation #: 642490061
Grade: pass
:p

BigDid
4th August 2006, 20:53
I'm sorry, I'm too busy IRL...
:p
Hi Dimzon,

Nevermind, work and money is always good to have; maybe jruggle will change it in aften.

Did

tebasuna51
6th August 2006, 00:33
@Dimzon, I know you are bussy, but one more thing for your todo list.

Detected in aften thread, seems NicAc3Source abort decoding ac3 44.1 KHz streams. The problem is in ReadFrame() function in m2audio_ac3.cpp:
...
// Check if the frame has proper length and BSI
if ((Length != FrameLength) || (_Flags != Flags) || (_Samplerate != Samplerate))
// Fatal error, unable to continue decoding
return false;
...
Ac3 44.1 KHz streams have two valids FrameLengths and abort when a frame with the second length arrive. Maybe we can replace the ReadFrame() function with this:
// Reads the next frame from the stream and decodes it into the framebuffer
bool m2AudioAC3Source::ReadFrame() {
int Sync; // synch info
int Length; // length of the current frame
int _Flags, _Samplerate, _Bitrate; // bit stream information
int BytesRead; // needed if last frame < previous frame

// Read next frame from stream
BytesRead = vfread(Stream, Frame, FrameLength);
Length = a52_syncinfo(Frame, &_Flags, &_Samplerate, &_Bitrate); // Get frame information

while (!Length) { // Check if we need synchronization
vfseek(Stream, 1 - FrameLength, SEEK_CUR); // Seek back in the stream
Length = FrameLength; // Try synchronization
Sync = Synchronize(Length, _Flags, _Samplerate, _Bitrate);

// Serious damage in the stream, mute frame
if (!Sync || Sync < 0) {
EmptyFrame(); // Mute frame
return true;
}

// Read frame
BytesRead = vfread(Stream, Frame, FrameLength);
Length = a52_syncinfo(Frame, &_Flags, &_Samplerate, &_Bitrate); // Get frame information
}

// Check if the frame have same length than previous
if (FrameLength != Length) {
vfseek(Stream, 0 - FrameLength, SEEK_CUR); // Go back in the stream
FrameLength = Length;
BytesRead = vfread(Stream, Frame, FrameLength); // And read the correct FrameLength
}

if (BytesRead != FrameLength) {
EmptyFrame(); // Error at the end of the stream, mute frame
return true;
}
// Check if the frame has proper BSI. With ac3 VBR, bitrate can be different
if ((_Bitrate != Bitrate) || (_Flags != Flags) || (_Samplerate != Samplerate)) {
EmptyFrame(); // Error but may be is better to continue, mute frame
return true;
}
// return false; // Fatal error, unable to continue decoding ***EDITED***

// Decode frame
if (!DecodeFrame()) EmptyFrame();
return true;
}
Thanks.

Edit: Continue decoding instead abort when a invalid frame is detected. See this post (http://forum.doom9.org/showthread.php?t=114968)

thuongshoo
7th August 2006, 11:40
oh ! my bug ? I can't use Behappy longer ! Mu computer doesn't support 8.3 file name. Is this a reason ?

dimzon
7th August 2006, 15:39
oh ! my bug ? I can't use Behappy longer ! Mu computer doesn't support 8.3 file name. Is this a reason ?
Yes! This is 100% reason - I'm converting path's to 8.3 format when calling mp4box to wrap AAC into MP4 container
So just possible solution in your case is
Place BeHappy in 8.3 compaible folder (for example c:\BeHappy)
Use short target filenames (for example audio.aac)
Place temp folder to 8.3 compatible (for example c:\temp)

thuongshoo
8th August 2006, 16:02
I rarely run old game so supporting 8.3 filename will cause my computer is slow .
dimzon ! Do you have any method to avoid this bug although that computer doesn't support 8.3 filename :D

koz
8th August 2006, 19:06
Hi,
First may I congratulate the author(s) for a great set of tools.

I managed to get Behappy to do what I needed - convert an MP3 file to the AACplus M4A format

But I need to get this done via the command line.

My attempts at using BePipe.exe dont seem to have it quite right:

Here's what I'm trying:

BePipe.exe --script "import(^mymp3.avs^)" | enc_aacPlus.exe blugg.m4a --cbr 24000 --mp4box

THough i feel I need to specify the name of the interim .wav file

mymp3.avs contains:

########################################
#Created by BeHappy v0.1.9.5241
#Creation timestamp: 25/07/2006 16:00:20
########################################
#Source FileName:C:\Documents and Settings\ME\My Documents\TEST\mymp3.mp3
#Target FileName:C:\Documents and Settings\ME\My Documents\TEST\mym4a.m4a
########################################

########################################
# [Source: NicMPG123Source]
########################################
NicMPG123Source("C:\Documents and Settings\ME\My Documents\TEST\mymp3.mp3")

EnsureVBRMP3Sync() # Some black magic to avoid desync

########################################
# [Encoder: CT aacPlus v2, CBR @ 24.32 kbit/s, Joint Stereo]
########################################


Should this be edited to add the next M4a stage from enc_aacPlus.exe

Any help or pointers with this would be hugely appreciated.

Thanks
Koz

koz
8th August 2006, 19:39
OK _ I;m going to answer my own question

Here's what worked _ To convert an MP3 file to M4A using BePipe

BePipe.exe --script "import(^mymp3.avs^)" | enc_aacPlus.exe - "mym4a.m4a" --rawpcm 44100 1 16 --mp4box --cbr 24320


BUT - I really need to get the MP3 ID3 tags and insert the Meta data into the M4A file.

Can enc_aacPlus.exe do this? - Notably Title, Description and Genre fields

many thanks :) Koz
:thanks:

tebasuna51
8th August 2006, 20:25
Here's what worked _ To convert an MP3 file to M4A using BePipe

BePipe.exe --script "import(^mymp3.avs^)" | enc_aacPlus.exe - "mym4a.m4a" --rawpcm 44100 1 16 --mp4box --cbr 24320
Bepipe send wav header and PCM data, then enc_aacPlus can produce a initial click because the header is treated like rawpcm.
BUT - I really need to get the MP3 ID3 tags and insert the Meta data into the M4A file.

Can enc_aacPlus.exe do this? - Notably Title, Description and Genre fields
Enc_aacPlus can't do this job.

koz
8th August 2006, 20:40
Thanks for the reply tebasuna51.

I found an app called neroAacTag.exe which does the job I needed, so I created a .bat file to handle the whole process, which seems to work fine:

Here it is:

BePipe.exe --script "import(^mymp3.avs^)" | enc_aacPlus.exe - "mym4a.m4a" --rawpcm 44100 1 16 --mp4box --cbr 24000

neroAacTag.exe mym4a.m4a -meta:artist="Koz" -meta:genre="Podcast" -meta:title="Kozcast #26" -meta:comment="A test by Koz which got converted to M4a using the excellent BeHappy"
pause
exit


Running this worked fine (then asked for a keypress beofre exiting)


Is it possible to create a commercial system using these tools?

thx
koz

dimzon
9th August 2006, 09:37
Is it possible to create a commercial system using these tools?
No! It's prohibited by
1) Nero licence
2) WinAmp license

MacAddict
11th August 2006, 16:00
Great program! Thx for your efforts.

Any chance of also having BeHappy set to 'low priority' like the encoders get set? The option would be nice nut not a necessity :-)

fight2win
15th August 2006, 17:42
for encoding ac3 to aac via megui, where ac3 is 192 kbps ac3 (cantonese original mono), should i go for keep original channels or convert to mono? i use force decoding via dshow, and in ac3filter, "AS Is" decoding...

shon3i
15th August 2006, 21:18
Just leave is as, but after encoding see what happens, is file real mono or is upmixed to stereo.

fight2win
16th August 2006, 12:31
please tell us proper way of encoding ac3/dts to aac, in which proper gain/volumes and all other effects are properly maintained, please...:confused:

Doom9
17th August 2006, 12:12
@dimzon: looking at people reporting low audio in megui I decided to have a look at the avisynthaudioencoder and compare it with what the trusty old besweet does.
I found the following differences:
besweet performs DRC. We now have DRC in nicaudio as well so I think it makes sense to use it.
besweet uses gain (be it hybrid or postgain, depending on the audio format), whereas the increase volume option in megui is a 100% normalization. I suspect we'd get better results by analyzing the samples read during the first pass, and compute a DB gain, then write a new script with the amplifydb command in it.
Do you think that's doable?

dimzon
17th August 2006, 12:20
I suspect we'd get better results by analyzing the samples read during the first pass, and compute a DB gain, then write a new script with the amplifydb command in it.

I believe Normalize()=="analyzing the samples read during the first pass, and compute a DB gain, then write a new script with the amplifydb command in it"

Actually I think we need to write Yet another Avisynth filter to perform non-linear DRC (like besweet's DSPguru/Ligh/Tera)

add:
this is sample http://www.ligh.de/software/booster.zip

shon3i
17th August 2006, 12:34
No we need only some scaner like aacgain or avsamp or foobar replay gain who will preformed RG over aac, aslo we can simulate HybridGain using first normalize than RG.

dimzon
17th August 2006, 12:39
No we need only some scaner like aacgain or avsamp or foobar replay gain who will preformed RG over aac, aslo we can simulate HybridGain using first normalize than RG.
Sorry, I really don't understand you!
AFAIK Normalize perform scan and compute Max peak value at first pass. Than it compute amplification factor as (factor * AbsoluteMax/FoundMax) and perform amplification on second pass...

shon3i
17th August 2006, 12:45
Sorry, I really don't understand you!
AFAIK Normalize perform scan and compute Max peak value at first pass. Than it compute amplification factor as (factor * AbsoluteMax/FoundMax) and perform amplification on second pass...
Just you need scaner like from foobar's ReplayGain or something like HybridGain from BeSweet, or little small app called aacgain (http://www.rarewares.org/files/aac/aacgain_1_5.zip) which preform RG over aac but have same scaner like foobar (find's same db and than amplyfy it but works only with stereo).

Doom9
17th August 2006, 13:11
Actually, Hybridgain does the following: apply a 10dB gain at the input, encode while finding the maximum possible gain, then apply that gain as postgain after encoding.
If normalize was the same as finding and applying the maximum gain , why are the results so different in between using besweet vs behappy?

tebasuna51
17th August 2006, 13:32
@dimzon: looking at people reporting low audio in megui I decided to have a look at the avisynthaudioencoder
I think, like Kurtnoise (http://forum.doom9.org/showthread.php?p=864124#post864124), is a player problem not with encoder.
and compare it with what the trusty old besweet does.
I found the following differences:
besweet performs DRC.
We now have DRC in nicaudio as well so I think it makes sense to use it.
Of course must be a option use/not use DRC.
Boost (non-linear DRC) can be a option, but I never recommend use boost transcoding ac3 -> aac.
besweet uses gain (be it hybrid or postgain, depending on the audio format), whereas the increase volume option in megui is a 100% normalization. I suspect we'd get better results by analyzing the samples read during the first pass, and compute a DB gain, then write a new script with the amplifydb command in it.
Do you think that's doable?
AviSynth Normalize do this job (a first pass to compute a DB gain and a second pass to apply)

@shon3i ReplayGain don't work properly with ac3 5.1 like I say in this post (http://forum.doom9.org/showthread.php?p=864220#post864220)

I make many test with AviSynth Normalize and never the aac output volume is less than ac3 input volume.

shon3i
17th August 2006, 13:42
@shon3i ReplayGain don't work properly with ac3 5.1 like I say in this post

I make many test with AviSynth Normalize and never the aac output volume is less than ac3 input volume.That is true but when i play for example DVD via PowerDVD or other DVD players ac3 is more louder like is aac after this RG, aslo AutoGordianKnot use some Normalize over mp3 which generate very loud files, like besweet after HybridGain. Somebody told me that aac can't be used with HybridGain because aac don't have RG or post gain, both CT and Nero devs are negate that.

in this case RG works very good.

dimzon
17th August 2006, 16:01
That is true but when i play for example DVD via PowerDVD or other DVD players ac3 is more louder
Maybe You have Boost (non-linear DRC) option activated? Sometimes this option has some "brand" name like "Night mode" etc

tebasuna51
17th August 2006, 16:47
That is true but when i play for example DVD via PowerDVD or other DVD players ac3 is more louder like is aac after this RG,
This is a player problem, and can affect to many people but not to everybody. If I play ac3 with Ac3Filter configured to amplify the signal +20 dB of course I play the ac3 more loud.
aslo AutoGordianKnot use some Normalize over mp3 which generate very loud files, like besweet after HybridGain. Somebody told me that aac can't be used with HybridGain because aac don't have RG or post gain, both CT and Nero devs are negate that.
HybridGain is developed to prevent clips in encoder phase: if source is 100% (0 dB) normalized (PreGain), some samples can be encoded over 100% (a good encoder can't do this, but may exists < +2dB).
Then HybridGain is a PreGain limited (< 100%), and after a PostGain to reach the 100% (or less) in formats than accept this.

PreGain 100% is equal to HybridGain +- 2 dB, then HybridGain is more accurate than PreGain/Normalize but don't justify any volume difference. And any difference can't be previewed before the encode phase (with RG over the ac3 input)

dimzon
17th August 2006, 16:52
If I play ac3 with Ac3Filter configured to amplify the signal +20 dB
It mean You have (AmplifyDb(20) + Limiter)==Boost(Non-Linear DRC)

shon3i
17th August 2006, 16:56
If I play ac3 with Ac3Filter configured to amplify the signal +20 dB of course I play the ac3 more loud.
Yes but my ac3 filter version 1.01 plays ac3 like PowerDVD 5/6/7, settings are default, which means ac3 something about +10db louder

@all can somebody check aacgain/avsamp (AviSynth ampifler) metod because works same as RG from foobar.

tebasuna51
17th August 2006, 17:07
It mean You have (AmplifyDb(20) + Limiter)==Boost(Non-Linear DRC)
Nope. Is only a example.

Don't worry (be happy) with this problem. Is not a encoder problem, forget boost, non-linear DRC, ...

We need an aac 5.1 decoder, a new Bepipe (without header errors like first BeHappy) before than boost.

dimzon
17th August 2006, 17:18
We need an aac 5.1 decoder, a new Bepipe (without header errors like first BeHappy) before than boost.
Hmmm...
Why not just use DShow to decode 5.1 AAC? Actually I never transcode FROM AAC IRL...
Why do You need bePipe? Do you want to write batches?

shon3i
17th August 2006, 17:37
Why not just use DShow to decode 5.1 AAC? Actually I never transcode FROM AAC IRL...Me too, but for ppl's who want back aac->ac3 or something else aac conversations will be usefull, for example i have stereo speakers and in decoder is set to dominix, so i must always disable that when i want transcode.

before than boost.We not need boost, we need better first pass scener

tebasuna51
17th August 2006, 18:08
Hmmm...
Why not just use DShow to decode 5.1 AAC? Actually I never transcode FROM AAC IRL...
I can use DShow (I need change player settings with encoder settings and after turn to player settings), but I can't say to other people how to make that, because I don't know their DShow configuration.
You don't have problems with MEGUI DShow input?
Why do You need bePipe? Do you want to write batches?
Yeah... I like batches, not GUI's:)

tebasuna51
17th August 2006, 18:17
We not need boost, we need better first pass scener
Scanner, I suppose.
shon3i, really Normalize work fine. :)