LB
11th October 2002, 17:21
Ok guys, I guess I'll let it all out on the table. There is a wicked program called AutoIt which is available as shareware on the internet. It allows you to create the most amazing script based macros ever imagined. Well, I've been using this for over a year now and figured I'd release it to the public (not auto it, by my scripts). The ones I have are really only applicable for encoding episodes of a tv show or anime series. But they are 100% editable for whatever you want to encode. I'll post my first script in here and if you guys want to see more that I have created just ask. I'll paste the script first, then explain it once the paste is done.
SetEnv, CCE, C:\\CCE\\CCTSPt.EXE
SetEnv, VFAPI, C:\\Vfapi\\Reader\\VFAPIConv-EN.exe
SetEnv, PULL, C:\\Pulldown.exe
SetEnv, DEL, C:\\Delete.exe
SetEnv, TIMES, C:\\Times.txt
SetEnv, CALC, C:\\BBC.exe
SetEnv, VIRT, C:\\VirtualDub\\VirtualDub.exe
SetEnv, HSPA, c:\\Ep\\
SetEnv, EPI, C:\\Episode.txt
SetEnv, BB, C:\\BBMPEG\\avi2mpg2.exe
SetEnv, FILTER, C:\\VirtualDub\\Subtitler.vdf
; --------------------------- Episode Location ---------------------------------
SetEnv, PATH, f:\\AnimeSeries\\
SetEnv, SETTEN, XSVCD
SetEnv, EPISODE, Ep16
SetEnv, TOTAL, 20
SetEnv, SVV, 0
; SVV decides wether or not to LOAD a vcf file at virtualdub startup... 0=dont use & 1=use
; SETTEN specifies the name for the vcf file.
; ------------------------------ BEGIN LOOP ---------------------------------
MySVCD:
; --------------------------- AUDIO CONVERSION ---------------------------
Run, %TMPG%
WinWaitActive, TMPGEnc
Send, {TAB}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {TAB}{TAB}{TAB}{ENTER}
WinWaitActive, Open
Send, %PATH%%EPISODE%\\%EPISODE%j.wav
Send, {ENTER}
WinWaitActive, TMPGEnc
Send, {TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{UP}
Send, {ENTER}
Send, {ALT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Batch
LeftClick, 453, 268
WinWaitActive, Clear
Send, {ENTER}
LeftClick, 506,12
WinWaitActive, TMPGEnc
Send, {ALT}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{ENTER}
WinWaitActive, Save
Send, %PATH%%EPISODE%\\%EPISODE%.MP2
Send, {ENTER}
WinWaitActive, Batch
Sleep, 2000
LeftClick, 457,40
WinWaitActive, TMPGEnc
WinWaitActive, Batch
Send, {TAB}{ENTER}
WinWaitActive, TMPGEnc
WinClose, TMPGEnc
; ------------------------------ Huffy ------------------------------
Run, %VIRT%
WinWaitActive, Virt
IfEqual, %SVV%, 0, Goto, BEER
Send, {ALT}{ENTER}l
WinWaitActive, Load
Send, %PATH%%SETTEN%.vcf
Send, {ENTER}
WinWaitActive, Virt
BEER:
LeftClick, 81,26
Sleep, 500
LeftClick, 90,48
WinWaitActive, Filters
Send, {TAB}{ENTER}
WinWaitActive, Add
Send, {TAB}{ENTER}
WinWaitActive, Load
Send, %FILTER%
Send, {ENTER}
WinWaitActive, Add
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Subtitler:
Send, {TAB}{ENTER}
WinWaitActive, Select
Send, %PATH%%EPISODE%\\%EPISODE%\-PERFECT.SSA
Send, {ENTER}
WinWaitActive, Subtitler:
Send, 0{ENTER}
WinWaitActive, Filters
Send, {ENTER}
WinWaitActive, Add
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Filter:
Send, 480
Send, {TAB}
Send, 480
Send, {TAB}{DOWN}{DOWN}{ENTER}
WinWaitActive, Filters
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, VirtualDub
Send, {ALT}{DOWN}{ENTER}
WinWaitActive, Open
Send, %PATH%%EPISODE%\\%EPISODE%.avs
Send, {ENTER}
WinWaitActive, VirtualDub
Send, {ALT}
Send, v
Send, c
WinWaitActive, Select
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, VirtualDub
Send, {ALT}
Send, f
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Save
Send, %HSPA%%EPISODE%.AVI
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Status
Send, {TAB}{SPACE}{TAB}{SPACE}
WinWaitClose, Status
SetTitleMatchMode, 1
WinClose, VirtualDub
; ----------- BitCalc SVCD ---------
StringRight, NUMBER, EPISODE, 2
FileReadLine, TIMECODE, %TIMES%, %NUMBER%
Run, %CALC%
WinWaitActive, Bearson
LeftClick, 226,85
LeftClick, 226,85
StringRight, TIM, TIMECODE, 2
Send, %TIM%
LeftClick, 187,127
LeftClick, 187,127
Send, 790
Send, {TAB}{UP}{UP}{UP}{TAB}
Send, ^c
WinClose, Bearson
; -------------------------------- CCE --------------------------------
Run, %CCE%
WinWaitActive, CCE
WinActivate, CCE
RightClick, 87,100
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.00.AVI
Send, {ENTER}
WinWaitActive, CCE
LeftClick, 71,73
LeftClick, 71,73
WinWaitActive, Encode
Send, {TAB}{TAB}{ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.01.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.01.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.02.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.02.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.03.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.03.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.04.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.04.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.05.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.05.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.06.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.06.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.07.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.07.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.08.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.08.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.09.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.09.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.10.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.10.AVI
Send, {ENTER}
WinWaitActive, Ep
BEGIN:
Send, {TAB}{ENTER}
WinWaitActive, Encode
Send, {TAB}{TAB}{TAB}
Send, %HSPA%%EPISODE%.MPV
Send, {TAB}{TAB}
Send, %HSPA%%EPISODE%.MPV
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}
Send, ^v
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, CCE
Send, {TAB}{ENTER}
Sleep, 1000
Send, {ENTER}
WinWaitActive, Save
Send, %HSPA%%EPISODE%.ECL
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Ep,Saving
WinWaitClose, Ep,Saving
Sleep, 5000
WinWaitActive, Ep,Saving
WinWaitClose, Ep,Saving
Sleep, 3000
WinActivate, CCE
WinClose, CCE
; -------------------------------- PULLDOWN --------------------------------
RunWait, %PULL% %HSPA%%EPISODE%.MPV %HSPA%%EPISODE%.MP4
; --------- MUXING ----------
Run, %BB%
WinWaitActive, AVI2MPG2
Send, l
Sleep, 3000
Send, {ESC}
Send, e
WinWaitActive, bbMPEG
Send, {TAB}
Send, s
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}
Send, {RIGHT}{TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %PATH%%EPISODE%\\%EPISODE%.MPG
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %HSPA%%EPISODE%.MP4
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %PATH%%EPISODE%\\%EPISODE%.MP2
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
Send, t
SetTitleMatchMode, 2
WinWaitActive, bbMPEG, &Ok
Send, {ESC}
WinClose, AVI2MPG2
; -------------------------------- DELETING --------------------------------
RunWait, %DEL% %HSPA%%EPISODE%.00.AVI
RunWait, %DEL% %HSPA%%EPISODE%.MPV
RunWait, %DEL% %HSPA%%EPISODE%.MP4
RunWait, %DEL% %HSPA%%EPISODE%.00.VAF
RunWait, %DEL% %HSPA%%EPISODE%.ECL
RunWait, %DEL% %PATH%%EPISODE%\\%EPISODE%.MP2
IfExist, %HSPA%%EPISODE%.01.AVI, RunWait, %DEL% %HSPA%%EPISODE%.01.AVI
IfExist, %HSPA%%EPISODE%.02.AVI, RunWait, %DEL% %HSPA%%EPISODE%.02.AVI
IfExist, %HSPA%%EPISODE%.03.AVI, RunWait, %DEL% %HSPA%%EPISODE%.03.AVI
IfExist, %HSPA%%EPISODE%.04.AVI, RunWait, %DEL% %HSPA%%EPISODE%.04.AVI
IfExist, %HSPA%%EPISODE%.05.AVI, RunWait, %DEL% %HSPA%%EPISODE%.05.AVI
IfExist, %HSPA%%EPISODE%.06.AVI, RunWait, %DEL% %HSPA%%EPISODE%.06.AVI
IfExist, %HSPA%%EPISODE%.07.AVI, RunWait, %DEL% %HSPA%%EPISODE%.07.AVI
IfExist, %HSPA%%EPISODE%.08.AVI, RunWait, %DEL% %HSPA%%EPISODE%.08.AVI
IfExist, %HSPA%%EPISODE%.09.AVI, RunWait, %DEL% %HSPA%%EPISODE%.09.AVI
IfExist, %HSPA%%EPISODE%.10.AVI, RunWait, %DEL% %HSPA%%EPISODE%.10.AVI
; -------------------------------- LOOP -------------------------------------
StringRight, NUMBER, EPISODE, 2
IfEqual, TOTAL, %NUMBER%, Goto, Bye
EnvAdd, NUMBER, 1
FileReadLine, EPY, %EPI%, %NUMBER%
StringRight, EPNUM, EPY, 2
SetEnv, EPISODE, Ep%EPNUM%
Goto, MySVCD
; -------------------------------- END --------------------------------------
Bye:
Exit
Ok. Yea, its long as hell ;p. So what does it all do? Well that allows you to setup say 50 episodes to encode, press 1 button, walk away and come back a few days later and have 50 fully muxed SVCD episodes on your hard drive. Pretty sweet eh? The reason I created it was that encoding a 20 minute episode of something takes little or no time and all the intermediate steps are a real pain in the ass to do. So, just put all the crap in a script and away you go.
NOTES on this script:
The top portion with the path names are the locations to the programs you need.
1. Get CCE and set it up for 3 pass VBR and configure all your other settings in there.
2. Ya need to install vfapi.
3. Get ahold of pulldown.exe
4. Find a delete.exe file
5. CREATE a times file. The file should look like:
01-45
02-45
03-45
04-45
05-45
06-45
07-45
08-45
09-45
10-45
11-45
12-53
13-53
14-53
15-53
16-53
17-53
18-45
19-45
20-45
etc
** this is ep 01, 02, 03, etc and the time next to it is the time for the TOTAL amount of time that will be placed on *1* CD. So if you are doing two 20 minute episodes, your time will be *40* minutes next to each of those two episodes. Simple.
6. Get BBC (Bearson's Bitrate Calculator)
7. Virtualdub obviously.
** NOTE-a: This script is NOT setup for DIVX5 OR DIVX4 installed. If they are installed, either delete them or edit the macro's {DOWN} option to pass through them during the codec selection
** NOTE-b: DO install divx3.11, it's setup for that so it must be installed, and this macro USES the HUFFY codec, so install that and set it up. (AVG size for a huffy avi is 5gb for 20mins)
8. The "C:\\ep" folder is an empty folder where the filestorage for TEMPORARY files. If you are dealing with 20 minute episodes, the segmented huffy avis will be ~5gb so make sure that directory location has space.
9. Episode.txt should appear as follows:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
etc
*** this is just a VERY generic counter system i used. If you want to encode a particular episode, make sure the list counts UP to that episode. Just make this episode txt file one time.
10. Install BBMPEG for muxing the files
11. I use SSA scripts for subtitles on these episodes so you will need to put this filter in your virtualdub folder. like i explained before, DON'T install any filters, just put them in the vdub root folder. If you place them in the plugin folder then the macro will bypass them unless you re-write it.
12. SetEnv, PATH, f:\\AnimeSeries\\
Just sets the location to the folder where the episodes are going to be stored and where the vobs are. This system will count using the
"SetEnv, EPISODE, Ep16" & "SetEnv, TOTAL, 20" commands. So in your AnimeSeries folder you would need folders called
Ep16
Ep17
Ep18
Ep19
Ep20
If you are not 100% confused by now ;p, the "episode" and "total" variables list your starting episode and ending episode that you will be encoding. If you were doing a FULL series you might want to start at 01 and end at 26. But you see how it works now. Also, this is another reason for the Episode.txt file and the Times.txt file. The correct numbers are pulled from those txt documents and implemented via these variable commands.
13. Finally, this script uses avisynth scripts in virtualdub. Your basic script can look like anything. Mine looks like:
LoadPlugin("C:\Virtualdub\MPEG2DEC.dll")
LoadPlugin("C:\Virtualdub\IVTC.dll")
LoadPlugin("C:\IVTC\it.dll")
mpeg2source("F:\Anime\SeriesXYZ\ep04\ep04.d2v")
IT (fps=24,ref="TOP",blend=false)
14. And one last note. In each Ep01 Ep02 Ep03 folder, you will need to name the d2v file "Epxx.d2v" xx=01 02 03 etc. The WAV file "Epxxj.wav" the ssa file "epxx-perfect.ssa" and the avs file "epxx.avs"
** If your series is dubbed and you have no subs, you *could* just delete the ssa portion out of the macro, but i would suggest leaving it in case of future need. Instead, just create a BLANK SSA file (open an existing one and delete all the lines). That will allow you to have a dubbed episode. Also snag vobsub. It is really nifty now that it allows you to OCR which p0wns subrips's ocr. heh VOBSUB OCR = GOD. And then just save the output as a .SSA. SO, SSA creation is a piece of cake. The benefit is that you can really modify the fonts or any other aspect of the subs much easier than a crappy srt.
SetEnv, CCE, C:\\CCE\\CCTSPt.EXE
SetEnv, VFAPI, C:\\Vfapi\\Reader\\VFAPIConv-EN.exe
SetEnv, PULL, C:\\Pulldown.exe
SetEnv, DEL, C:\\Delete.exe
SetEnv, TIMES, C:\\Times.txt
SetEnv, CALC, C:\\BBC.exe
SetEnv, VIRT, C:\\VirtualDub\\VirtualDub.exe
SetEnv, HSPA, c:\\Ep\\
SetEnv, EPI, C:\\Episode.txt
SetEnv, BB, C:\\BBMPEG\\avi2mpg2.exe
SetEnv, FILTER, C:\\VirtualDub\\Subtitler.vdf
; --------------------------- Episode Location ---------------------------------
SetEnv, PATH, f:\\AnimeSeries\\
SetEnv, SETTEN, XSVCD
SetEnv, EPISODE, Ep16
SetEnv, TOTAL, 20
SetEnv, SVV, 0
; SVV decides wether or not to LOAD a vcf file at virtualdub startup... 0=dont use & 1=use
; SETTEN specifies the name for the vcf file.
; ------------------------------ BEGIN LOOP ---------------------------------
MySVCD:
; --------------------------- AUDIO CONVERSION ---------------------------
Run, %TMPG%
WinWaitActive, TMPGEnc
Send, {TAB}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}
Send, {TAB}{TAB}{TAB}{ENTER}
WinWaitActive, Open
Send, %PATH%%EPISODE%\\%EPISODE%j.wav
Send, {ENTER}
WinWaitActive, TMPGEnc
Send, {TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{UP}
Send, {ENTER}
Send, {ALT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Batch
LeftClick, 453, 268
WinWaitActive, Clear
Send, {ENTER}
LeftClick, 506,12
WinWaitActive, TMPGEnc
Send, {ALT}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{ENTER}
WinWaitActive, Save
Send, %PATH%%EPISODE%\\%EPISODE%.MP2
Send, {ENTER}
WinWaitActive, Batch
Sleep, 2000
LeftClick, 457,40
WinWaitActive, TMPGEnc
WinWaitActive, Batch
Send, {TAB}{ENTER}
WinWaitActive, TMPGEnc
WinClose, TMPGEnc
; ------------------------------ Huffy ------------------------------
Run, %VIRT%
WinWaitActive, Virt
IfEqual, %SVV%, 0, Goto, BEER
Send, {ALT}{ENTER}l
WinWaitActive, Load
Send, %PATH%%SETTEN%.vcf
Send, {ENTER}
WinWaitActive, Virt
BEER:
LeftClick, 81,26
Sleep, 500
LeftClick, 90,48
WinWaitActive, Filters
Send, {TAB}{ENTER}
WinWaitActive, Add
Send, {TAB}{ENTER}
WinWaitActive, Load
Send, %FILTER%
Send, {ENTER}
WinWaitActive, Add
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Subtitler:
Send, {TAB}{ENTER}
WinWaitActive, Select
Send, %PATH%%EPISODE%\\%EPISODE%\-PERFECT.SSA
Send, {ENTER}
WinWaitActive, Subtitler:
Send, 0{ENTER}
WinWaitActive, Filters
Send, {ENTER}
WinWaitActive, Add
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Filter:
Send, 480
Send, {TAB}
Send, 480
Send, {TAB}{DOWN}{DOWN}{ENTER}
WinWaitActive, Filters
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, VirtualDub
Send, {ALT}{DOWN}{ENTER}
WinWaitActive, Open
Send, %PATH%%EPISODE%\\%EPISODE%.avs
Send, {ENTER}
WinWaitActive, VirtualDub
Send, {ALT}
Send, v
Send, c
WinWaitActive, Select
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, VirtualDub
Send, {ALT}
Send, f
Send, {DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}
WinWaitActive, Save
Send, %HSPA%%EPISODE%.AVI
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Status
Send, {TAB}{SPACE}{TAB}{SPACE}
WinWaitClose, Status
SetTitleMatchMode, 1
WinClose, VirtualDub
; ----------- BitCalc SVCD ---------
StringRight, NUMBER, EPISODE, 2
FileReadLine, TIMECODE, %TIMES%, %NUMBER%
Run, %CALC%
WinWaitActive, Bearson
LeftClick, 226,85
LeftClick, 226,85
StringRight, TIM, TIMECODE, 2
Send, %TIM%
LeftClick, 187,127
LeftClick, 187,127
Send, 790
Send, {TAB}{UP}{UP}{UP}{TAB}
Send, ^c
WinClose, Bearson
; -------------------------------- CCE --------------------------------
Run, %CCE%
WinWaitActive, CCE
WinActivate, CCE
RightClick, 87,100
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.00.AVI
Send, {ENTER}
WinWaitActive, CCE
LeftClick, 71,73
LeftClick, 71,73
WinWaitActive, Encode
Send, {TAB}{TAB}{ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.01.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.01.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.02.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.02.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.03.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.03.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.04.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.04.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.05.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.05.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.06.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.06.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.07.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.07.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.08.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.08.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.09.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.09.AVI
Send, {ENTER}
WinWaitActive, Ep
IfNotExist, %HSPA%%EPISODE%.10.AVI, Goto, BEGIN
RightClick, 295,219
Send, a
WinWaitActive, Open
Send, %HSPA%%EPISODE%.10.AVI
Send, {ENTER}
WinWaitActive, Ep
BEGIN:
Send, {TAB}{ENTER}
WinWaitActive, Encode
Send, {TAB}{TAB}{TAB}
Send, %HSPA%%EPISODE%.MPV
Send, {TAB}{TAB}
Send, %HSPA%%EPISODE%.MPV
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}
Send, ^v
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
WinWaitActive, CCE
Send, {TAB}{ENTER}
Sleep, 1000
Send, {ENTER}
WinWaitActive, Save
Send, %HSPA%%EPISODE%.ECL
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Ep,Saving
WinWaitClose, Ep,Saving
Sleep, 5000
WinWaitActive, Ep,Saving
WinWaitClose, Ep,Saving
Sleep, 3000
WinActivate, CCE
WinClose, CCE
; -------------------------------- PULLDOWN --------------------------------
RunWait, %PULL% %HSPA%%EPISODE%.MPV %HSPA%%EPISODE%.MP4
; --------- MUXING ----------
Run, %BB%
WinWaitActive, AVI2MPG2
Send, l
Sleep, 3000
Send, {ESC}
Send, e
WinWaitActive, bbMPEG
Send, {TAB}
Send, s
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}
Send, {RIGHT}{TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %PATH%%EPISODE%\\%EPISODE%.MPG
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %HSPA%%EPISODE%.MP4
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{ENTER}
WinWaitActive, bbMPEG
Send, %PATH%%EPISODE%\\%EPISODE%.MP2
Send, {ENTER}
WinWaitActive, MPEG
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}
Send, t
SetTitleMatchMode, 2
WinWaitActive, bbMPEG, &Ok
Send, {ESC}
WinClose, AVI2MPG2
; -------------------------------- DELETING --------------------------------
RunWait, %DEL% %HSPA%%EPISODE%.00.AVI
RunWait, %DEL% %HSPA%%EPISODE%.MPV
RunWait, %DEL% %HSPA%%EPISODE%.MP4
RunWait, %DEL% %HSPA%%EPISODE%.00.VAF
RunWait, %DEL% %HSPA%%EPISODE%.ECL
RunWait, %DEL% %PATH%%EPISODE%\\%EPISODE%.MP2
IfExist, %HSPA%%EPISODE%.01.AVI, RunWait, %DEL% %HSPA%%EPISODE%.01.AVI
IfExist, %HSPA%%EPISODE%.02.AVI, RunWait, %DEL% %HSPA%%EPISODE%.02.AVI
IfExist, %HSPA%%EPISODE%.03.AVI, RunWait, %DEL% %HSPA%%EPISODE%.03.AVI
IfExist, %HSPA%%EPISODE%.04.AVI, RunWait, %DEL% %HSPA%%EPISODE%.04.AVI
IfExist, %HSPA%%EPISODE%.05.AVI, RunWait, %DEL% %HSPA%%EPISODE%.05.AVI
IfExist, %HSPA%%EPISODE%.06.AVI, RunWait, %DEL% %HSPA%%EPISODE%.06.AVI
IfExist, %HSPA%%EPISODE%.07.AVI, RunWait, %DEL% %HSPA%%EPISODE%.07.AVI
IfExist, %HSPA%%EPISODE%.08.AVI, RunWait, %DEL% %HSPA%%EPISODE%.08.AVI
IfExist, %HSPA%%EPISODE%.09.AVI, RunWait, %DEL% %HSPA%%EPISODE%.09.AVI
IfExist, %HSPA%%EPISODE%.10.AVI, RunWait, %DEL% %HSPA%%EPISODE%.10.AVI
; -------------------------------- LOOP -------------------------------------
StringRight, NUMBER, EPISODE, 2
IfEqual, TOTAL, %NUMBER%, Goto, Bye
EnvAdd, NUMBER, 1
FileReadLine, EPY, %EPI%, %NUMBER%
StringRight, EPNUM, EPY, 2
SetEnv, EPISODE, Ep%EPNUM%
Goto, MySVCD
; -------------------------------- END --------------------------------------
Bye:
Exit
Ok. Yea, its long as hell ;p. So what does it all do? Well that allows you to setup say 50 episodes to encode, press 1 button, walk away and come back a few days later and have 50 fully muxed SVCD episodes on your hard drive. Pretty sweet eh? The reason I created it was that encoding a 20 minute episode of something takes little or no time and all the intermediate steps are a real pain in the ass to do. So, just put all the crap in a script and away you go.
NOTES on this script:
The top portion with the path names are the locations to the programs you need.
1. Get CCE and set it up for 3 pass VBR and configure all your other settings in there.
2. Ya need to install vfapi.
3. Get ahold of pulldown.exe
4. Find a delete.exe file
5. CREATE a times file. The file should look like:
01-45
02-45
03-45
04-45
05-45
06-45
07-45
08-45
09-45
10-45
11-45
12-53
13-53
14-53
15-53
16-53
17-53
18-45
19-45
20-45
etc
** this is ep 01, 02, 03, etc and the time next to it is the time for the TOTAL amount of time that will be placed on *1* CD. So if you are doing two 20 minute episodes, your time will be *40* minutes next to each of those two episodes. Simple.
6. Get BBC (Bearson's Bitrate Calculator)
7. Virtualdub obviously.
** NOTE-a: This script is NOT setup for DIVX5 OR DIVX4 installed. If they are installed, either delete them or edit the macro's {DOWN} option to pass through them during the codec selection
** NOTE-b: DO install divx3.11, it's setup for that so it must be installed, and this macro USES the HUFFY codec, so install that and set it up. (AVG size for a huffy avi is 5gb for 20mins)
8. The "C:\\ep" folder is an empty folder where the filestorage for TEMPORARY files. If you are dealing with 20 minute episodes, the segmented huffy avis will be ~5gb so make sure that directory location has space.
9. Episode.txt should appear as follows:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
etc
*** this is just a VERY generic counter system i used. If you want to encode a particular episode, make sure the list counts UP to that episode. Just make this episode txt file one time.
10. Install BBMPEG for muxing the files
11. I use SSA scripts for subtitles on these episodes so you will need to put this filter in your virtualdub folder. like i explained before, DON'T install any filters, just put them in the vdub root folder. If you place them in the plugin folder then the macro will bypass them unless you re-write it.
12. SetEnv, PATH, f:\\AnimeSeries\\
Just sets the location to the folder where the episodes are going to be stored and where the vobs are. This system will count using the
"SetEnv, EPISODE, Ep16" & "SetEnv, TOTAL, 20" commands. So in your AnimeSeries folder you would need folders called
Ep16
Ep17
Ep18
Ep19
Ep20
If you are not 100% confused by now ;p, the "episode" and "total" variables list your starting episode and ending episode that you will be encoding. If you were doing a FULL series you might want to start at 01 and end at 26. But you see how it works now. Also, this is another reason for the Episode.txt file and the Times.txt file. The correct numbers are pulled from those txt documents and implemented via these variable commands.
13. Finally, this script uses avisynth scripts in virtualdub. Your basic script can look like anything. Mine looks like:
LoadPlugin("C:\Virtualdub\MPEG2DEC.dll")
LoadPlugin("C:\Virtualdub\IVTC.dll")
LoadPlugin("C:\IVTC\it.dll")
mpeg2source("F:\Anime\SeriesXYZ\ep04\ep04.d2v")
IT (fps=24,ref="TOP",blend=false)
14. And one last note. In each Ep01 Ep02 Ep03 folder, you will need to name the d2v file "Epxx.d2v" xx=01 02 03 etc. The WAV file "Epxxj.wav" the ssa file "epxx-perfect.ssa" and the avs file "epxx.avs"
** If your series is dubbed and you have no subs, you *could* just delete the ssa portion out of the macro, but i would suggest leaving it in case of future need. Instead, just create a BLANK SSA file (open an existing one and delete all the lines). That will allow you to have a dubbed episode. Also snag vobsub. It is really nifty now that it allows you to OCR which p0wns subrips's ocr. heh VOBSUB OCR = GOD. And then just save the output as a .SSA. SO, SSA creation is a piece of cake. The benefit is that you can really modify the fonts or any other aspect of the subs much easier than a crappy srt.