@Echo Off REM This sample batch script demonstrates a very simple way to customize REM your experience with the DivX264 Alpha Encoder. REM REM It uses some simple commands built into the command interpreter REM to enable one pass or multipass encoding using any bitrate and REM filename you want. Why not try customizing this script with your own REM settings? REM REM Type any of the following into the command prompt to get more help: REM "CMD /?", "Set /?", "If /?", "Goto /?" REM Check that we've got the number of command line arguments we expected REM (e.g. three, and not more). If we don't, echo some help messages and exit If NOT "%3"=="" (If "%4"=="" Goto Encode) Echo. Echo Please pass the following arguments on the command line: Echo. Echo ^ ^ ^ Echo. Echo Do not include the ".avs" extension when giving the AVS filename. Echo. Goto Finish :Encode Set PassesRemaining=%1 If %PassesRemaining% EQU 1 Goto OnePass :MultiPass Echo. Echo Starting a multi-pass encoding, %PassesRemaining% passes remain... Echo Target bitrate : %2 kbps Echo Source filename : %3.avs Echo. If %PassesRemaining% EQU 1 ( DivX264 -frames 10 -br %2 -npass 1 -sf "%3.dat" -i "%3.avs" -o "%3.264" ) else ( DivX264 -frames 10 -br %2 -npass 1 -sf "%3.dat" -i "%3.avs" -o "%3.264" ) If ERRORLEVEL 1 Goto Error Set /A PassesRemaining=%PassesRemaining% - 1 If %PassesRemaining% EQU 0 Goto Finish Goto MultiPass :OnePass Echo. Echo Starting a one-pass encoding... Echo Target bitrate : %2 kbps Echo Source filename : %3.avs Echo. DivX264 -frames 10 -br %2 -i "%3.avs" -o "%3.264" If ERRORLEVEL 1 Goto Error Goto Finish :Error Set /A ThisPass=(%1+1)-%PassesRemaining% Echo. Echo Oops! Looks like there was an error on pass %ThisPass% / %1! Set ThisPass= :Finish Set PassesRemaining=