title: MediaRecorder recorded video is scrambled
body: <p>The approach I've tried to implement is shown below. </p>
  
  <p>It saves the file and the audio is fine, but the video is all greenish lines.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre class="lang-java prettyprint-override"><code>camera.unlock();
  mediaRecorder = new MediaRecorder();
  mediaRecorder.setCamera(camera);
  mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
  
  mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
  
  mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
  mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
  
  mediaRecorder.setOutputFile("/sdcard/"+ videoName + ".mp4");
  
  mediaRecorder.setVideoSize(240, 240);
  mediaRecorder.setVideoFrameRate(24);
  mediaRecorder.setPreviewDisplay(surfaceHolder.getSurface());
  
  //mediaRecorder.setMaxDuration(10000);
  //mediaRecorder.setMaxFileSize(10000000);
  
  mediaRecorder.prepare();
  mediaRecorder.start();
  </code></pre>