VideoCap SDK ActiveX

VideoCap SDK ActiveX 14.5

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to video capture SDK for Adobe Director, C++, C#, VB.net , VB, Delphi, VFP, MS Access.

VBA - How to use Webcam with Excel VBA

Step 1: Install the VideoCap SDK ActiveX, begin by launching the setup file (http://www.viscomsoft.com/demo/videocapsetup.exe). Select the desired installation folder for the VideoCap SDK ActiveX and continue with the installation on your development computer.

Step 2: Use Excel 2016 to create Blank workbook

Step 3: Select File - Option - Customize Ribbon, select Developer checkbox.

 

Step 4. In Developer tab, select Insert, select Button (Form Control) , drag the button on worksheet.

 

enter the Macro name is Button1_Click,  Click New button and change the button caption to "Start".

Step 5. select Insert, select Button (Form Control) , drag the button on worksheet. Macro name is Button2_Click,  Click New button
and change the button caption to "Stop"

Step 6. select Insert, select ActiveX Control - More Controls icon


then select VideoCap Control, click OK, then drag the activex control on form.


The UI like this screenshot


Step 7. In Button1_Click(), enter the following code
Sheet1.VideoCap1.Start

Step 8. In Button2_Click(), enter the following code
Sheet1.VideoCap1.Stop

Step 9. Now click the Start button, you can preview your webcam.

Step 10. Now add the following in Button1_Click(), make sure you enter the correct path in CaptureFileName property.
It will recording the video to mp4 file.

Sheet1.VideoCap1.UseMp4EncoderPlugin = True
Sheet1.VideoCap1.CaptureMode = True
Sheet1.VideoCap1.CaptureFileName = "c:\yourfolder\output.mp4"
Sheet1.VideoCap1.Mp4Width = 720
Sheet1.VideoCap1.Mp4Height = 480
Sheet1.VideoCap1.Start

Step 11. Now click the Start button, you can preview your webcam and recording to mp4 in same time.

Download this sample source code from http://www.viscomsoft.com/doc/videocap/Book1.zip