batch encoding

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


ふむふむ。バッチだけでできそうやねぇ。
勉強せんとな。

| | PCカテゴリ | コメント(0)

コメントする

Powered by Movable Type 4.261