Log in

View Full Version : wavegain std-in and out


FuPP
24th May 2010, 23:11
Hi,

I need help about 'wavegain' (a utility that allows to add gain + hard limiting).

I actually need to batch some processing and that for i try to use std-in and std-out abilities of wavegain (1.2.8) ; I want 32 bits float processing without creating intermediate files

But without success... std-in and std-out seem to work but not together.


Here is my command line :

wavi myscript.avs - | wavegain -n -t -y -o - | lame --verbose -V5 --nsmsfix 1.0 - myfile.mp3

(myscript.avs contains a downmixing script borrowed to behappy, and which is ok if used alone)

and here is what I get :

Warning: unsupported audio format

This is from lame which is not happy about input (ie what is coming out from wavegain)

I do not know if it is related to my syntax. I have tried several things without success. Does anyone know if this is a bug or me ?


Thanks in advance,

FuPP

tebasuna51
25th May 2010, 00:04
Standard Lame encoder don't support 32 bits float.
Here you have a modified one: http://www.rarewares.org/mp3-lame-bundle.php

I don't know WaveGain but:
-n, --noclip NO Clipping Prevention.
-t, --limiter Apply 6dB Hard Limiter to output.
-y, --apply Calculates and APPLIES gain settings, and applies

maybe you can use the AviSynth Normalize() function.

FuPP
25th May 2010, 11:59
Thanks for answering. Lame encoder used was the 32 bit float input compatible one.

About normalize() : as you know adding gain with hard limiting is not the same than normalizing.

What I wanted to do was to add, let's say 12 dB gain with hard limiting. I did not managed to do exactly that with wavegain, but using automatic gain with hard limiting (disabling clip prevention) is ok. Except that I don't manage to make std out working properly...

If you know another way to add gain with hard limiting, using avisynth for instance, please let me know !

FuPP

tebasuna51
25th May 2010, 15:08
Yes, I don't like limiters because loss quality.

BTW, there are a limiter by Dimzon here http://forum.doom9.org/showthread.php?p=922027#post922027

Read the entire thread to see other method using sox filter.
Also last sox.exe can be used with pipe commands.

FuPP
25th May 2010, 15:24
Tebasuna, thanks a lot for that link.

I will do some testing this evening :).

FuPP

FuPP
25th May 2010, 23:37
First tests using amplifydb(12) + WavGainLimiter() gave me good results. I still have to test other algorithms provided inside dimzon's dll but I think I am close to the goal.

Thanks a lot Tebasuna. You have been (once more !) very useful to me :)

FuPP


Ps : hard limiting should not give "bad quality" if algo is ok. So, not sure why you said "I don't like limiters because loss quality". Of course this is far from a "lossless" process, but loss does not always mean bad quality. But maybe I did not get you ?