Thread: Wanted: avs2wav
View Single Post
Old 28th February 2004, 09:29   #7  |  Link
LB
Registered User
 
Join Date: Feb 2002
Posts: 285
Quote:
Originally posted by kassandro
I knew about this possibility and that's the way I have done it a few times, when it was absolutely necessary. But that is not comfortable at all. I would like to have batch processing.
Batch is easy, with the #1 macro utility in existance - AUTOIT

CODE for your AVS->WAV

Code:
SetEnv, DEL, C:\\FILES\\Delete.exe
SetEnv, VIRT, C:\\FILES\\VirtualDub_Audio\\VirtualDub.exe
SetEnv, BESWEET, C:\\FILES\\BESWEET\\BeSweet.exe
SetEnv, GAIN, C:\\FILES\\Mp3Gain.exe
SetEnv, ALIVE, C:\\FILES\\AliveMedia\\Mp3WavConverter.exe

; --------------------------- USER CONFIG HERE ---------------------------------
SetEnv, DIVXLOCATION, C:\\ShowNameGoesHere\\Divx\\
SetEnv, EPI, C:\\FILES\\Episode.txt
SetEnv, EpStart, Ep01
SetEnv, EpEnd, 20

; ------------------------------ BEGIN LOOP ---------------------------------
RIP:

; ------------------------------ WAV RIP ------------------------------
Run, %VIRT%
WinWaitActive, Virt
Sleep, 1000
Send, {ENTER}
Send, {ALT}{DOWN}{ENTER}
WinWaitActive, Open
Send, %DIVXLOCATION%%EpStart%.avs
Send, {ENTER}
Sleep, 1000
Send, {ENTER}
Send, {ALT}{DOWN}s
WinWaitActive, Save
Send, %DIVXLOCATION%%EpStart%.mp3
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Status
Send, {TAB}{SPACE}{TAB}{SPACE}
WinWaitClose, Status 
SetTitleMatchMode, 1
WinClose, VirtualDub

; ------------------------------ MP3 Gain ------------------------------
RunWait, %GAIN% /r /k %DIVXLOCATION%%EpStart%.mp3

; ------------------------------ AliveMP3toWAV ----------------------------
RunWait, %ALIVE% %DIVXLOCATION%%EpStart%.mp3 /wav

; ------------------------------ LAME ----------------------------
RunWait, %BESWEET% -core( -input "%DIVXLOCATION%%EpStart%.WAV" -output "%DIVXLOCATION%%EpStart%.AC3" ) -ac3enc( -b 384 )

; -------------------------------- DELETING --------------------------------
RunWait, %DEL%  %DIVXLOCATION%%EpStart%.mp3
RunWait, %DEL%  %DIVXLOCATION%%EpStart%.WAV

; -------------------------------- LOOP -------------------------------------
StringRight, NUMBER, EpStart, 2
IfEqual, TOTAL, %NUMBER%, Goto, Bye
EnvAdd, NUMBER, 1
FileReadLine, EPY, %EPI%, %NUMBER%
StringRight, EPNUM, EPY, 2
SetEnv, EpStart, Ep%EPNUM%
Goto, RIP

; -------------------------------- END --------------------------------------
Bye:
Exit
I whipped this up pretty quick. It should work. Just make sure to have a seperate file called Episode.txt in the proper directory, with:
01
02
03
04
etc

I don't know what exactly you wanted to do so I used just about every step. This current script should rip a MP3 out of a divx file, MP3 gain it so that any other MP3's ripped from that divx file are of equal loudness; then the script does a mp3->wav conversion. I NEVER use lame for this because I always get a crackle when going from 44khz to 48khz in lame, so I figure that's a bug, so use Alive2MP3. It's shareware, but it works A+. Then I tossed in a AC3 conversion, and finally it deletes the files you don't need. Like I said, dunno why you'd need this entire script because the best thing would be to just rip the audio from your DVD directly to AC3, but I wanted to goto the extreme in this script so you have a lot to work with, and can simply delete what you don't want. But yeah, this is your batch processing script.

And, don't let the "episode" connatation fool you. I simply put it like that so you can batch it easy. I guess I could have written another external txt file to hold the different directory names with individual audio components, but that's a hassle. Just use episode connetation and you should be fine.
__________________
1. CPUs:2x2.4_LV @ 3.6 (16x229) 1.5v MB:DH800 HS:E3W-NPTXS-04 CRT:FP2141SB HDs:8x147gbU320 1x36gbU320 2x250gbIDE GPU:X800XT DVDRW:PX-712A PSU:2xAntec 550w CASE:PC-78
2. CPUs:1x2.4A @ 3.0 MB:SFF SB61G2BV3 CRT:KVM(see above) HDs:2x120gb IDE GPU:Ti4600 DVDRW:A107
3. Notebook:T40p

Last edited by LB; 28th February 2004 at 09:33.
LB is offline   Reply With Quote