2007-04-18, 11:50 PM
this week, I discovered that if 4 instances of mencoder are running at a time, the server decides to clock out and go home.
not everything I record is transcoded, but this week there was a marathon of shows that are.
how can I have the batch file check to see if it is already running??
I want to have the batch file check to see if mencoder.exe is running as a process.
if it is, I want it to wait a certian amount of time and check again.
just for kicks, here is my current postprocessing.bat
not everything I record is transcoded, but this week there was a marathon of shows that are.
how can I have the batch file check to see if it is already running??
I want to have the batch file check to see if mencoder.exe is running as a process.
if it is, I want it to wait a certian amount of time and check again.
just for kicks, here is my current postprocessing.bat
Code:
@echo off
cd c:\program files\devnz\gbpvr
sleep.exe 120
rem adds recorded show to RECORDED list
rectracker %1
sleep.exe 5
rem removed pending shows that are on RECORDED list
rectracker -purge
sleep.exe 5
rem ---------------------------------------------------
rem Checks available diskspace on the recordings drive and sends text message to my phone if it gets too low
cd c:\program files\devnz\gbpvr\disklimit
disklimit.exe -disk f -limit 25gb -messagefile PVRmessage.txt
rem ---------------------------------------------------
cd c:\program files\devnz\gbpvr
rem get first 8 letters of filename
SET RECORDING=%~n1
SET SHOW=%RECORDING:~0,8%
rem sends file to appropriate commands based on first 8 of filename
IF "%SHOW%"=="Battlest" GOTO GALACTICA
IF "%SHOW%"=="It Takes" GOTO THIEF
IF "%SHOW%"=="The Sara" GOTO SARAH
IF "%SHOW%"=="Bullrun_" GOTO BULLRUN
rem IF "%SHOW%"=="Planet E" GOTO PLANET
rem If none are true, Batch exits
GOTO END
rem ---------------------------------------------------
rem Commands for Battlestar Galactica
:GALACTICA
rem Transcodes the show and saves to G:\TEMP
start /low /wait C:\Progra~1\mplayer\mencoder.exe %1 -ovc xvid -xvidencopts bitrate=900:me_quality=6:chroma_me:noqpel:chroma_opt:vhq=4:bvhq=1:trellis:hq_ac:gmc:quant_type=mpeg:max_key_interval=240 -oac mp3lame -lameopts mode=2:cbr:br=128 -vf filmdint,softskip,scale=720:480,hqdn3d=3:2:3:3 -ofps 24000/1001 -o "G:\TEMP\%RECORDING%.avi"
rem Moves file to proper directory on website
MOVE "G:\TEMP\%RECORDING%.avi" "G:\HTTP\htdocs\shows\battlestar\%RECORDING%.avi"
GOTO WEBFREE
rem ---------------------------------------------------
rem Commands for It Takes a Thief
:THIEF
rem Transcodes the show while cutting out commercials and saves to G:\TEMP
if exist %~dpn1.edl copy %~dpn1.edl %~dpn1.ptl
start /low /wait C:\Progra~1\mplayer\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -xvidencopts bitrate=900:me_quality=6:chroma_me:noqpel:chroma_opt:vhq=4:bvhq=1:trellis:hq_ac:gmc:quant_type=mpeg:max_key_interval=240 -oac mp3lame -lameopts mode=2:cbr:br=128 -vf filmdint,softskip,scale=720:480,hqdn3d=3:2:3:3 -ofps 24000/1001 -o "G:\TEMP\%RECORDING%.avi"
rem Moves file to proper directory on website
MOVE "G:\TEMP\%RECORDING%.avi" "G:\HTTP\htdocs\shows\ItTakesAThief\%RECORDING%.avi"
GOTO WEBFREE
rem ---------------------------------------------------
rem Commands for The Sarah Silverman Program
:SARAH
rem Transcodes the show while cutting out commercials and saves to G:\TEMP
if exist %~dpn1.edl copy %~dpn1.edl %~dpn1.ptl
start /low /wait C:\Progra~1\mplayer\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -xvidencopts bitrate=900:me_quality=6:chroma_me:noqpel:chroma_opt:vhq=4:bvhq=1:trellis:hq_ac:gmc:quant_type=mpeg:max_key_interval=240 -oac mp3lame -lameopts mode=2:cbr:br=128 -vf filmdint,softskip,scale=720:480,hqdn3d=3:2:3:3 -ofps 24000/1001 -o "G:\TEMP\%RECORDING%.avi"
rem Moves file to proper directory on website
MOVE "G:\TEMP\%RECORDING%.avi" "G:\HTTP\htdocs\shows\SarahSilverman\%RECORDING%.avi"
GOTO WEBFREE
rem ---------------------------------------------------
rem Commands for Bullrun
:BULLRUN
rem Transcodes the show while cutting out commercials and saves to G:\TEMP
if exist %~dpn1.edl copy %~dpn1.edl %~dpn1.ptl
start /low /wait C:\Progra~1\mplayer\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -xvidencopts bitrate=900:me_quality=6:chroma_me:noqpel:chroma_opt:vhq=4:bvhq=1:trellis:hq_ac:gmc:quant_type=mpeg:max_key_interval=240 -oac mp3lame -lameopts mode=2:cbr:br=128 -vf filmdint,softskip,scale=720:480,hqdn3d=3:2:3:3 -ofps 24000/1001 -o "G:\TEMP\%RECORDING%.avi"
rem Moves file to proper directory on website
MOVE "G:\TEMP\%RECORDING%.avi" "G:\HTTP\htdocs\shows\Bullrun\%RECORDING%.avi"
GOTO WEBFREE
rem ---------------------------------------------------
rem Commands for Planet Earth
:PLANET
rem Transcodes the show while cutting out commercials and saves to G:\TEMP
if exist %~dpn1.edl copy %~dpn1.edl %~dpn1.ptl
start /low /wait C:\Progra~1\mplayer\mencoder.exe %1 -edl "%~dpn1.edl" -ovc xvid -xvidencopts bitrate=900:me_quality=6:chroma_me:noqpel:chroma_opt:vhq=4:bvhq=1:trellis:hq_ac:gmc:quant_type=mpeg:max_key_interval=240 -oac mp3lame -lameopts mode=2:cbr:br=128 -vf filmdint,softskip,scale=720:480,hqdn3d=3:2:3:3 -ofps 24000/1001 -o "G:\TEMP\%RECORDING%.avi"
rem Moves file to proper directory on website
MOVE "G:\TEMP\%RECORDING%.avi" "G:\HTTP\htdocs\shows\PlanetEarth\%RECORDING%.avi"
GOTO WEBFREE
rem ---------------------------------------------------
rem Checks available diskspace on the website drive and sends text message to my phone if it gets too low
:WEBFREE
cd c:\program files\devnz\gbpvr\disklimit
disklimit.exe -disk g -limit 5gb -messagefile webmessage.txt
GOTO END
rem ---------------------------------------------------
:END
exit
Server--AthlonXP 2100+ \ PVR150MCE \ HVR1600 x2
Client 1--Athlon64 3200+
Client 2--Athlon64 3700+
Client 3--Turion64x2 1.9 laptop
Client 1--Athlon64 3200+
Client 2--Athlon64 3700+
Client 3--Turion64x2 1.9 laptop