http://forum.handbrake.fr/viewtopic.php ... ipt#p86759
I was encoding massive amounts of .mov and .avi but if i ran the script on the same drive from multiple machines handbrake would crash (most likely because it couldn't find the file or it was locked)
With a little tweaking i was able to get all of the machines encoding on the same drive (recursively) see below... Big ups barakaspeed!
- not that it matters but the same drive is mounted to W: on all the machines (i really wish i could throw another into the mix!)
Code: Select all
@ECHO off
SET WorkingPath=%CD%
SET FileExt=*.mov ::PICK YOUR POISON!
SET PathToHandbrake=C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe
SET HandbrakeArgs=-f mp4 -X 624 --loose-anamorphic -e x264 -q 20 -a 1,1 -E faac,ac3 -6 dpl2,auto -R 48,Auto -B 160,auto -D 0.0,0.0 -x cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subq=6:weightb=0 -v 1
FOR /R "%WorkingPath%" %%a IN (%FileExt%) DO (
IF EXIST %%a (
REN "%%~dpa%%~nxa" "%%~nxa.processing" ::TAKE FILE OUT OF QUEUE
"%PathToHandbrake%" -i "%%~dpa%%~nxa.processing" -o "%%~dpa%%~na.m4v" %HandbrakeArgs% ::ENCODE FILE
REN "%%~dpa%%~nxa.processing" "%%~nxa.delete" ::RENAME FILE FOR LATER DELETION
)
)
PAUSE