| Author |
Message |
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
what is the use of avisynth. says it is requried. but nowhere in your post reference comes about avisynth. only ac3 gian is the subject of discussion here. plz explain why we neeed avisynth?
It works like this:
AC3 File ----->Avisynth---->Encoder
This happens automatically in the script. You must have Avisynth installed, plus .NET 1.1 or later for it to work
i downloaded Ac3gain v3..Unzipped it.As per your instruction --drag your ac3 file into ac3gain batch......but i found four RUNac3gainfiles in the unzipped folder.---viz 1.5,1.8.20,2.5. to which one should i put the ac3 file. i tried with the sample input ac3. 819 kb and clicked the Runac3 gain 2.0.. then i got a ac3 2.0 output file which is only 2.0 kb! am i right? how can i check the sound quality?Run ac3gain 1.5, Run ac3 1.8....what are these?
Make sure your AC3 file is named INPUT.AC3
1.5,1.8.20,2.5 is the amount of volume, with 2.5 being the loudest.
first advice me as how i can demultplex tha audio with what software. then the answer for my earlier quriesplz.. thanks in advance.
Lots of programs can do this
Batchdemux
TMPGEnc MPEG Editor
Rejig
Dgindex
|
|
NobodySpecial Member
Joined: 13 Mar 2008 Location: United Kingdom
|
|
Is there anyway to make the output file's bitrate 448K instead of 384K?
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
Open up any of the Run_AC3gain.bat files in notepad.
|
|
NobodySpecial Member
Joined: 13 Mar 2008 Location: United Kingdom
|
|
Thanks!
|
|
volam Member
Joined: 11 Nov 2007 Location: United States
|
|
I have been working with ac3gain for a few months now. I have to say it is a very good software for movie. But if you use it to change the volume of music, you may have problems like I do. First, you have to go by the preset volume. If you want the to increase the volume to somewhere in between you are out of luck. another problem is it does change the equalization of the music. I wonder if there is a software that just change the volume w/o changing the equalization for ac3 music file. In other words, it just turns up or down the volume and retains the original equalization.
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
It's probably the WAVgainLimiter line in the batch file. Try deleting that line for music (I think)
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
Latest Version 4 will process multiple AC3 files. No need to name them input.ac3 any more.
Also an experimental version for music AC3s which shouldn't color the sound. No dynamic range compression is applied.
ac3gain_experimental_music_version.zip
|
|
volam Member
Joined: 11 Nov 2007 Location: United States
|
|
I like the ease of operation of this experimental version. However. all output music are supposed to have the same volume (normalized), but in reality they still don't.
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
| Soopafresh wrote: |
| Also an experimental version for music AC3s which shouldn't color the sound. No dynamic range compression is applied. |
Much needed, cheers!
I'm trying to write a small Win32 application (using Delphi) and would like to incorporate the batch file or rather the scripts inside the batch file into the app, so that one doesn't have to bother with Explorer and the batch file and have a nice GUI lol. I hope it is ok with you? First I got to figure out how to use it in a win32 app
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
Go right ahead. Very little of the thing is mine, per se. All I wrote was the batch files to execute to process.
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Cheers!
When I unzip your file, there is a source folder. Are the files in that folder used by the batch, aften and wavi files?
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
When you create a program from other free or opensource apps, you need to either include the source files in their unchanged form, or link to the Urls of the people who authored the code. That's why I created a folder called source. Other than that, none of the files in that folder are accessed during the batch file execution.
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
I need a little help here, if possible, please.
Am I correct in thinking that the first 4 lines (excluding the del *.avs) in the batch file create the avs script, and in the last wavi and aften process the created script?
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
Works like this
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
This line is not in my batch file (the one I downloaded from your link ac3gain_experimental_music_version.zip)
| Code: |
| for %%a in ("*.ac3") do @echo WavGainLimiter(2.0) >> "%%~na.avs" |
Thanks for explanation, will give it a go.
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
wavgainlimiter is a plugin which adds dynamic range compression to the audio, so the loud parts and the quiet parts of the movie are closer to each other in volume. It makes a sound difference. Try out the batch files for yourself.
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Soopafresh, I'd be grateful if you could test this GUI version and pass me your comments, etc.
ac3norm.rar
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Newer version. Multi select of files added, tidying up of working folder.
ac3norm.rar
The output folder only shows the original and normalized AC3 files, all the others are hidden. If the AVS script files need to be shown as well, it can be added.
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
I'm trying it out now. Looks very good so far.
Suggestions:
-Make the processing visible by default (make silent mode off by default), or create a "processing" popup message.
-Make the normalization occur in the original folder where the source AC3 file is located
-Make a "Processing Complete" popup
I know you explain the compression options in the "about" section. Maybe rename "about" to "help"
-Label the section where the "1.5" "1.8", etc something like "Dynamic Range Compression" or just "Compression", and rename the "music" button to "none"
-Create a "No install" version which only needs to be unrared
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Updated.
Suggestions incorporated, except Processing Complete popup (still working on it). There is a bug when normalizing in AC3 source folder, that the folder display redisplays application folder while normalizing. By clicking Source Folder option again, it redisplays source folder. I'm trying to solve it.
Added an AC3 play option, if VideoLAN is installed.
ac3norm.exe
ac3norm.zip
I realized after uploading that the caption shows info about a dll. That's been removed.
Last edited by doctorjellybean on Jun 01, 2008 11:00, edited 1 time in total
|
|
halsboss Member
Joined: 13 Jan 2004 Location: Australia
|
|
Hi Soopa, nice thread. Have used FFMPEG for quite a while to convert audio in a .AVI to .AC3 or .MP2. Having trouble understanding WAVI and AFTEN switches though, and hope you might help.
Imagine you have an .AVI file where the audio could be of variable types, say .mp2 or .mp3 of 96k or 118k or 192k, 44100 or 48000, 2 channel or 5.1 channel ... target output to normalised DRC'd 2 channel .AC3 ...
Are these close to the right AFTEN and WAVI switches for an XP PC ?
(can't find what switches to force 2-channel)
(also, why the extra "-" before the pipes) ?
Last edited by halsboss on Jun 03, 2008 04:29, edited 1 time in total
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Huh? I've just done a test, and the normalized file actually sounds quieter than the original. Very strange....
Downloaded the examples on the first page, and that works. Must be my original AC3 files which are already max.
|
|
halsboss Member
Joined: 13 Jan 2004 Location: Australia
|
|
Addendem to AFTEN question - also wondering since the work is done by avisynth plugins, whether the avisynth output audio can also be used directly by ffmpeg to encode the AC3 since I can understand it's switches (eg is aften that much better ?)
|
|
AlanHK Member
Joined: 25 Apr 2006 Location: Hong Kong
|
|
| halsboss wrote: |
| (also, why the extra "-" before the pipes) ? |
That makes Wavi write to standard output, insead of a file, so it can be piped into Aften.
| halsboss wrote: |
| Addendem to AFTEN question - also wondering since the work is done by avisynth plugins, whether the avisynth output audio can also be used directly by ffmpeg to encode the AC3 since I can understand it's switches (eg is aften that much better ?) |
I used this batch to do that, using an intermediate WAVE file.
(I don't think ffmpeg can accept pipe input, I could be wrong.)
| Code: |
@echo avs2ac3 avsfile.avs
@echo audio from avs files and convert to AC3
@echo uses wavi and ffmpeg
@if %1X==X goto ALL
:LOOP
for %%I in (%1) do (
wavi %%I %%~nI.wav
p:\ffmpeggui\ffmpeg -i %%~nI.wav -ab 128 -ar 48000 -ac 2 -acodec ac3 -y %%~nI.ac3
del %%~nI.wav
)
SHIFT
@if %1X==X goto END
@goto LOOP
:ALL
for %%I in (*.avs) do (
wavi %%I %%~nI.wav
p:\ffmpeggui\ffmpeg -i %%~nI.wav -ab 128 -ar 48000 -ac 2 -acodec ac3 -y %%~nI.ac3
del %%~nI.wav
)
:END |
Note that different version of ffmpeg have subtly different options -- eg bitrate in this version is in kb ("-ab 128"), other versions require in bits.
But now I prefer Aften.
Its options are equally as obscure as ffmpeg, but it's a bit more consistent.
(I think it was originally forked from the ffmpeg code.)
Type "aften -h" to see these, or "aften -h >aften.txt" to save them.
("aften -longhelp" for more detail.)
Or get EncWAVtoAC3 (gui for Aften), its context help is comprehensive and you can use it to work out your own command line.
If you're really into Avisynth audio, you might use SoundOut.
But I've never tried it myself; Wavi + Aften (as below) does what I need.
| Code: |
@echo avsaften avsfile.avs
@echo audio from avs files and convert to AC3
@echo uses wavi and aften
@if %1X==X goto ALL
:LOOP
for %%I in (%1) do (
wavi %%I - | p:\aften\aften.exe -b 128 -s 1 -w 45 -dnorm 27 - %%~nI.ac3
)
SHIFT
@if %1X==X goto END
@goto LOOP
:ALL
for %%I in (*.avs) do (
wavi %%I - | p:\aften\aften.exe -b 128 -s 1 -w 45 -dnorm 27 - %%~nI.ac3
)
:END |
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
wavi is just a simple app which processes .AVS files by piping the audio output to stdout (noted by a -)
ffmpeg will allow - input (although it might be version dependent)
aften was actually built off of the AC3 code written into ffmpeg. Quality-wise, it's a step up from the ffmpeg ac3 encoder.
The latest binaries are here: http://win32builds.sourceforge.net/aften/index.html
Documentation is included in the download
halsboss, the -dynrng 1 switch in your command isn't recommended at the moment. Besides, there's dynamic range compression going on in the WavgainLimiter line from the Avisynth script. Read the docs for AudioLimiter in the sources folder, there are several different types of compression from which you can choose. Let your ears be the judge.
aften itself doesn't require too many switches, as it infers much just by the input it receives.
Imagine you have an .AVI file where the audio could be of variable types, say .mp2 or .mp3 of 96k or 118k or 192k, 44100 or 48000, 2 channel or 5.1 channel ... target output to normalised DRC'd 2 channel .AC3 ...
You can modify the batch files from these scripts to output to ac3 instead of mp3. They actually create a 2 channel WAV file from which you can use as input into aften. They also perform peak normalization and dynamic range limiting. This allows you to bypass the need for Avisynth scripts and wavi. Just an option.
http://forum.videohelp.com/topic314909.html
|
|
halsboss Member
Joined: 13 Jan 2004 Location: Australia
|
|
Thanks. Does WavGainLimiter do "real" DRC as I'd guessed ?
Anyway here's the .BAT I ended up with. It's designed to be CALLed from another script.
| Code: |
@echo off
REM http://forum.videohelp.com/topic317891-30.html#1853429
REM http://forum.videohelp.com/topic314909-60.html#1823321
REM http://www.hometheaterhifi.com/volume_7_2/feature-article-dialog-normalization-6-2000.html
REM
REM Output = .AC3 normalised and DRC'd - wgvalues in range 1.2 (less) to 2.5 (more)
REM Number of channels stays the same (I think) eg 2 or 5.1 channel input remains unchanged
REM 1st parameter is the input .AVI file
REM 2nd parameter is the output .AC3 file (default inputAVIfile with .AC3 extension)
REM 3rd parameter is the bitrate, eg 192 (default 192) *** NOTE no "k" on the end
REM 4th parameter is the DRC value from 1.2 to 2.5 (default 1.5)
REM
SET inp=%~1%
SET outA=%~1%.AC3
SET outW=%~1%.TEMP.AC3.WAV
SET avs="%~1%.TEMP.AC3.AVS
SET normvalue=0.95
SET drcvalue=1.5
SET dialognormvalue=31
SET bitratevalue=192
SET freqvalue=48000
IF NOT "%~2"=="" SET outA=%~2%
IF NOT "%~2"=="" SET outW=%~2%.TEMP.AC3.WAV
IF NOT "%~2"=="" SET avs=%~2%.TEMP.AC3.AVS
IF NOT "%3"=="" SET bitratevalue=%3%
IF NOT "%4"=="" SET drcvalue=%4%
@echo SetMemoryMax(128) > "%avs%"
@echo LoadPlugin("C:\SOFTWARE\aften\AudioLimiter.dll") >> "%avs%"
@echo #LoadPlugin("C:\SOFTWARE\aften\soxfilter.dll") >> "%avs%"
@echo #WavSource("%inp%").ConvertAudioToFloat().SSRC(%freqvalue%).normalize(%normvalue%) # all AviSynth filters >> "%avs%"
@echo #WavSource("%inp%") >> "%avs%"
@echo AVISource("%inp%") >> "%avs%"
@echo ConvertAudioToFloat() >> "%avs%"
@echo SSRC(%freqvalue%) >> "%avs%"
@echo normalize(%normvalue%) >> "%avs%"
@echo # WavGainLimiter - >> "%avs%"
@echo # to increase volume for silent sounds a lot, >> "%avs%"
@echo # to increase volume for middle-volume sounds a little and >> "%avs%"
@echo # to keep hi-volume sounds untouched. >> "%avs%"
@echo # This must help to increase volume for speech/dialog without increasing volume for shoots etc >> "%avs%"
@echo # Higher factor values increases the effect but can produce atrifacts. >> "%avs%"
@echo # Recomended value between 1.0 and 5.0 >> "%avs%"
@echo # This filter requires Normalized Float audio at input. >> "%avs%"
IF NOT "%drcvalue%"=="" @echo WavGainLimiter(%drcvalue%) >> "%avs%"
"C:\SOFTWARE\aften\wavi.exe" "%avs%" "%outW%"
"C:\SOFTWARE\aften\aften.exe" -v 1 -dnorm %dialognormvalue% -b %bitratevalue% -readtoeof 1 "%outW%" "%outA%"
REM A truly Excellent article on Dynamic Range Control and Dialog Normalization, with diagrams ...
REM http://www.hometheaterhifi.com/volume_7_2/feature-article-dialog-normalization-6-2000.html
REM When we speak of how loud sounds are in a Dolby Digital soundtrack,
REM we express the loudest level as "0 dB" and the quietest as "-105 dB".
REM The Dialnorm value expresses the level of dialogue as how much lower
REM it is then the peak (0 dB).
REM So a value of "-31" indicates a point 31 dB below the peak and, incidentally,
REM is the value at which no volume adjustment is performed by your consumer decoder.
REM A Dialnorm value of -27 would indicate to your decoder that the dialogue is
REM at a point 27dB below the peak, or 4dB higher than a program with a Dialnorm value of -31.
REM Your decoder would then turn things down by 4 dB.
REM A Dialnorm value of -25 would call for a 6 dB reduction and so on.
REM The -27 setting "fits" movie soundtracks perfectly in that it yields a very natural level
REM for talking and is likely the most common for movies.
REM For decades this has been the standard level for dialogue in motion picture soundtracks.
REM pause |
I suppose I should post in the other thread instead of here, since it's the audio from a .AVI that's being tinkered with (for me it started with extracting from the .AVI into an .AC3 and then wanting to "better" the .AC3)
Last edited by halsboss on Jun 03, 2008 04:31, edited 1 time in total
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
Getting the hang of this GUI application. This is now being rewritten to create a smaller program and more effecient.
Soopafresh, would there be any advantage in having options for different bitrates, e.g. 192, 256, etc?
|
|
doctorjellybean Member
Joined: 16 Feb 2002 Location: United Kingdom
|
|
I think Soopafresh is on holiday .... I hope
Here is the new GUI for the AC3 Normalizer batch files. All the suggestions have been incorporated. The bug has been fixed, and is easier to use. There are 2 files: standard zip and an installation file. Both include the source folder, but not the various DLL files as they are incorporated into the GUI.
I would be grateful for any comments, suggestions. If it is good enough, then I'll release it on the general forum, etc.
ac3%20normalizer.zip
ac3%20normalizer.exe
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
No, not on holiday, just a bit busy at work I'll check out the app this evening.
|
|
Soopafresh Craptastic
Joined: 01 Jan 2004 Location: United States
|
|
doctorjellybean - I'm getting this error message because I don't have VLC installed.
|
|
|
|