PhillipWyllie
1st December 2007, 02:13
I've now got the batch-file bug, trying to make batch-files for every repetative task that I do. One such task is making avisynth avs files that have roughly the same content over, and over again. Below is the batch file that I've come up with to automate this process. You'll notice that's it's for NTSC video to PAL avs's:BEGIN
@echo off
TITLE 2avs
if "%~1"=="" goto NEEDFILE
echo This will create PAL avs files from selected video
echo.
pause
echo.
:START
if /i "%~1"=="" goto END
echo ------------------------------------------------------------------------
echo Using: %~nx1
echo.
echo #2avs generated avs file >"%~d1%~p1%~n1_v.avs"
echo. >>"%~d1%~p1%~n1_v.avs"
echo avisource("%~1") >>"%~d1%~p1%~n1_v.avs"
echo fdecimate(rate=23.976) >>"%~d1%~p1%~n1_v.avs"
echo assumefps(25) >>"%~d1%~p1%~n1_v.avs"
echo lanczos4resize(704,576) >>"%~d1%~p1%~n1_v.avs"
echo converttoyuy2() >>"%~d1%~p1%~n1_v.avs"
echo Created: %~n1_v.avs
shift
goto START
:NEEDFILE
echo You must specify a video file(s)
echo.
pause
exit
:END
echo ------------------------------------------------------------------------
Echo All done...
echo.
pause
exitI have 2 questions regarding this.
What would be nice is to be able to determine the frame-rate and output the appropriate script: fdecimate(rate=23.976) for 29.970 video, assumefps(25) for 23.976 video, and no rate-change for 25 video. Could this be possible(making a call to some windows function/program etc-similar to say what Vdub etc does)?
This is more of a batch-file question that I haven't been able to find the answer, is it possible to have the user make choises in a batch-file?
Thanks.
@echo off
TITLE 2avs
if "%~1"=="" goto NEEDFILE
echo This will create PAL avs files from selected video
echo.
pause
echo.
:START
if /i "%~1"=="" goto END
echo ------------------------------------------------------------------------
echo Using: %~nx1
echo.
echo #2avs generated avs file >"%~d1%~p1%~n1_v.avs"
echo. >>"%~d1%~p1%~n1_v.avs"
echo avisource("%~1") >>"%~d1%~p1%~n1_v.avs"
echo fdecimate(rate=23.976) >>"%~d1%~p1%~n1_v.avs"
echo assumefps(25) >>"%~d1%~p1%~n1_v.avs"
echo lanczos4resize(704,576) >>"%~d1%~p1%~n1_v.avs"
echo converttoyuy2() >>"%~d1%~p1%~n1_v.avs"
echo Created: %~n1_v.avs
shift
goto START
:NEEDFILE
echo You must specify a video file(s)
echo.
pause
exit
:END
echo ------------------------------------------------------------------------
Echo All done...
echo.
pause
exitI have 2 questions regarding this.
What would be nice is to be able to determine the frame-rate and output the appropriate script: fdecimate(rate=23.976) for 29.970 video, assumefps(25) for 23.976 video, and no rate-change for 25 video. Could this be possible(making a call to some windows function/program etc-similar to say what Vdub etc does)?
This is more of a batch-file question that I haven't been able to find the answer, is it possible to have the user make choises in a batch-file?
Thanks.