Btw, i get an error when i try to open that 4CCchanger.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 61 to 90 of 457
Thread
-
If you don't want to do install .NET 2.0, copy Mencoder.exe, Pthreadgc2.dll, and sdl.dll into the COMPLETED folder, along with this
change4cc.zip
GUI version (needs .Net 2.0)
4cc_changer.rar -
Originally Posted by Soopafresh
I modified your code a bit - couldn't see what mencoder was doing in the lossless batch file so removed it (and it worked fine for my files) as well as removing the need for LMOD and a separate pass of ffmpeg to create the temp video file (it now streams video from the original file to the new copy in the "converted" folder).
The sequence "o-0" in divxmux isn't listed in the short help - what does it do?
Thanks again!
Code:@echo off rem Lossless_Gain.bat v.5.1 md completed 2>nul for %%a in (*.avi) do ( if exist a-temp-*.* del a-temp-*.* ffmpeg -i "%%a" -vn -y -acodec copy a-temp-audio.mp3 mp3gain /f /c /r a-temp-audio.mp3 divxmux -o "completed\%%a" -v "%%a" -a "a-temp-audio.mp3" rem is -a o-0 "filename.mp3" necessary? ) if exist a-temp-*.* del a-temp-*.*
-
Thanks for that, foxidrive. I was looking for a way to get rid of Lmod, as it isn't XP64 compatible.
-
Top program, just fixed a DVD Rip as the sound was very low.
Many thanks. -
Hey, thanks for making these handy batch files! Now I finally have an answer for the e-mails I still get that say, "Can you add .avi support to MP3Gain?"
Suggested extra parameter for the Lossless one:
Adding "/s s" to the mp3gain command line, e.g.
mp3gain /f /s s /c /r *.mp3
will completely skip the tag reading/writing part of mp3gain. No extra garbage added to the file. I don't know if divxmux ignores that extra bit of tag data in the first place, so maybe that's not necessary.
Added bonus: there's a kludgy way to make mp3gain do peak normalization (i.e. maximizing) from the command-line:
mp3gain /f /s s /d 100 /k /r *.mp3
The "/d 100" switch means "bump up the regular 'normal' volume target by 100 decibels". That would normally completely destroy the volume into an unholy mess of clipping, but then the "/k" switch says, "Oh, and if the suggested volume change for this file will cause clipping, then bump the volume back down to the loudest point where this particular file won't clip at all".
...yeah, it would have been simpler if I'd just added a "maximize" switch in the first place
And to clear up a misunderstanding from much earlier in the thread, the changes made by mp3gain work in anything that plays mp3s. Mp3gain directly modifies the raw mp3 data. The tag stuff was added in a later version just as a convenience for people who went back to modify their mp3s more than once-- mp3gain stores the analysis results so it doesn't have to re-analyze the file. -
hey, i just registered to say thx for this nifty little trick..
i just found one little bug: i've you don't have a dir called 'completed' it deletes the new file after creating it, the dir 'completed' isn't created for you.. -
Snelg, thanks for those suggestions! I never looked into the Mp3gain parameters that carefully. Looks like a new release will be in the works.
-
Thanks so much, Soopafresh and foxidrive – this thread is really a life saver!
I was going to take advantage of Snelg’s “presence” and ask him whether there is a command line option to get mp3Gain to normalize files to a specific level (other than 89dB, that is), but then I realized that it makes little sense to do so regardless of clipping.
On the other hand, the “maximization” achieved by bumping up each mp3’s volume by 100dB and then bumping it back down to avoid clipping is not completely satisfactory to me, because I don’t get an overall feel for where the individual levels end up…
With that in mind, I have settled on a workflow that (while not completely automated) makes eminent sense to me (I mostly deal with TV series captured by friends in Europe). In short, I:
1) Extract the mp3s from the AVIs and put them aside in a separate directory, lest mp3Gain overwrite them [see “GG_AVI--Extract to mp3s.BAT” below]
2) Place a copy of the extracted mp3s into the AVIs’ directory, and normalize them to the highest common value not causing clipping, using mp3GainGUI – I play a bit with the value in the “Target” box after analyzing the files, and sometimes make a judgement call as to whether I can live with clipping in one or two of them. I also take a snapshot of the mp3GainGUI window with Snagit and save it, just to know what changes have been made.
3) Mux the normalized mp3s back into the AVIs, or more precisely, replace the original audio (mp3/AC3/etc) with the normalized mp3s. I put these new AVIs in their own directory as well, modifying their name to reflect the normalization level – this can easily be removed or modified by editing “ GG_AVI--Replace normalized mp3s into AVIs.BAT” below, currently set up for 94dB.
A couple of comments:
*) I agree that 224 kbps would be a desirable sampling rate, but in fact I usually match what’s in the original AVI (easily determined using gSpot or an equivalent application). The “Extract to mp3s.BAT” (currently set for 192 kbps) can be edited before using it.
**) I try to stay away from mencoder, because TMPGEnc does not recognize the audio portion of AVIs muxed with it.
Thanks again, and of course corrections and feedback are always welcome.
@echo off
rem GG_AVI--Extract to mp3s.BAT (based on Avi_Gain.bat v0.5)
md "AAA_Original mp3s" >nul
if exist x-gain.wav del x-gain.wav
if exist a-norm.mp3 del a-norm.mp3
for %%a in ("*.avi") do (
ffmpeg -i "%%a" -vn -y x-gain.wav
lame x-gain.wav -b 192 --cbr -F -m s -h --noreplaygain a-norm.mp3
copy a-norm.mp3 "AAA_Original mp3s\%%a.mp3"
del x-gain.wav
del a-norm.mp3
)
@echo off
rem GG_AVI--Replace normalized mp3s into AVIs.BAT (based on Avi_Gain.bat v0.5)
md "AAA_Normalized AVIs" >nul
if exist a-temp-*.* del a-temp-*.*
for %%a in (*.avi) do (
copy "(Norm94dB)-%%a.mp3" a-temp-audio.mp3
divxmux -o "AAA_Normalized AVIs\(Norm94dB)-%%a" -v "%%a" -a "a-temp-audio.mp3"
del a-temp-*.*
) -
Great ideas, gg2004. I'm gonna try out your batch files.
Wow, I just realized why Snelg knows so much about MP3gain -
Okey dokey, new version 06 contains a few changes:
1) Updated the Lame Mp3 encoder
2) Used Peak Normalizing on the Lossless gain batch file (thanks, Snelg)
3) Optimized the batch files to hopefully work with 64 bit Windows
4) Reduced the file size to host on Videohelp.com -
Version 07 has a minor update of the Lame encoder. No need to update if you're already running v06.
avi_gain_batch.zip -
I capture avi files with PCM wave audio, which I convert to AC3 for DVD authoring. Now, the correct AC3 level is –27 dB. Is any of the normalizing methods mentioned here normalizes the audio level to -27 dB?
-
Are you sure you don't mean "Dialog Normalization" ? That would be something you apply at the Dolby Digital encoding stage. 27 means adding 4dB of gain reduction to the Dolby playback
"Dialnorm is the meta-data parameter that controls decoder gain within the proprietary Dolby Laboratories Dolby Digital (AC-3) audio compression system. It ranges in integer values from 31, where decoder gain remains at unity, to a value of 1, where decoder gain is reduced by 30 dB."
http://en.wikipedia.org/wiki/Dialnorm
The only thing these AVI_GAIN scripts do is ensure the PEAK loudness of the audio never goes over 0dB -
Originally Posted by Soopafresh
Originally Posted by Soopafresh -
How does Aften recognize the dialog actual level? Is it fully AC3 compatible?
My predicament is this:
I capture many movies from Cable TV and Satellite TV with wave audio and authorize it to DVDs. The audio levels between different movies varies by as much as 10 dB. I'd like all final movies to have about the same audio level, and similar audio level to commercial DVDs.
Right now I use Vegas 5.0b for AC3 encoding. I open the avi files in Vegas, from there I open it in Sound Forge 7.0 to find the average RMS level. Whatever RMS level is indicated, I choose that level in Vegas AC3 rendering (encoding). However, this is a lengthy and tiresome process, since I capture few movies a day. Also, the end result is far from satisfactory – since there are marked variations in audio level between different movies.
So, is there any better, or easier way to do it? -
It all depends on your definition of "easier" and "better".
1 - Install AVIsynth v2.57 or later (preferably 2.58 ) - http://downloads.sourceforge.net/avisynth2/AviSynth_070919.exe?modtime=1190242334&big_mirror=0
2 - Download and unzip this small script
wav_to_5_1_upmixer.rar
3 - Copy your WAV files into the same folder and double click the .bat file
4 - When complete, you'll find the AC3 files
I modified the script to give you a Dialnorm of 27 to match your other DVDs. The audio levels should now be very close. The script takes a while to run, but it is completely automatic, and the 5.1 audio sounds very good.
If you want a faster method or if you just want stereo AC3, you can use the script below instead. Both methods take some time because they to go through the entire WAV file and normalize the sound levels.
wav_to_2_0_ac3.rar -
Thank you very much.
I'll try it.
Only, few questions:
Is Aften fully AC3 compatible?
Is there any difference in AC3 audio quality between Aften and Vegas?
How does Aften know the actual recorded dialog level (since the level varies by as much as 10 dB between different movies)?
Does applying Normalizing Dialog to -27 dB in Vegas, regardless of the recorded level, will not do the same as your script? -
Is Aften fully AC3 compatible?
Yes
Is there any difference in AC3 audio quality between Aften and Vegas?
Aften will probably sound better. It's really an amazing encoder.
How does Aften know the actual recorded dialog level (since the level varies by as much as 10 dB between different movies)?
It doesn't. The script pre-processes all the WAV files to have the same volume levels before feeding it to Aften.
Does applying Normalizing Dialog to -27 dB in Vegas, regardless of the recorded level, will not do the same as your script?
No. I'm trying to find something for you to read to understand the difference between volume normalization and dialogue normalization. They are very different things. -
Thankyou heaps, Soopafresh.
Per https://forum.videohelp.com/topic317891-30.html#1853477 here's a .BAT script designed to be called from another script. I'll be using it all the time, now. Here's hoping that WavGainLimiter does "real" DRC.
Code:@echo off REM https://forum.videohelp.com/topic317891-30.html#1853429 REM https://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
-
Originally Posted by Soopafresh
I have only one "complain", and it is that it does not handles multi-audio avis correctly.
Anyway, i also modified the 0.7 version, so that the programs are in a folder, and the BATs are alone:
I created a folder avi_gain_tools and moved all there except the BATs.
Then I modified the BATs like:
for %%a in ("*.avi") do @echo avi_gain_tools\mencoder.exe -O "x-%%a" -forceidx -oac copy -ovc copy "%%a" >> "%%~na.cmd"
for %%a in ("*.avi") do @echo avi_gain_tools\ffmpeg.exe -i "x-%%a" -vcodec copy -an -y v1deo.avi >> "%%~na.cmd"
for %%a in ("*.avi") do @echo avi_gain_tools\ffmpeg.exe -i "x-%%a" -vn -acodec copy -y a-norm.mp3 >>"%%~na.cmd"
for %%a in ("*.avi") do @echo avi_gain_tools\mp3gain.exe /f /s s /d 100 /k /r a-norm.mp3 >>"%%~na.cmd"
for %%a in ("*.avi") do @echo avi_gain_tools\divxmux.exe -o "completed\Norm-%%a" -v "v1deo.avi" -a o-0 "a-norm.mp3" >>"%%~na.cmd" -
Hi kwanbis
Thanks for the suggestions. I'll keep them in mind for the next version of the scripts -
Thanks you Soopafresh.
One question, is it possible to make it take into consideration more than 1 audio stream?
Cause it only processes the first one. -
Hi Soopa.
Thanks for the suggestions. I'll keep them in mind for the next version of the scripts
for %%a in ("*.avi") do @echo del "x-*.avi" >>"%%~na.cmd"
for %%a in ("*.avi") do @echo del v1deo.avi >>"%%~na.cmd"
for %%a in ("*.avi") do @echo del x-gain.wav >>"%%~na.cmd"
for %%a in ("*.avi") do @echo del a-norm.mp3 >>"%%~na.cmd"
or
for %%a in ("*.avi") do @echo del "x-*.avi" v1deo.avi x-gain.wav a-norm.mp3 >>"%%~na.cmd"
Anything to cut down on the typing.
Similar Threads
-
How to join AVI files with multiple audio streams
By V@no in forum Newbie / General discussionsReplies: 2Last Post: 29th May 2010, 22:17 -
Multiple AVI files to multiple DVD discs, no quality loss, chapter per avi
By Delta007bhd in forum Video ConversionReplies: 11Last Post: 14th Apr 2010, 08:27 -
AVI to iPhone, multiple files after encode, no audio?
By wcpfour in forum ffmpegX general discussionReplies: 2Last Post: 23rd Jul 2009, 16:24 -
Normalizing with avi-gain- 2 files fail to appear in the "completed&qu
By DaneClark in forum EditingReplies: 1Last Post: 13th Jul 2009, 00:45 -
how do I join multiple avi files with multiple audio tracks?
By helloguys in forum EditingReplies: 1Last Post: 26th Dec 2007, 02:28