Nešlo by to řešit spíš za pomocí super prográmku:
Active Web Cam - více kamer, přibližování, detekce pohybu
? Má spoustu možností a je docela uživatelsky přítulný, existuje na něj slovenština ... Jsem jednou v létě zapomněl, že mám otevřené okno a zapnutou detekci pohybu se zvukovým upozorněním

Do našeho kopce lezla sousedka a samozřejmě Active Web Cam jí zachytil a zapnul zvukový poplach

Sousedka ho uslyšela a zastavila. Poplach zmlkl. Sousedka popošla a zase poplach. To už jsem skočil vypnout ho

Jinak je i možnost uložit v případě detekce pohybu i snímek nebo rovnou video.
Works with all USB and Parallel Port cameras, Windows compatible Capture Devices and Framegrabbers, TV-boards, and with Network IP Cameras.
Broadcasts live MPEG-4 video and MP3 audio up to 30 frames per second.
Multiple cameras support. Simultaneous recording and broadcasting from unlimited number of cameras.
Dynamic IP Service, that gives a permanent internet address to your web camera whenever IP of your computer changes.
Time stamps captured video.
Broadcasts audio.
Supports Encrypted Transmission.
Records password protected video clips.
Performs Live Recording that allows rewind and playback captured content at any time.
Has features to control camera's Pan, Tilt, and Zoom.
Helps you to create web page for your web camera.
Records video when a motion is detected.
Allows to view recorded video remotely.
Sends e-mail and SMS when motion detected.
Runs a program when a motion is detected.
Allows to define the active area for motion detection.
Creates thumbnails from captured images.
Has a comprehensive scheduler.
Checks the available space on hard drive and stops recording if there is no available space.
User name and password to control access to your camera and recorded videos from Internet.
Has feature to limit number of camera viewers.
Stealth mode makes the program completely invisible that it doesn't display any icon in the sys tool tray and it is not presented in the task bar tray.
Password protection from unauthorized usage.
Ability to run the program as Windows service that the program starts automatically at system boot and executes even when no user is logged on to the system.