winzip icon

Webcam Capture

Submitted on: 12/23/2019 2:40:19 PM
By: David Patterson 
Level: Advanced
User Rating: By 2 Users
Compatibility: VB.NET
Views: 2077

A Feature rich AVI capture program

This allows the capture of AVI video from webcams along with high quality Audio. The audio can be taken from the default audio input device or any device selected from a drop down box.
If default audio is used (Audio option 1) the video is saved as a raw, un-compressed, avi. This can be subsequently compressed using the Compress raw file option.
If a specified audio device is used (Audio option 2), separate audio and video streams are joined together (muxed) using the open source program ffmpeg.exe (from ). The resulting file is then compressed. A sliding scale is provided to synchronise the audio and video streams. I found adding a delay of +5/10ths of a second to the start of the video stream worked on my PC.
Single frame screen capture to jpg/bmp is available using Save Image.
The video capture devices are listed. This requires DirectShowLib-2005.dll ( from )
Avi analysis of frame rate and audio stream is provided using ffprobe.exe from the ffmpeg download.

Remember to download the external files. ffprobe.exe, ffmpg.exe and DirectShowLib-2005.dll should be placed in c:\windows.

Tested on windows 10.


winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

12/30/2019 12:16:31 PMDwain Snickles

Nice program wish it was C# haven't had a chance to review the code fully yet but very nice fired up my camera with little input. Great Job
(If this comment was disrespectful, please report it.)

3/26/2020 11:20:33 AMDavid

Directshow lib is depricated, Can't find it on nuget.

(If this comment was disrespectful, please report it.)

3/26/2020 12:12:35 PMDavid Patterson

The directshow link detailed above is still ok:

(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.