Log in

View Full Version : what sox effects should i use??


jamesN
30th August 2011, 19:23
Hey everybody. . .
I have a lot of mp4 files whose audio is low(the mp4 files were recorded from DVB and converted), when I apply gain it distorts, if i normalize the volume is still too low.
I found some of my mp4 files on a site and downloaded one of them, I found that its audio is high with no distortion.
I tried several sox effects to make my audio look like the audio on the site but with no success.
I uploaded a .zip file (http://www.mediafire.com/?1ni3u6i88on9ncc) that contains 2 sample sounds:

sound1 is from the DVB(the low-volume one)
sound2 is from the site(the high-volume one)

so, please what sox effects should be applied to the first sound to make its volume like the second?

any help appreciated

P.S.:

I encoded the sounds using neroaacenc to make their sizes as small as possible.
I am using sox because I have lot of mp4 video files to process. So, it is faster to do the processing from a batch file, and sox is a very good command-line utility to do the processing. If you advise me to use another program make sure it has a CLI version.

tebasuna51
31st August 2011, 12:32
You can Normalize your first sound (300% gain, third column) and then the RMS values is only the half than second sound.
Wavosaur statistics and informations
Sample name: sound1.mp4_.wav sound2.mp4_.wav sound1_normalize.wav
Statistics: ------------------- ------------------- --------------------
RMS power L: 2.77% (-31.16 dB) 13.92% (-17.12 dB) 6.98% (-23.12 dB)
RMS power R: 2.76% (-31.17 dB) 14.42% (-16.82 dB) 6.98% (-23.13 dB)
Min value L: -39.65% (-8.04 dB) -100.0% (0.00 dB) -78.12% (-2.14 dB)
Min value R: -38.92% (-8.20 dB) -100.0% (0.00 dB) -78.30% (-2.13 dB)
Max value L: 30.97% (-10.18 dB) 100.00% (0.00 dB) 100.00% (0.00 dB)
Max value R: 31.04% (-10.16 dB) 100.00% (0.00 dB) 98.17% (-0.16 dB)

If you use Normalize you have the max gain without distort, you can't convert sound1 to sound2 without any kind of distort.

Bigger volume isn't best quality, you can read here:
http://en.wikipedia.org/wiki/Loudness_war

BTW, you need the sox effect compand to do your job.

jamesN
31st August 2011, 18:42
but I know that sound2 was produced from sound1 using some utility then uploaded to the site!!
would you please provide me with the entire command-line for sox to use compand then normalize?
thanks for your effort. . .

tebasuna51
1st September 2011, 07:54
I can't know the exact parameters to use and I don't recommend the method.
Experiment yourself.

jamesN
1st September 2011, 20:36
thanks. . .
I read that compand effect compresses dynamic range, so do I have to apply compand effect then normalize on the same effects chain??

tebasuna51
1st September 2011, 21:28
Like soxeffect.pdf say:
"Multiple effects may be applied by specifying them one after another at the end of the SoX command line."
Then use the 'compand' effect and after the 'norm' in the same command line.

jamesN
3rd September 2011, 18:28
unfortunately,I can't understand the compand effect. . .
does 0dB mean the highest digital volume?
and what compression settings should I use in your opinion?
thanks for your help. . .

tebasuna51
3rd September 2011, 19:25
From soxeffect.pdf:
"The following example might be used to makeapiece of music with both quiet and loud passages
suitable for listening to in a noisy environment such as a moving vehicle:

sox asz.au asz-car.au compand 0.3,1 6:-70,-60,-20 -5 -90 0.2

The transfer function (‘6:−70,...’) says that very soft sounds (below−70dB) will remain
unchanged. This will stop the compander from boosting the volume on ‘silent’ passages such as
between movements. However, sounds in the range −60dB to 0dB (maximum volume) will be
boosted so that the 60dB dynamic range of the original music will be compressed 3-to-1 into a
20dB range, which is wide enough to enjoythe music but narrowenough to get around the road
noise. The ‘6:’ selects 6dB soft-knee companding. The −5 (dB) output gain is needed to avoid
clipping (the number is inexact, and was derivedbyexperimentation). The −90 (dB) for the initial
volume will work fine for a clip that starts with near silence, and the delay of 0.2(seconds) has the
effect of causing the compander to react a bit more quickly to sudden volume changes."

Try with:
sox sound1.wav soundX.wav compand 0.3,1 6:-70,-60,-20 -5 -90 0.2