INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Search all forums or this forum: Advanced search
Mini How To - Increase Your AC3 Volume

Forum Index -> Video -> Audio Printer-friendly version
Goto page 1, 2, 3, 4  Next
Reply to topic
Author Message
Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Dec 29, 2006 05:19 Posts Comp View users profile Send private message Reply with quote

Threw together a soopa simple toolkit to address some of the low volume/low dialogue issues with transcoded AC3 files. Designed for neophytes, but can easily be customized by reading the documentation(s).

Features

-Converts your 5.1 file to another 5.1 file - No channel downmixing
-NOT lossless, but the transcoding quality is quite superior sounding
-Uses the new Aften AC3 encoder with SSE performance enhancements
-Uses the Wavegain limiter algo for additional volume and dynamic range reduction
-Simple 1 click batch file operation
-Doesn't Require Temporary WAV file creation


Example

in-example.ac3
out-example.ac3

Requirements

Avisynth v2.57 or Higher

Instructions

1) Download the AC3GAIN.ZIP file. Unzip to its own folder

ac3gainv4.zip

2) Drag Your AC3 files into the same folder as the AC3GAIN files


3) Double click on Run_AC3gain.bat to start

* Depending on the amount of dynamic range compression you desire, you can choose any of the .BAT files, from 1.5 to 2.5. The higher the number, the louder and more compressed sounding the output file will be.

* The transcoding process might seem to lag in the beginning. It'll be stuck on 0% for the first few minutes, depending on the size of the AC3 - That's mostly due to Avisynth analyzing the file for volume peaks before applying DRC. It is still amazingly fast when Aften begins to transcode.

4) Completed file will be (384kbps, 48000Hz)


Last edited by Soopafresh on Mar 14, 2008 16:49, edited 11 times in total


Squash
Member


Joined: 27 Aug 2006
Location: United States

Post Posted: Dec 29, 2006 20:48 Posts Comp View users profile Send private message Reply with quote

Soopafresh:

I just tried your toolkit and it worked great. I had started watching an Xvid avi (with 5.1 ac3) on my TV from my DVD player and had to crank the volume setting on my TV up to about 60 to hear it well (I usually run it at about 30 to 35 with an ac3 file, or low 20s with regular TV) so I figured I'd give your solution a shot. No problems at all; took about 7 or 8 minutes to boost the audio for a 1 hour 45 minute movie. After that I could hear it fine at a setting of 35 on my TV. Audio quality was not noticeably degraded, in fact it seemed I could make out speech more clearly than before. Maybe there's better dialnorm with your process (or maybe it's my imagination, but I don't think so).

I guess the old ac3enc encoder with the low-volume problem is still floating around out there; the movie I was watching was a recent release.

This would be very useful for those folks who have low audio problems on when authoring DVDs to run their audio through your process beforehand.

Thank you for your work on this, I'm sure I'll be using it again.


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Dec 30, 2006 07:55 Posts Comp View users profile Send private message Reply with quote

Great to hear. Thanks for your kind words smile.gif

Athenian
Member


Joined: 26 Nov 2006
Location: United States

Post Posted: Dec 31, 2006 12:59 Posts Comp View users profile Send private message Reply with quote

Hi,

I'm a complete beginner at this. I came to the forum to ask about the low volume I'm getting in disks output from DVDLab.

My music is on a CD so I used Windows Media Player to rip a WAV file then used FFMPEGGUI to generate an AC3 file. When I used your utility the AC3 file doubled in size; is that normal?

Thank you.


mazinz
Killer Pirate


Joined: 21 Jul 2001
Location: NY

Post Posted: Dec 31, 2006 13:54 Posts View users profile Send private message Reply with quote

Hey Soopafresh
can you re-upload your files? After it tells me to click the link it then tells me the page cannot be found


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Dec 31, 2006 16:30 Posts Comp View users profile Send private message Reply with quote

Athenian - You don't need this app for your purpose. The preferred method for you would be to run WAVgain http://members.home.nl/w.speek/wavegain.htm in album mode on your CD audio .WAV files BEFORE you convert them to AC3.

Another automated method for you would be to download Normalize http://savannah.nongnu.org/download/normalize/normalize-0.7.7-win32.zip

Code:
normalize -l 0 --peak -v "yourrippedCD.wav"

aften.exe -v 0 -b 192 -dynrng 2 "yourrippedCD.wav"  output.ac3


Note - The commands above aren't considered an optimal method for music, as it does modify the dynamic range quite a bit. You'll have to test it. Soft parts of the music might sound too loud. Then again, it might work well for your purpose. Experiment. smile.gif


BTW -The reason your files are twice the size is because your original files are probably encoded at 192kbs.

To change bitrate in Aften, modify the following in Run_AC3gain.bat

from

bepipe.exe --script "import(^ac3gain.avs^)" - | aften.exe -v 0 -b 384 -dynrng 1 - output.ac3

to

bepipe.exe --script "import(^ac3gain.avs^)" - | aften.exe -v 0 -b 192 -dynrng 1 - output.ac3





mazinz - both sites seem to be working for me, but here you go:

http://www.bestsharing.com/files/xnaecfL196434/AC3GAIN.zip.html


mazinz
Killer Pirate


Joined: 21 Jul 2001
Location: NY

Post Posted: Dec 31, 2006 18:10 Posts View users profile Send private message Reply with quote

thanks again, the newer url you gave worked fine

Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 17, 2007 16:29 Posts Comp View users profile Send private message Reply with quote

Update - Updated Aften encoder to latest version. New download link in first post.

Tigerix
Member


Joined: 16 Mar 2007
Location: Germany

Post Posted: Mar 16, 2007 07:49 Posts Comp View users profile Send private message Reply with quote

Hi Soopafresh,

just found this howto while I was searching for a method/tool to increase the volume of an AC3-Track. Seems to be really usefull, but unfortunately I dont get it working the way it should be.

Converting the input.ac3 into the output.ac3 works well and generates a file of the size: 2,7Mb.
But when I am converting my file, which is 466,5Mb the resulting file is only 63Mb.
What am I doing wrong?

Help appreciated. Thanks in advance.
Tigerix.


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 16, 2007 08:00 Posts Comp View users profile Send private message Reply with quote

Your AC3 might have errors in it which will cause the conversion to stop. You can use apps like AC3fix , Delaycut, etc to fix the file. Test that out as an option. If you are converting an AC3 that has commercials, your tracks might be going 5.1----->2.0------>5.1.


See if the conversion stops at the same place.


Tigerix
Member


Joined: 16 Mar 2007
Location: Germany

Post Posted: Mar 16, 2007 09:07 Posts Comp View users profile Send private message Reply with quote

Hi Soopafresh,

thanks very much for your instant answer!

Your tip leaded me in the right direction.
delaycut recognized 1 broken frame. I fixed it with ac3fix and now delaycut shows me 0 errors in the log. But AC3Gain stops writing to the file at 15%. The progress meter wents on till 100% but the file size doesnt grow anymore. So nothing more than 15% of the file gets written...
Is there any other tool which can fix the ac3 file?
Or is there a way to tell AC3Gain to continue writing?


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 16, 2007 12:16 Posts Comp View users profile Send private message Reply with quote

Try this version. Make sure your file is named input.ac3



ac3gainv2.rar


Tigerix
Member


Joined: 16 Mar 2007
Location: Germany

Post Posted: Mar 16, 2007 13:44 Posts Comp View users profile Send private message Reply with quote

Thanks for the new version. Unfortunately the problem persists sad.gif

Maybe, I should mention that the aften.exe you provide in both of your packs are crashing here. (I am using an Athlon XP). So I simply used another aften-binary which is not crashing, which I downloaded here: http://kurtnoise.free.fr/index.php?dir=Aften/


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 16, 2007 15:10 Posts Comp View users profile Send private message Reply with quote

It is probably CPU instruction set specific.

You other choice - Install Foobar 2000 with the AC3 Input Plugin then transcode to AC3 (aften)







components.rar


Tigerix
Member


Joined: 16 Mar 2007
Location: Germany

Post Posted: Mar 17, 2007 09:11 Posts Comp View users profile Send private message Reply with quote

Hi Soopafresh,

Thanks for the suggestion. I never really liked Foobar2000, when I tested it a few years ago. It had very comlicated and messy option screens.
But it seems that it has improved a lot and it is a really nice and handy audio tool to me!Now I like it smile.gif

I have tested your suggestion, but the weird thing is that now the foobar encoding process stops after encoding 132,7Mb (with your AC3Gain it stopped at 68,2MB) and throughs an error message telling that the encoder through an error 0. Its 100% reproducable.

Maybe I should mention, that the full ac3 file has a size of 466,5 Mb and it is in the 448KBit format. Of course I have changed the options to that bitrate.

It seems to me after.exe is having troubles encoding. Do you know any other page, which offers a 0.6 binary? Maybe the binary I use causes the troubles? Or do you have another idea for the roots of my problem?

Sorry for bothering you - and thanks very much for all your help so far!


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 18, 2007 03:21 Posts Comp View users profile Send private message Reply with quote

Happy to help out, but I'm starting to think your file has some data corruption in it. Try a different AC3 just to test out the theory. Also, isn't 132.7 MB twice the size of your first attempts via the script ? That would make sense if you're encoding at 2x the bit rate. It seems like it is still stopping at the same spot.

Like I mentioned, try the tests out with a different AC3 source.


Links to different Aften releases.
http://win32builds.sourceforge.net/


Tigerix
Member


Joined: 16 Mar 2007
Location: Germany

Post Posted: Mar 18, 2007 15:10 Posts Comp View users profile Send private message Reply with quote

Just tried it with another AC3 file and it is working fine with both methods.
I personally prefer the Foobar2000 solution, because it is faster (the progress starts instantly) and it shows a progress bar wink.gif

I still dont wanna give up on my other AC3-File. You mentioned before that there are other ac3 fixers out there. Do you know them by name? I made some research with google but I wasn't really successfull. Converting the AC3-file to mp3 doesnt cause any troubles, so it seems like that aften is very sensitively reacting to the data of that AC3 file.


pcspeak
Member


Joined: 24 Apr 2007
Location: Australia

Post Posted: Apr 24, 2007 19:54 Posts Comp View users profile Send private message Reply with quote

@Soopafresh
Had the same problems as everyone else. Just found this thread. Its GREAT. Absolutely just what I needed. Thanks.
I knocked up this batch file to do multiple files. Hope you don't mind. Accepts any input filename. Output is 'input filename-B'. I also changed Amplify(2.5) & WavGainLimiter(3.0) to suit my circumstances.

@Everyone
Here's an explanation http://www.users.on.net/~pcspeak/ with a couple more batch files that handle video. I tend, sometimes, to overexplain myself. biggrin.gif Please be aware that if you cut & paste this batch file, some lines may be wrapped.

@echo off
:: Last Revised: 2007/04/25
:: Run this batch file from a CMD prompt.
:: Processes ALL AC3 files in a folder. File names do not matter.
:: Format is: ac3gain bitrate. example: ac3gain 320 [192, 256, 320, 384, 448]

if (%1)==() goto errmsg01

:: Set the bitrate.
set bitrate=0
FOR %%W IN (192 256 320 384 448) DO if (%1)==(%%W) set bitrate=%1
if %bitrate%==0 goto errmsg01
::**************************************************************

:: This bit creates the AVS script files for all AC3 audio files.
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo SetMemoryMax(128) > "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo LoadPlugin("NicAudio.dll") >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo LoadPlugin("AudioLimiter.dll") >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo NicAC3Source("%%W", Channels=6, DRC=1) >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo ensurevbrmp3sync() >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo convertAudiotofloat() >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo amplify(2.5) >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo normalize() >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo #LinearLimiter(1.5) >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo #ExpotencialLimiter(1.1) >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo WavGainLimiter(3.0) >> "%%~nW.avs"
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO echo #SoftClipperFromAudX(0.4) >> "%%~nW.avs"
::**************************************************************

:: Create the new AC3 audio files.
FOR /F "delims=" %%W IN ('dir *.ac3 /b') DO bepipe.exe --script "import(^%%~nW.avs^)" | aften.exe -v 0 -b %bitrate% -dynrng 1 - "%%~nW-B.ac3"
:: Delete the script files.
FOR /F "delims=" %%W IN ('dir *.avs /b') DO del "%%~nW.avs"
goto finished
::**************************************************************

:finished
echo All Done!
goto end

:errmsg01
echo Unable to set a valid bitrate.
echo Format is: ac3boost bitrate. example: ac3boost 448
echo [or 192, or 256, or 320, or 384]

:end


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Apr 25, 2007 16:08 Posts Comp View users profile Send private message Reply with quote

Ah, very nice, pcspeak ! With your OK, I'll include it in the next release. An honor to see this stuff cross the hemispheres smile.gif I'm downloading your other batch files as well. I love scripted solutions.

Yeah, my insisting on the input file name was due to a hardcoded .AVS file, but I like the idea of dynamically creating the AVS.


edDV
Member


Joined: 06 Mar 2004
Location: Northern California, USA

Post Posted: Apr 25, 2007 16:31 Posts Comp View users profile Send private message Reply with quote

I struggle with 90+dB S/N signal to noise as well. My sound system needs high volume for that to work. TV variable volume for commercials is the ear killer.

I think the biggest mistake in the whole ATSC conversion is default to wide dynamic range for audio. This allowed compressed commercials to seem 3x louder than the program. My volume controls are failing from overuse.

I call for a class action suit for the advertising industry to replace scratchy volume controls at their expense.


PS: Activist Mode (blame my Berkeley days) Everyone should complain to NBC that the volume is too low vs. bumpers and ads. Complain that you need to constantly change volume and you can't hear the show after the break. Inside view is they don't care if you can't hear the show so long as you hear the commercials. You get their attention when you say you change channels. It doesn't add sway to say you change channels to other network channels. ABC and CBS do the same. Say that you go to cable classic movies. That will get them*.

*only if you are in their target demographic.


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Apr 25, 2007 17:37 Posts Comp View users profile Send private message Reply with quote

Hell yes! Even as I'm watching something on my PC capture card, I'll need to dive for the volume control when the commercials come on.

pcspeak
Member


Joined: 24 Apr 2007
Location: Australia

Post Posted: Apr 25, 2007 22:13 Posts Comp View users profile Send private message Reply with quote

@Soopafresh.
Muchly honoured. (Aussie spelling smile.gif )


pcspeak
Member


Joined: 24 Apr 2007
Location: Australia

Post Posted: Apr 26, 2007 13:16 Posts Comp View users profile Send private message Reply with quote

Quote:
I also changed Amplify(2.5) & WavGainLimiter(3.0)

Yikes! ohmy.gif I used those settings in my batch file to try and drive an old, large set of speakers I have had since forever. With no AMP! Boy that didn't work. Please don't anybody use the above settings. Stick with Soopafresh's settings. Although Amplify(1.4) has worked nicely for me.


Clon3isNasty
Member


Joined: 12 May 2007
Location: Indiana, United States

Post Posted: May 24, 2007 19:10 Posts Comp View users profile Send private message Reply with quote

I have some audio issues that need correcting on a DVD, the volume is too low I'd like to correct it, then reauthor it.

I'm completely new to this. Would this guide apply to me? I don't see a AC3 file anywhere on the DVD.

Thanks for any help you can give me! smile.gif


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: May 24, 2007 20:24 Posts Comp View users profile Send private message Reply with quote

Clon - Might be easier to try the Vob_Gain script posted in this thread. No promises. it'll leave you with .MPG files which you can reauthor with.

http://forum.videohelp.com/topic328986.html#1700075