Difference between revisions of "Anri-chan/Source/sample.bat"

From SDA Knowledge Base

Jump to: navigation, search
(shall we keep this zombie on its feet a bit longer?)
Line 3: Line 3:
  
 
(SET anri_dir=%~dp0)
 
(SET anri_dir=%~dp0)
XCOPY /Y /Q "%anri_dir%anridesktoploc.bat" "%appdata%"
+
(SET dgmpgdec_dir=dgmpgdec149)
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /V "Desktop" | "%anri_dir%sed" -n s/.\+REG_SZ.\+\\\(.\+\)[^\\]*/\1/gp >> "%appdata%\anridesktoploc.bat"
+
XCOPY /Y /Q "%anri_dir%anridesktoploc.bat.bak" "%anri_dir%anridesktoploc.bat"
CALL "%appdata%\anridesktoploc.bat"
+
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /V "Desktop" | "%anri_dir%sed" -n s/.\+REG_SZ.\+\\\(.\+\)[^\\]*/\1/gp >> "%anri_dir%anridesktoploc.bat"
SET DESKTOP=%HOMEPATH%\%DESKTOP%
+
CALL "%anri_dir%anridesktoploc.bat"
DEL "%appdata%\anridesktoploc.bat"
+
SET DESKTOP="%HOMEPATH%\%DESKTOP%"
 
CD "%DESKTOP%"
 
CD "%DESKTOP%"
  
Line 29: Line 29:
  
 
if exist sample.avs del sample.avs
 
if exist sample.avs del sample.avs
"%anri_dir%dgmpgdec149\dgindex.exe" -AIF=[%driveletter%:\VIDEO_TS\VTS_0%chapternumber%_1.VOB] -OM=3 -OF=[sample] -AT=[%anri_dir%dgmpgdec149\template.avs] -exit
+
echo loadplugin^("%anri_dir%%dgmpgdec_dir%\DGDecode.dll"^) > "%anri_dir%%dgmpgdec_dir%\template.avs"
 +
echo audiodub^(mpeg2source^("__vid__",upconv=1^),wavsource^("__aud__"^)^) >> "%anri_dir%%dgmpgdec_dir%\template.avs"
 +
echo trim^(2700,3000^) >> "%anri_dir%%dgmpgdec_dir%\template.avs"
 +
echo converttoyv12 >> "%anri_dir%%dgmpgdec_dir%\template.avs"
  
echo trim(2700,3000) >> sample.avs
+
"%anri_dir%%dgmpgdec_dir%\dgindex.exe" -AIF=[%driveletter%:\VIDEO_TS\VTS_0%chapternumber%_1.VOB] -OM=3 -OF=[sample] -AT=[%anri_dir%%dgmpgdec_dir%\template.avs] -exit
echo converttoyv12 >> sample.avs
+
  
 
"%anri_dir%x264.exe" --direct auto --ref 8 --mixed-refs --no-fast-pskip --bframes 16 --b-rdo --bime --weightb --subme 7 --trellis 2 --analyse all --qpmin 0 --me umh --threads auto --thread-input --progress --no-psnr --output sample.mp4 sample.avs
 
"%anri_dir%x264.exe" --direct auto --ref 8 --mixed-refs --no-fast-pskip --bframes 16 --b-rdo --bime --weightb --subme 7 --trellis 2 --analyse all --qpmin 0 --me umh --threads auto --thread-input --progress --no-psnr --output sample.mp4 sample.avs
Line 40: Line 42:
 
set chapternumber=
 
set chapternumber=
  
del sample.avs | del sample.d2v | del sample*.wav
+
del sample.avs | del sample.d2v | del sample*.wav | del "%anri_dir%%dgmpgdec_dir%\template.avs"
  
 +
echo.
 
echo Finished! You will find sample.mp4 on your desktop. Feel free to rename it to something more descriptive like nameofgame_sample.mp4.
 
echo Finished! You will find sample.mp4 on your desktop. Feel free to rename it to something more descriptive like nameofgame_sample.mp4.
 
pause
 
pause
 
@echo on
 
@echo on
 
</nowiki></pre>
 
</nowiki></pre>

Revision as of 20:44, 25 November 2007

@echo off

(SET anri_dir=%~dp0)
(SET dgmpgdec_dir=dgmpgdec149)
XCOPY /Y /Q "%anri_dir%anridesktoploc.bat.bak" "%anri_dir%anridesktoploc.bat"
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /V "Desktop" | "%anri_dir%sed" -n s/.\+REG_SZ.\+\\\(.\+\)[^\\]*/\1/gp >> "%anri_dir%anridesktoploc.bat"
CALL "%anri_dir%anridesktoploc.bat"
SET DESKTOP="%HOMEPATH%\%DESKTOP%"
CD "%DESKTOP%"

set done=
set driveletter=
:driveletter
set /P driveletter=DVD Drive Letter: 
if not "%driveletter%"=="" (
set done=yes
)
if not "%done%"=="yes" GOTO driveletter

set done=
set chapternumber=
:chapternumber
set /P chapternumber=DVD Chapter Number: 
if not "%chapternumber%"=="" (
set done=yes
)
if not "%done%"=="yes" GOTO chapternumber

if exist sample.avs del sample.avs
echo loadplugin^("%anri_dir%%dgmpgdec_dir%\DGDecode.dll"^) > "%anri_dir%%dgmpgdec_dir%\template.avs"
echo audiodub^(mpeg2source^("__vid__",upconv=1^),wavsource^("__aud__"^)^) >> "%anri_dir%%dgmpgdec_dir%\template.avs"
echo trim^(2700,3000^) >> "%anri_dir%%dgmpgdec_dir%\template.avs"
echo converttoyv12 >> "%anri_dir%%dgmpgdec_dir%\template.avs"

"%anri_dir%%dgmpgdec_dir%\dgindex.exe" -AIF=[%driveletter%:\VIDEO_TS\VTS_0%chapternumber%_1.VOB] -OM=3 -OF=[sample] -AT=[%anri_dir%%dgmpgdec_dir%\template.avs] -exit

"%anri_dir%x264.exe" --direct auto --ref 8 --mixed-refs --no-fast-pskip --bframes 16 --b-rdo --bime --weightb --subme 7 --trellis 2 --analyse all --qpmin 0 --me umh --threads auto --thread-input --progress --no-psnr --output sample.mp4 sample.avs

set done=
set driveletter=
set chapternumber=

del sample.avs | del sample.d2v | del sample*.wav | del "%anri_dir%%dgmpgdec_dir%\template.avs"

echo.
echo Finished! You will find sample.mp4 on your desktop. Feel free to rename it to something more descriptive like nameofgame_sample.mp4.
pause
@echo on
Personal tools