I found a nice way to automate some functions by using a telnet scripting program for VLM control
download the telnet scripting program tst10.exe from this link
http://www.winsite.com/bin/Info?500000000873
and example of a start and stop script:
tst10 /r:start-hdhr0-tst.txt
tst10 /r:stop-hdhr0-tst.txt
where
start-hdhr0-tst.txt
{
192.168.0.100 4212
WAIT "Password:"
SEND "admin\m"
WAIT ">"
SEND "new hdhr0 broadcast enabled\m"
WAIT ">"
SEND "setup hdhr0 input udp://@:5002\m"
WAIT ">"
SEND "setup hdhr0 output #standard{access=file,mux=ts,dst="udp0-out.ts"}\m"
WAIT ">"
SEND "control hdhr0 play\m"
WAIT ">"
SEND "quit\m"
}
stop-hdhr0-tst.txt
{
192.168.0.100 4212
WAIT "Password:"
SEND "admin\m"
WAIT ">"
SEND "control hdhr0 stop\m"
WAIT ">"
SEND "del hdhr0\m"
WAIT ">"
SEND "quit\m"
}