title: Error while saving video as MP4 using videoWriter(OpenCV) in Ubuntu
body: <p>I am trying to save a video file as MP4 format in ubuntu16.04 using videoWriter function as below</p>
  
  <pre><code>int frame_width = cap.get(CV_CAP_PROP_FRAME_WIDTH);
  int frame_height = cap.get(CV_CAP_PROP_FRAME_HEIGHT);
  VideoWriter video("/home/Desktop/1.mp4",CV_FOURCC('M','J','P','G'),10, Size(frame_width,frame_height));
  </code></pre>
  
  <p>But I am getting the error as below:</p>
  
  <pre><code>OpenCV: FFMPEG: tag 0x47504a4d/'MJPG' is not supported with codec id 8 and format 'mp4 / MP4 (MPEG-4 Part 14)' 
  </code></pre>
  
  <p><code>OpenCV: FFMPEG: fallback to use tag 0x0000006c/'l???</code></p>
  
  <p>When I change my output file extension to .avi, I get no error but VLC player  doesn't display any video. I tried different players also but in vain.</p>
  
  <p>I even did the following thinking my VLC might be a problem but didn't work. Really in need of a solution</p>
  
  <pre><code>sudo apt-get ubuntu-restricted-extras
  </code></pre>