You are here

VidRecord example in C++

You may download the source code for this example. The VidRecord example software is released under terms of the Open Source Initiative BSD 2 - Clause license. Copy of the license for this software is at . If you have not already done so, download and install OpenCV on your local machine, see the installation notes. Unzip the file somewhere in your local directory. It will create a directory called "VidRecord" containing the source files and license.

To compile on Ubuntu 12.04

cd VidRecord
mkdir build
cd build
cmake ..
make install

To compile on MS Windows Vista or Windows 7

  • Download and install CMake from
  • Start up CMake and set the source directory to the VidRecord directory you previously unzipped. Set the binaries directory to be just below the source in a directory called say "build", something like WHATEVER\VidRecord\build
  • Click on the "Configure" button.
  • Click on the "Build" button
  • Use Visual Studio 2010, 2011, 2012 edition if you already have it. If not, download and install MS Windows Visual Studio Express 2011 or 2012 from (Currently the free Express edition is at ).
  • Now run Visual Studio and then click on the "Project" button at the top and select the VidRecord\build directory and click on the project solution file.
  • Click the "Compile" button
  • Answer yes to popup to build additonal projects, ie, build-all and install
  • Note that OpenCV 2.4.2 is compatible with the VS 2010 compiler. If you are using the 2012 edition of VS, answer to "No" to dialog asking to convert project to 2012 (unless you like seeing lots of error messages)