VideoCap Pro SDK ActiveX

VideoCap Pro SDK ActiveX

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

For Windows Developers who need to add video capture with overlay text, image, chroma key effect, face detection, video painter, motion detection with C++ , C#, VB.NET , VB, Delphi, Vfp, Ms Access, Labview.

Popular Solution Go   Back

C# - How to capture a video to mp4 file

Step 1: To install the VideoCap Pro ActiveX Control, begin by launching the setup file (videocapprosetup.exe). Select the desired installation folder for the VideoCap Pro ActiveX and continue with the installation on your development computer.

Step 2: Create New Visual C# Project, select Windows Application. 

 Step 3: The next step is to install VideoCap Pro ActiveX in ToolBox. Select Toolbox, select Components item, right click mouse button, select Choose Items...
 
Step 4: Select COM Components tab, select VideoCap Pro ActiveX Control , click OK.
 

Step 5: Now you will see the VideoCap Pro ActiveX's icon on toolbox, drag it to form. 
 
 Step 6: Design the UI same as following


 
 Step 7: If you want to capture to MP4 video, you must set CaptureMode = true, UseMp4EncoderPlugin = true and set the MP4 video/audio bitrate, resolution before call Start method.

 The main code as the following:

 axVideoCap1.UseMp4EncoderPlugin = true;
 axVideoCap1.Mp4Videobitrate = Convert.ToInt32(txtmp4videobitrate.Text);
 axVideoCap1.Mp4Audiobitrate = Convert.ToInt32(txtmp4audiobitrate.Text);
 axVideoCap1.Mp4AudioSamplerate = Convert.ToInt32(cboaudiosamplerate.Text);
 axVideoCap1.Mp4Audiochannel = (short)Convert.ToInt32(txtaudiochannels.Text);
 axVideoCap1.Mp4Width = (short)Convert.ToInt32(txtmp4width.Text);
 axVideoCap1.Mp4Height = (short)Convert.ToInt32(txtmp4height.Text);
 axVideoCap1.CaptureMode = true;
 axVideoCap1.CaptureFileName = this.saveFileDialog1.FileName;
 short result = axVideoCap1.Start();

 Step 8: Download the sample source code from Video-capture-to-MP4-Sample.zip