title: Matlab vision.VideoFileWriter output is too big
body: <p>I'm using Computer Vision System Toolbox in Matlab (R2015a, Windows7) to mask frames in the video file and write them into a new video file. By masking, I replace about 80% of the image with 0s and 1s:</p>
  
  <pre><code>videoFileReader = vision.VideoFileReader(fin);
  videoFileWriter=vision.VideoFileWriter(fout, ...
      'FileFormat', 'MPEG4', 'FrameRate', videoFileReader.info.VideoFrameRate);
  frame = step(videoFileReader);   
  frame_new=mask(frame); %user function
  step(videoFileWriter, frame_new);  
  </code></pre>
  
  <p>The size (1080 x 1920 x 3) and the format (single) of the original and modified frames remain the same. Yet the masked videos are much bigger than the original ones, e.g. 1GB original video turns into nearly 4GB after masking. These large new files can not be opened (Windows 7, VLC media). Handbrake does not recognize them as a legit video file either. </p>
  
  <p>When I mask only about 20% of the image, the masked video still come out large (up to 2.5Gb), but I have no problem opening these. </p>
  
  <p>I tried adding 'VideoCompressor', 'MJPEG Compressor', but this gives a warning. </p>
  
  <pre><code>videoFileWriter=vision.VideoFileWriter(fin, 'FileFormat', 'MPEG4', ...
  'FrameRate', videoFileReader.info.VideoFrameRate, 'VideoCompressor', 'MJPEG Compressor'); 
   &lt;...&gt;   
   Warning: The VideoCompressor property is not relevant in this configuration of the System object.
  </code></pre>
  
  <p>We have TBs of video data to deidentify, so any suggestion would be much appreciated. 
  Thanks!</p>