All the AVISynth plugins can be found HERE
CVD AVISynth script
CVD AVISynth script for AVI captures
Dos bat file for Stargate SG1
Dos bat file for Gundam Wing
Vobsub config file
My base CVD AVISynth script I
use
# sapporarn@yahoo.com
# Ejoc's CVD 352x480 MPEG2 AVISynth Script
LoadPlugin("c:\media\avs\MPEG2dec3.dll")
LoadPlugin("c:\media\avs\decomb.dll")
#LoadPlugin("c:\media\avs\vsfilter.dll")
MPEG2source(".d2v")
Telecide()
#16:9 no letterbox
#crop(0,60,720,360)
#LanczosResize(352,360)
#addborders(0,60,0,60)
#4:3
LanczosResize(352,480)
ConvertToRGB32()
#vobsub("vts_01_0")
First I load the plugins I'll need, MPEG2dec3 lets me read DVD2AVI
project files, and decomb is for fixing 24fps movies that were
converted to 30fps poorly (Anime, HK action movies, to name a few). I
use vsfilter if the movie has subtitles. I load the d2v project
with MPEG2source(). Then I use Telecide to fix IVTC, if you look
at your source frame by frame and see that it will have 2 frames with
really bad interlacing then 3 frames that look fine, and that cycle
repeats, Telecide() removes that. If you dont have that, comment
out the line by adding a '#' to the front. I use AVISynth to do
my resizing, as I found it worked faster then TMPGEnc. If your
source is widescreen, but when running DVD2AVI you found that it was
actually 4:3 with black bars across the top and bottom, you can remove
them with the crop command, I only do this if you see alot of noise in
those black bars, or if they dont really look black. To add the
black bars on the top and bottom I use the LanczosResize() to make the
picture the right size, and the addborders() to actually add the
borders. And I convert it to RGB for TMPGEnc and slap the
subtitles on with vobsub().
My base CVD Capture
AVISynth Script
# Video Capture to CVD 352x480 MPEG2
# Ejoc
LoadPlugin("c:\media\avs\convolution3d.dll")
LoadPlugin("c:\media\avs\decomb.dll")
SegmentedAviSource("Capture.avi") # For Capture.00.avi -> Capture.XX.avi
Amplify(0.5) # Volume on my is very high
Telecide() # Fix Tecline
#Crop() # If you need to crop, do it here
LanczosResize(320,480)
#LanczosResize(352,480) # Remove the AddBorders if you use this
Convolution3D(0,32,128,32,128,10,0) # Improve picture quality
AddBorders(16,0,16,0) # Add border to make it 352x480
ConvertToRGB32() # Make TMPGEnc happy
My capture card blows, and I can
only capture in 320x240, the results actually arent that bad but thats
why I do an "odd" resize, basicly I'm leaving the horizontal width the
same, so no horiztonal resize, and im exactly doubling the height, this
doesnt cause distortion. Use the other resize if you dont have
this problem and remove the addborders()
Now we move on to... DOS Batch files! I use
batch files to
automate my backing-up. Much like the app DVD2SVCD, but in a
batch file. This is my Stargate SG1 Bat
file. Pretty much all the apps we use have command-line
interfaces / versions. UPDATED
9/24/03 I added file checking to
determine if its 4 or 5 episodes automaticly
REM Version 1.1
@REM Set Program Locations
@SET DVD2AVI=C:\PROGRA~1\DVD\DVD2AV~1\dvd2avi
@REM http://www.dvd2dvd.org/DVD2AVI%201.76%20Command-Line%201.05.zip
@SET DVDDECRYPTER=c:\progra~1\DVD\DVDDec~2\DVDDec~1.exe
@SET VCDXBUILD=c:\progra~1\dvd\vcdeasy\vcdimager\vcdxbuild.exe
@SET NAUTOW=c:\progra~1\nautow\nautow.exe
@REM http://www.stokebloke.com/software/nautow_0.0.4.exe
REM @SET TMPGENC=C:\PROGRA~1\DVD\TMPGEN~1.152\tmpgenc.exe
@SET TMPGENC=C:\PROGRA~1\DVD\TMPGENC2.5\tmpgenc.exe
@set WORKINGDIR=c:\media
REM Rip
start /w %DVDDECRYPTER% /MODE IFO /SRC E: /START /CLOSE /VTS 1 /PGC 1 /DEST "%WORKINGDIR%\sg1\"
start /w %DVDDECRYPTER% /MODE IFO /SRC E: /START /CLOSE /VTS 1 /PGC 2 /DEST "%WORKINGDIR%\sg2\"
start /w %DVDDECRYPTER% /MODE IFO /SRC E: /START /CLOSE /VTS 1 /PGC 3 /DEST "%WORKINGDIR%\sg3\"
start /w %DVDDECRYPTER% /MODE IFO /SRC E: /START /CLOSE /VTS 1 /PGC 4 /DEST "%WORKINGDIR%\sg4\"
start /w %DVDDECRYPTER% /MODE IFO /SRC E: /START /CLOSE /VTS 1 /PGC 5 /DEST "%WORKINGDIR%\sg5\"
REM Make D2V and WAV Files
:convert
if exist %WORKINGDIR%\sg1\vts_01_1.vob start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\sg1\vts_01_1.vob] -OF=[%WORKINGDIR%\sg1\sg] -exit
if exist %WORKINGDIR%\sg2\vts_01_1.vob start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\sg2\vts_01_1.vob] -OF=[%WORKINGDIR%\sg2\sg] -exit
if exist %WORKINGDIR%\sg3\vts_01_1.vob start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\sg3\vts_01_1.vob] -OF=[%WORKINGDIR%\sg3\sg] -exit
if exist %WORKINGDIR%\sg4\vts_01_1.vob start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\sg4\vts_01_1.vob] -OF=[%WORKINGDIR%\sg4\sg] -exit
if exist %WORKINGDIR%\sg5\vts_01_1.vob start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\sg5\vts_01_1.vob] -OF=[%WORKINGDIR%\sg5\sg] -exit
REM Make the AVISynth scripts
:makeavs
echo LoadPlugin("c:\media\avs\MPEG2dec3.dll") > sg.avs
echo LoadPlugin("c:\media\avs\decomb.dll") >> sg.avs
echo MPEG2source("sg.d2v") >> sg.avs
echo Telecide() >> sg.avs
echo LanczosResize(352,360) >> sg.avs
echo addborders(0,60,0,60) >> sg.avs
echo ConvertToRGB32() >> sg.avs
copy sg.avs %WORKINGDIR%\sg1
copy sg.avs %WORKINGDIR%\sg2
copy sg.avs %WORKINGDIR%\sg3
copy sg.avs %WORKINGDIR%\sg4
copy sg.avs %WORKINGDIR%\sg5
del sg.avs
REM Make the MPEGS
:encode
set TBEFILE=c:\media\stargates4.tbe
if exist %WORKINGDIR%\sg5\vts_01_1.vob set TBEFILE=c:\media\stargates5.tbe
start %TMPGENC% %TBEFILE% /batch
REM Close TMPGEnc when done
%NAUTOW% WI00:"TMPGEnc" WI01:"Result" BT00:"OK" WI02:"Project" BT00:"Cancel" WI00:"TMPGEnc" SY01: QUIT:
REM Make the Bin/Cue files
:build
%VCDXBUILD% -p -b %WORKINGDIR%\sg1\sg.bin -c %WORKINGDIR%\sg1\sg.cue %WORKINGDIR%\sg1\sg.xml
%VCDXBUILD% -p -b %WORKINGDIR%\sg2\sg.bin -c %WORKINGDIR%\sg2\sg.cue %WORKINGDIR%\sg2\sg.xml
%VCDXBUILD% -p -b %WORKINGDIR%\sg3\sg.bin -c %WORKINGDIR%\sg3\sg.cue %WORKINGDIR%\sg3\sg.xml
%VCDXBUILD% -p -b %WORKINGDIR%\sg4\sg.bin -c %WORKINGDIR%\sg4\sg.cue %WORKINGDIR%\sg4\sg.xml
%VCDXBUILD% -p -b %WORKINGDIR%\sg5\sg.bin -c %WORKINGDIR%\sg5\sg.cue %WORKINGDIR%\sg5\sg.xml
REM Shutdown
C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows
I can pop one of my SG1 DVDs into
my computer, double click this bat file, and wakeup in the morning with
the bin/cue files ready to be burned. I use Window$ 98, and I
have to set the inital memory on the sg.bat file to 4096. So I
had to right click sg.bat -> Properties -> Memory -> Initial
environment -> 4096. Otherwise it wont work.
This is for Gundam Wing, Its
alittle different
@SET DVD2AVI=C:\PROGRA~1\DVD\DVD2AV~1\dvd2avi
@SET DVDDECRYPTER=c:\progra~1\DVD\DVDDec~2\DVDDec~1.exe
@SET TMPGENC=C:\PROGRA~1\DVD\TMPGEN~1.152\tmpgenc.exe
@SET VCDXGEN=c:\progra~1\dvd\vcdeasy\vcdimager\vcdxgen.exe
@SET VCDXBUILD=c:\progra~1\dvd\vcdeasy\vcdimager\vcdxbuild.exe
@SET WORKINGDIR=c:\media\gw
@SET GW1=08
@SET GW2=09
@SET GW3=16
@SET GW4=17
@SET GW5=18
REM RIP THE FILES
start /w %DVDDECRYPTER% /MODE FILE /SRC E: /START /CLOSE /OVERWRITE YES /DEST "%WORKINGDIR%" /FILES "VTS_%GW1%*" "VTS_%GW2%*" "VTS_%GW3%*" "VTS_%GW4%*" "VTS_%GW5%*"
REM CONVERT TO D2V AND WAV
:convert
start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\vts_%GW1%_1.vob] -OF=[%WORKINGDIR%\gw1] -exit
start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\vts_%GW2%_1.vob] -OF=[%WORKINGDIR%\gw2] -exit
start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\vts_%GW3%_1.vob] -OF=[%WORKINGDIR%\gw3] -exit
start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\vts_%GW4%_1.vob] -OF=[%WORKINGDIR%\gw4] -exit
start /w %DVD2AVI% -IA=1 -Fo=0 -CS=2 -YR=1 -TN=1 -CF=4 -DRC=2 -DSD=1 -DD=3 -MA=2 -AIF=[%WORKINGDIR%\vts_%GW5%_1.vob] -OF=[%WORKINGDIR%\gw5] -exit
REM Make Subtitle Files
:subs
echo %WORKINGDIR%\VTS_%GW1%_0.IFO > %WORKINGDIR%\gw1.txt
echo %WORKINGDIR%\gw1sub >> %WORKINGDIR%\gw1.txt
echo %WORKINGDIR%\VTS_%GW2%_0.IFO > %WORKINGDIR%\gw2.txt
echo %WORKINGDIR%\gw2sub >> %WORKINGDIR%\gw2.txt
echo %WORKINGDIR%\VTS_%GW3%_0.IFO > %WORKINGDIR%\gw3.txt
echo %WORKINGDIR%\gw3sub >> %WORKINGDIR%\gw3.txt
echo %WORKINGDIR%\VTS_%GW4%_0.IFO > %WORKINGDIR%\gw4.txt
echo %WORKINGDIR%\gw4sub >> %WORKINGDIR%\gw4.txt
echo %WORKINGDIR%\VTS_%GW5%_0.IFO > %WORKINGDIR%\gw5.txt
echo %WORKINGDIR%\gw5sub >> %WORKINGDIR%\gw5.txt
echo 1 > a.txt
echo 0 >> a.txt
echo 0 >> a.txt
echo ALL >> a.txt
echo CLOSE >> a.txt
copy %WORKINGDIR%\gw1.txt+a.txt %WORKINGDIR%\gw1.txt
copy %WORKINGDIR%\gw2.txt+a.txt %WORKINGDIR%\gw2.txt
copy %WORKINGDIR%\gw3.txt+a.txt %WORKINGDIR%\gw3.txt
copy %WORKINGDIR%\gw4.txt+a.txt %WORKINGDIR%\gw4.txt
copy %WORKINGDIR%\gw5.txt+a.txt %WORKINGDIR%\gw5.txt
del a.txt
start /w rundll32 vobsub.dll,Configure %WORKINGDIR%\gw1.txt
start /w rundll32 vobsub.dll,Configure %WORKINGDIR%\gw2.txt
start /w rundll32 vobsub.dll,Configure %WORKINGDIR%\gw3.txt
start /w rundll32 vobsub.dll,Configure %WORKINGDIR%\gw4.txt
start /w rundll32 vobsub.dll,Configure %WORKINGDIR%\gw5.txt
REM Make the MPEGS
:encode
%TMPGENC% c:\media\gw.tbe /batch
REM goto leftovers
:noleftovers
%VCDXGEN% --iso-volume-label=GUNDAM --type=svcd --update-scan-offsets -o %WORKINGDIR%\gw1_2.xml %WORKINGDIR%\gw1.mpg %WORKINGDIR%\gw2.mpg
%VCDXBUILD% -b %WORKINGDIR%\gw1_2.bin -c %WORKINGDIR%\gw1_2.cue %WORKINGDIR%\gw1_2.xml
%VCDXGEN% --iso-volume-label=GUNDAM --type=svcd --update-scan-offsets -o %WORKINGDIR%\gw3_4.xml %WORKINGDIR%\gw3.mpg %WORKINGDIR%\gw4.mpg
%VCDXBUILD% -b %WORKINGDIR%\gw3_4.bin -c %WORKINGDIR%\gw3_4.cue %WORKINGDIR%\gw3_4.xml
goto sd
:leftovers
%VCDXGEN% --iso-volume-label=GUNDAM --type=svcd --update-scan-offsets -o %WORKINGDIR%\gw5_1.xml gw5.mpg %WORKINGDIR%\gw1.mpg
%VCDXBUILD% -b %WORKINGDIR%\gw5_1.bin -c %WORKINGDIR%\gw5_1.cue %WORKINGDIR%\gw5_1.xml
%VCDXGEN% --iso-volume-label=GUNDAM --type=svcd --update-scan-offsets -o %WORKINGDIR%\gw2_3.xml %WORKINGDIR%\gw2.mpg %WORKINGDIR%\gw3.mpg
%VCDXBUILD% -b %WORKINGDIR%\gw2_3.bin -c %WORKINGDIR%\gw2_3.cue %WORKINGDIR%\gw2_3.xml
%VCDXGEN% --iso-volume-label=GUNDAM --type=svcd --update-scan-offsets -o %WORKINGDIR%\gw4_5.xml %WORKINGDIR%\gw4.mpg %WORKINGDIR%\gw5.mpg
%VCDXBUILD% -b %WORKINGDIR%\gw1_2.bin -c %WORKINGDIR%\gw1_2.cue %WORKINGDIR%\gw1_2.xml
goto sd
REM Shutdown
:sd
C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows
The Gundam Wing discs, arent
authored the same, so you need to start DVDDecrypter and find out which
VTS_XX.vobs you need to rip. Just put the numbers in the @SET
GW1=08, make sure you put the 0 in if its a single digit number: 08 not
8. Also, they put 5 episodes on a disc, I like to make my CVDs
hold 2 per CD-R, this leaves an extra one, so I burn 1&2 and
3&4 and hang on to 5. Then when I do the next disc, I burn
5(from the last disc)&1 and 2&3 and 4&5. To deal with
this I have the noleftovers and leftovers, if you dont have episode 5,
you use it like it is, but if you do, thats when you remove the REM
after TMPGenc so it reads "goto leftovers." Another difference is
I run vcdxgen to create the .xml files, with the stargates I had a
static xml file I'd reuse. And I need to create subtitles, you
can run vobsub configure from the command line, you just need to have a
text file telling it what to do, thats what all the echos are doing,
making those text files.
Vobsub Configure "Auto File"
C:\VTS_01_0.IFO
C:\OUTFILE
1
0
ALL
CLOSE
Checkout vobsub-auto.txt in your
vobsub\Docs directory
. But basicly it goes
IFO File
Outputfile
Chain #
Angle #, 0 for all
Stream # ALL for all
Exit when done
And to run it from the command line you use:
start /w rundll32 vobsub.dll,Configure <Auto File>
Back