![]() “Could not create Null Renderer filter”.“Could not add Sample Grabber to filter graph”.“Could not set media type in sample grabber”.“Could not enable sample buffering in the sample grabber”.“Could not get ISampleGrabber interface to sample grabber filter”.“Could not create Sample Grabber filter”.“Could not add capture filter to graph”.“Error getting device name and DevicePath”.“Could not create system device enumerator”.“Could not attach capture graph builder to graph”.“Could not create capture graph builder”.If CommandCam exits due to an error, it returns one of the following error code values: To suppress the text normally printed to the console by CommandCam (welcome message and other information), use the "/quiet" option. For example, to capture an image from the second video capture device to a file called "output.bmp" after a 10 second delay, the following command would be used: CommandCam /filename output.bmp /delay 10000 /devnum 2 More than one command line option can be specified at once. To list the available capture devices with extra detail (currently just the DevicePath for each camera), use the "/devlistdetail" option. To list the available capture devices, for example to check which device number corresponds to which device, use the "/devlist" option. However, you can enable a video preview window using the "/preview" option. For example, to select a device with the serial number “314159265”: CommandCam /devserial 314159265īy default, CommandCam does not display any video on the screen before capturing the image. To specify a capture device by serial number (for example if you wish to select between two cameras of the same model), use the "/devserial" option. For example, to select a device called “USB Video Device”: CommandCam /devname "USB Video Device" If the device name contains any spaces, it should be enclosed in inverted commas. For example, to open the second video capture device: CommandCam /devnum 2Īlternatively, to specify a capture device by name, use the "/devname" option. To specify a particular device (if you have more than one), use the "/devnum" option. For example, to save the image as "face.bmp": CommandCam /filename face.bmpīy default, the first available video capture device will be used. If the filename contains any spaces, enclose it in inverted commas. To specify a different filename, use the "/filename" option. The default output filename for the grabbed image is "image.bmp". For example, to add a 5 second delay, CommandCam /delay 5000 To specify a time delay between the camera being turned on and the image being grabbed, use the "/delay" option to specify a time delay in milliseconds. Several useful options can be specified using command line arguments. The above example captured the following image of my cup of tea to a file called "image.bmp" (the image was converted to PNG format prior to uploading). Here’s how that appears in the console window. The captured image will be saved to the file image.bmp.For example, cd "My Documents\Downloads". Move to the directory where you downloaded CommandCam.exe.From the Windows start menu, select Start -> Accessories -> Command Prompt. The full CommandCam source code, which is contained in a single C file, is also available:ĬommandCam.cpp (17KB, date: 21-4-2012) Running CommandCam The executable file, CommandCam.exe, can be downloaded directly using the following link: Download CommandCamĬommandCam can be downloaded from my page on Github: CommandCam uses Microsoft’s DirectShow API to access webcams, so it should work with most USB cameras.ĬommandCam (the source code and the executable version) are published under the GNU General Public License (version 3). CommandCam is ideal for use in batch files and other situations where you want a very simple way to automate image capture. It captures a single image from a webcam and stores it in a bitmap file. ![]() CommandCam is a simple and easy to use command line webcam image grabber for Windows. Font ( "Microsoft Sans Serif", 20.25F, System. ![]()
0 Comments
Leave a Reply. |