title: OpenCV videoWriter codec issue
body: <p>I am trying to write a video in OpenCV in Windows and am meeting various issues when choosing codecs. I'm not sure if it is something in my code or I do not have the codecs necessary. The code is:</p>
  
  <pre><code>int main(int argc, char ** argv){
  
          VideoCapture inputVideo("LFW.mp4");
          Mat inputFrame, outputFrame;
          VideoWriter outputVideo;
  
          if (!inputVideo.isOpened()){
              std::cout &lt;&lt; "!!! Input video could not be opened" &lt;&lt; std::endl;
              return 1;
          }
  
          int ex = static_cast&lt;int&gt;(inputVideo.get(CV_CAP_PROP_FOURCC));
          const string name = "Output.mp4";
          Size size = Size((int) inputVideo.get(CV_CAP_PROP_FRAME_WIDTH), (int) inputVideo.get(CV_CAP_PROP_FRAME_HEIGHT));
          outputVideo.open(name, CV_FOURCC('M','P','4','2'), inputVideo.get(CV_CAP_PROP_FPS), size, true);
  
          if (!outputVideo.isOpened()){
              std::cout &lt;&lt; "!!! Output video could not be opened" &lt;&lt; std::endl;
              return 2;
          }
  
          return 0;
  }
  </code></pre>
  
  <p>The code keeps exiting with code 2, therefore the videoWriter object is not happy with its configuration.</p>