title: OpenCV 3 error 'CV_FOURCC': identifier not found
body: <p>Just built OpenCV 3 on PC with Visual Studio 2013 and now I'm trying code but sadly I can't figure out what's wrong?</p>
  
  <pre><code>#include "opencv2/opencv.hpp"
  #include &lt;iostream&gt;
  
  using namespace std;
  using namespace cv;
  
  int main() {
  
      VideoCapture vcap(0);
      if (!vcap.isOpened()) {
          cout &lt;&lt; "Error opening video stream or file" &lt;&lt; endl;
          return -1;
      }
  
      int frame_width = vcap.get(cv::CAP_PROP_FRAME_WIDTH);
      int frame_height = vcap.get(cv::CAP_PROP_FRAME_HEIGHT);
      VideoWriter video("out.avi", CV_FOURCC('M', 'J', 'P', 'G'), 10, Size(frame_width, frame_height), true);
  
      for (;;) {
  
          Mat frame;
          vcap &gt;&gt; frame;
          video.write(frame);
          imshow("Frame", frame);
          char c = (char)waitKey(33);
          if (c == 27) break;
      }
      return 0;
  
  
  1&gt;------ Build started: Project: ConsoleApplication12, Configuration: Release x64 ------
  1&gt;  Source.cpp
  1&gt;Source.cpp(21): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
  1&gt;Source.cpp(22): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
  1&gt;Source.cpp(23): error C3861: 'CV_FOURCC': identifier not found
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Couldn't figure out with what I have to replace "CV_FOURCC".</p>
  
  <p>edited:</p>
  
  <pre><code>int frame_width = vcap.get(cv::CAP_PROP_FRAME_WIDTH);
      int frame_height = vcap.get(cv::CAP_PROP_FRAME_HEIGHT);
      int codec = cv::VideoWriter::fourcc('M', 'J', 'P', 'G');
      VideoWriter video("out.avi", codec, 10, Size(frame_width, frame_height), true);
  </code></pre>