Advantages vs the other Webcam UDF based on avicap32 and user32 dll:
- doesn't request to choose which webcam from list dropdown box
- you can precisely set: width, height, (bitplane ?? doesn't seem to work )
- you can set the video source resolution prior to scale it to the GUI and you can go up to 1920x1080 while with avicap you are limited at 640x480
- you can choose video compression in saving video and save the audio too (but uncompressed at the moment)
- you can use renderer you want, now VMR7 or VMR9
- you can make a zoom of some parts of the pic (also consecutive zoom of an area)
- you can go fullscreen EDIT: to exit from fullscreen press F1
- tested in W7 32-64bit and XP SP2
;------TODO: (don't know if and when)
; ---- TODO: take snapshot
; ---- TODO: windowless render preview, EVR ?
; ---- TODO: compress the audio?
; ---- TODO: more webcams in a single GUI
; ---- TODO: display rectangle on GUI during zoom selection
; ---- TODO: make more precise zoom selection in the bottomright border (due to border GUI, I think)
; ---- TODO: webcam controls luminosity, contrast, etc
- known problem: when returning from fullscreen, the gui doesn't display the webcam, but it's sufficient to press the reset to ripristinate
Besides, I upload some DirectShow interfaces that could be useful for other DS work.
Basically, to use this, you must call
at the beginning (it creates objects and fills some arrays you can use to populate your GUI, documented in the UDF).
Then you create your GUI, and you call
this line means: webcamNumber 1, with audioPreview from Mic1, handleGUI ,rescale to the GUI, 640width, 480height, 24bpp
In my uploaded example, in the GUI there is from left: webcamList, audio micList, audio previewBox,CompressorList, audioCaptureBox,framerate, Save-Stop Buttons, resetPic, fullscreen(F1 to exit)
You can also see the video from one webcam and the audio from another one, ie:
to change a webcam select it from the first combobox. If you want another audioMic, select the audio you want from the MicList, check the audioPrevBox and then select the webcam you want or press reset.
to zoom to a part of the pic, drag a rectangle with the mouse inside the pic, draw again if you want zoomIn. Press reset to return to normal pic.
to Save a video, you must select a video compressor from combobox and select the AudioCapture if you want (there must be also the same previewAudio), then press save (adjust the filename in the script). Stop when finished.
It's my first Direct Show attempt so I'm happy of the result
it needs at least autoit beta 184.108.40.206
it's better to use in 32bit because there are more codecs
don't use DMO compressor (I have not implemented DMO), use the others:
for example DIVX or ffdshow (you set the parameters in their panel and then you can use them to record videos)
you need both UDF and interfaces files in the same dir (or adjust the paths).
I tried with 3 webcams: Microsoft LifeCam Studio (1920x1080), Logitech HD Pro C910 (1920x1080) and Philips 900NC (640x480)
Corrected example file to work well also with one webcam only.
Edited by frank10, 21 April 2012 - 06:37 AM.