Darksoul71
31st July 2003, 19:37
Hi Folks,
Iīm using a Canopus ADVC-100 for doing my analogue captures from cable TV. Unfortunately I havenīt found any
DV capture tool that supports timed capturing.
Thats why Iīve written two small VB scripts that support timed capturing resp. limited instant capturing using
Scenalyzer Live as capturing application. I support also shutdown/reboot via Wizmo (a small freeware utility)
after end of capturing.
"Why shutdown ?", you may ask. Quite simple: I often walk away from home and just want to capture a movie I
recorded with my VCR a day before. Scenalyzer Live features a capture limit but doesnīt provide any shutdown
function. Therefore the PC would run the whole day just doing nothing.
That was inacceptable for me and the reason why Iīve implemented the shutdown function.
Those two scripts are only a "base" for doing timed/limited captures using any capture application you can
think off. VirtualDub, WinCoder, PowerVCR, etc.
Any capture tool (as long as it supports key input) can be controlled via VBScript. Even controling VirtualDub via this script (if you change the code a little bit) makes sense because you can start VDub directly with the script instead of starting VDub, switching to capture mode manually, setting time limit, etc.
The use of VBScript opens the capture tool for the user. Instead of the Delphi tools for timed capturing Iīve written in the past you are now able to taylor those scripts to your personal needings by just using any simple text editor. VB script is very easy to learn and M$ provides some help files for download.
Iīm not able to provide any support on those script files. Cut, copy and paste those code segements to your favourite text editor and save them with *.VBS extension in order to run them as VBScript.
If you donīt understand how those scripts work and/or how to alter them, donīt ask me :)
For using those at your system with any DV-based capture device you have to do the following things:
1) Before first use you have to set the path for Wizmo and Scenalyzer Live according to your system.
2) Power up your DV device before starting the capture script
3) Power up your video source (VCR, satellite receiver, etc) before capturing as Scenalyzer Live sometimes
freezes if no signal is transmitted via DV in.
BTW: The "timer" script is "multiple instance" cabable. You can run it multiple times in order to do multiple captures to various times. Iīve tested this feature and the script works accurate to the second even when running 10 scripts a time. Iīm sending the script to "sleep" until the recording starts. So it shouldnīt suck to
much CPU time. Iīve used a script for the WinTV PVR as base for this script but completely modified it.
Feel free to modify and redistribute those scripts as you wish. Note: I dislike the usage of schtasks (the CLI for "Scheduled Tasks" because of the complex syntax. You could also write a frontend in any programing language to add comfortable to "Scheduled Tasks".
Iīve decided to use VBScript because it is free, while other alternatives like Script Scheduler or Winbatch arenīt.
Best regards,
D$
P.S.: Comments are in German but hopefully this shouldnīt be a big problem.
P.P.S.: I used WinTV_Sched.vbs as base for my scripts. Therefore some comments are in english :)
Timed Recording Script:
Option Explicit
'Enter your path here :)
Const sRecordCommand = "C:\winapp\ScenalyzerLive\scLive.exe"
Const sRebootCommand = "oshell.Run(""C:\wizmo.exe shutdown"")"
' Declare variables
Dim oShell
Dim sRecordTime
Dim StartZeit
Dim bReboot
Set oShell = CreateObject("Wscript.Shell")
' Abfragedialog für Startzeit, Stopzeit und Shutdown
StartZeit = InputBox ("Starttime:")
sRecordTime = InputBox ("Record duration in Minutes:")
bReboot = MsgBox ("Shutdown PC after recording ?",4)
'Startzeit in Minuten und Stunden zerlegen
Dim ssec,smin, shrs
ssec=0
smin=Minute(StartZeit)
shrs=Hour(StartZeit)
if (shrs-Hour(now) < 0) Then
shrs = shrs + 12
End If
if (smin-Minute(Now) < 0) Then
smin = smin + 60
shrs = shrs - 1
End If
if (ssec-Second(Now) < 0) Then
ssec = ssec + 60
smin = smin - 1
End If
'Berechnen wie viele Minuten das Script schlafen soll.
Dim sduration
sduration=(shrs-Hour(now))*60+smin-Minute(Now)
' Script "anhalten" bis die Startzeit erreicht wurde
WScript.Sleep (sduration*60000+(ssec-Second(Now))*1000)
' Run ScenalyzerLive
oshell.Run(sRecordCommand)
Wscript.sleep (10000)
oShell.SendKeys "%c"
oShell.SendKeys "s"
' Use sleep command to pause until ScenalyzerLive has
' finished capturing
Wscript.Sleep sRecordTime * 60000
oShell.SendKeys "%c"
oShell.SendKeys "a"
Wscript.sleep (15000)
oShell.SendKeys "%{F4}"
Wscript.sleep (2000)
' If reboot parameter was used, reboot the PC after 30 seconds.
If (bReboot=6) Then
Wscript.sleep (10000)
Execute sRebootCommand
End If
Wscript.Quit
Instant Recording Script:
Option Explicit
'Enter your path here
Const sRecordCommand = "C:\winapp\ScenalyzerLive\scLive.exe"
Const sRebootCommand = "oshell.Run(""C:\wizmo.exe shutdown"")"
' Declare variables
Dim oShell
Dim sRecordTime
Dim bReboot
Set oShell = CreateObject("Wscript.Shell")
sRecordTime = InputBox ("Record duration in Minutes:")
bReboot = MsgBox ("Shutdown PC after recording ?",4)
' Run ScenalyzerLive
oshell.Run(sRecordCommand)
Wscript.sleep (10000)
oShell.SendKeys "%c"
oShell.SendKeys "s"
' Use sleep command to pause until ScenalyzerLive has
' finished capturing
Wscript.Sleep sRecordTime * 60000
oShell.SendKeys "%c"
oShell.SendKeys "a"
Wscript.sleep (15000)
oShell.SendKeys "%{F4}"
Wscript.sleep (2000)
' If reboot parameter was used, reboot the PC after 30 seconds.
If (bReboot=6) Then
Wscript.sleep (10000)
Execute sRebootCommand
End If
Wscript.Quit
Iīm using a Canopus ADVC-100 for doing my analogue captures from cable TV. Unfortunately I havenīt found any
DV capture tool that supports timed capturing.
Thats why Iīve written two small VB scripts that support timed capturing resp. limited instant capturing using
Scenalyzer Live as capturing application. I support also shutdown/reboot via Wizmo (a small freeware utility)
after end of capturing.
"Why shutdown ?", you may ask. Quite simple: I often walk away from home and just want to capture a movie I
recorded with my VCR a day before. Scenalyzer Live features a capture limit but doesnīt provide any shutdown
function. Therefore the PC would run the whole day just doing nothing.
That was inacceptable for me and the reason why Iīve implemented the shutdown function.
Those two scripts are only a "base" for doing timed/limited captures using any capture application you can
think off. VirtualDub, WinCoder, PowerVCR, etc.
Any capture tool (as long as it supports key input) can be controlled via VBScript. Even controling VirtualDub via this script (if you change the code a little bit) makes sense because you can start VDub directly with the script instead of starting VDub, switching to capture mode manually, setting time limit, etc.
The use of VBScript opens the capture tool for the user. Instead of the Delphi tools for timed capturing Iīve written in the past you are now able to taylor those scripts to your personal needings by just using any simple text editor. VB script is very easy to learn and M$ provides some help files for download.
Iīm not able to provide any support on those script files. Cut, copy and paste those code segements to your favourite text editor and save them with *.VBS extension in order to run them as VBScript.
If you donīt understand how those scripts work and/or how to alter them, donīt ask me :)
For using those at your system with any DV-based capture device you have to do the following things:
1) Before first use you have to set the path for Wizmo and Scenalyzer Live according to your system.
2) Power up your DV device before starting the capture script
3) Power up your video source (VCR, satellite receiver, etc) before capturing as Scenalyzer Live sometimes
freezes if no signal is transmitted via DV in.
BTW: The "timer" script is "multiple instance" cabable. You can run it multiple times in order to do multiple captures to various times. Iīve tested this feature and the script works accurate to the second even when running 10 scripts a time. Iīm sending the script to "sleep" until the recording starts. So it shouldnīt suck to
much CPU time. Iīve used a script for the WinTV PVR as base for this script but completely modified it.
Feel free to modify and redistribute those scripts as you wish. Note: I dislike the usage of schtasks (the CLI for "Scheduled Tasks" because of the complex syntax. You could also write a frontend in any programing language to add comfortable to "Scheduled Tasks".
Iīve decided to use VBScript because it is free, while other alternatives like Script Scheduler or Winbatch arenīt.
Best regards,
D$
P.S.: Comments are in German but hopefully this shouldnīt be a big problem.
P.P.S.: I used WinTV_Sched.vbs as base for my scripts. Therefore some comments are in english :)
Timed Recording Script:
Option Explicit
'Enter your path here :)
Const sRecordCommand = "C:\winapp\ScenalyzerLive\scLive.exe"
Const sRebootCommand = "oshell.Run(""C:\wizmo.exe shutdown"")"
' Declare variables
Dim oShell
Dim sRecordTime
Dim StartZeit
Dim bReboot
Set oShell = CreateObject("Wscript.Shell")
' Abfragedialog für Startzeit, Stopzeit und Shutdown
StartZeit = InputBox ("Starttime:")
sRecordTime = InputBox ("Record duration in Minutes:")
bReboot = MsgBox ("Shutdown PC after recording ?",4)
'Startzeit in Minuten und Stunden zerlegen
Dim ssec,smin, shrs
ssec=0
smin=Minute(StartZeit)
shrs=Hour(StartZeit)
if (shrs-Hour(now) < 0) Then
shrs = shrs + 12
End If
if (smin-Minute(Now) < 0) Then
smin = smin + 60
shrs = shrs - 1
End If
if (ssec-Second(Now) < 0) Then
ssec = ssec + 60
smin = smin - 1
End If
'Berechnen wie viele Minuten das Script schlafen soll.
Dim sduration
sduration=(shrs-Hour(now))*60+smin-Minute(Now)
' Script "anhalten" bis die Startzeit erreicht wurde
WScript.Sleep (sduration*60000+(ssec-Second(Now))*1000)
' Run ScenalyzerLive
oshell.Run(sRecordCommand)
Wscript.sleep (10000)
oShell.SendKeys "%c"
oShell.SendKeys "s"
' Use sleep command to pause until ScenalyzerLive has
' finished capturing
Wscript.Sleep sRecordTime * 60000
oShell.SendKeys "%c"
oShell.SendKeys "a"
Wscript.sleep (15000)
oShell.SendKeys "%{F4}"
Wscript.sleep (2000)
' If reboot parameter was used, reboot the PC after 30 seconds.
If (bReboot=6) Then
Wscript.sleep (10000)
Execute sRebootCommand
End If
Wscript.Quit
Instant Recording Script:
Option Explicit
'Enter your path here
Const sRecordCommand = "C:\winapp\ScenalyzerLive\scLive.exe"
Const sRebootCommand = "oshell.Run(""C:\wizmo.exe shutdown"")"
' Declare variables
Dim oShell
Dim sRecordTime
Dim bReboot
Set oShell = CreateObject("Wscript.Shell")
sRecordTime = InputBox ("Record duration in Minutes:")
bReboot = MsgBox ("Shutdown PC after recording ?",4)
' Run ScenalyzerLive
oshell.Run(sRecordCommand)
Wscript.sleep (10000)
oShell.SendKeys "%c"
oShell.SendKeys "s"
' Use sleep command to pause until ScenalyzerLive has
' finished capturing
Wscript.Sleep sRecordTime * 60000
oShell.SendKeys "%c"
oShell.SendKeys "a"
Wscript.sleep (15000)
oShell.SendKeys "%{F4}"
Wscript.sleep (2000)
' If reboot parameter was used, reboot the PC after 30 seconds.
If (bReboot=6) Then
Wscript.sleep (10000)
Execute sRebootCommand
End If
Wscript.Quit