Control Webcams

Share your scripts written for the Script Device in this forum.
Post Reply
spike5884
Senior Member
Posts: 129
Joined: Thu Aug 26, 2004 8:08 am
Location: WI

Control Webcams

Post by spike5884 »

I got it figured out how to get HB to control webcams. It works for my set-up pretty good. The attached zip file includes most of the needed stuff. The only part not included is an SDK that needs tp be downloaded from MS.
Attachments
HBWebCam.zip
WebCam Control
(89.72 KiB) Downloaded 1253 times
Thanks,
Scott J
aka spike5884
Nullen_Void
Member
Posts: 12
Joined: Sun Sep 24, 2006 11:48 am

Post by Nullen_Void »

Not sure what I'm missing...

Win2k SP4
Running HB 2.32
C:\Program Files\HouseBot


the first command runs correctly and shows video devices,
but the second command puts out an error
"Invalid profile: 0x80070057 The parameter is incorrect."
C:\WMSDK\WMEncSDK9\samples\vb\wmcmd>
cscript.exe wmcmd.vbs -devices



Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

audio device:
0 : Default_Audio_Device
1 : Creative Sound Blaster PCI
2 : Intel(r) CS431 Audio Input
video device:
0 : Default_Video_Device
1 : Logitech QuickCam Express
2 : Intel(r) PC Camera CS431


C:\WMSDK\WMEncSDK9\samples\vb\wmcmd\
cscript.exe wmcmd.vbs -vdevice 1 -duration 10 -output c:\camcap.wmv

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Invalid profile: 0x80070057 The parameter is incorrect.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Did you both install the:
WMEncoder.exe
WMEncoderSDK.exe
?

If you didn't install the first one (I forgot that too), it won't work!
Nullen_Void
Member
Posts: 12
Joined: Sun Sep 24, 2006 11:48 am

Post by Nullen_Void »

Yup that was it !!!

Now if I can keep HB from crashing (no error) every time I try to test the cams...

Sigh

Thanks for the help !!
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Using that same script, I also have HB crashes each time I run this script. So I used the standard windows script and built another shell around it using the External Control device.
I don't have it operational because I wanted still pictures in stead of motion pictures. However I still have it installed on my test PC.
Nullen_Void
Member
Posts: 12
Joined: Sun Sep 24, 2006 11:48 am

Post by Nullen_Void »

So Richard

I'm asking
Please

can I get a copy or take a look at your windows script and the shell?

Thanks

Kris
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

What I was saying was that I just used the windows script that comes with the sdk. I didn't use the modified script for HouseBot since it only works once and then I have to restart HB.

The shell is nothing more than starting this script using the external command. The external command runs when a task triggers (like when someone presses the doorbell). The task will set the Arguments portion of the external command and in this argument the proper cam and recording time as well as the filename it should produce is set.
The examples are stored on my test PC which I don't have access to right now, but it should be fairly simple once you are able to run the script using the external command.
By external command I refer to the Execute Program Device.
Post Reply