title: Record video with a different preview size than the resulting video file
body: <p>I am attempting to allow users to record video that is a different size than the actual on-screen preview that they can see while recording. This seems to be possible from <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getSupportedVideoSizes%28%29" rel="noreferrer">this documentation concerning the <code>getSupportedVideoSizes</code> function</a> which states:</p>
  
  <blockquote>
    <p>If the returned list is not null, the returned list will contain at
    least one Size and one of the sizes in the returned list must be
    passed to MediaRecorder.setVideoSize() for camcorder application if
    camera is used as the video source. <strong>In this case, the size of the
    preview can be different from the resolution of the recorded video
    during video recording.</strong></p>
  </blockquote>
  
  <p>This suggests that some phones will return null from this fn (in my experience the Galaxy SIII does) but for those who do not, it is possible to provide a preview with a different resolution than the actual video. Is this understanding correct? Do some phones allow the behavior and others not?</p>
  
  <p><strong>Attempting a Solution:</strong></p>
  
  <p>In the <a href="http://developer.android.com/reference/android/media/MediaRecorder.html#setPreviewDisplay%28android.view.Surface%29" rel="noreferrer">official description of the <code>setPreviewDisplay</code></a> function, which is used in the <a href="http://developer.android.com/guide/topics/media/camera.html#capture-video" rel="noreferrer">lengthy process of setting up for video recording</a>, it is mentioned that:</p>
  
  <blockquote>
    <p>If this method is called with null surface or not called at all, media
    recorder will not change the preview surface of the camera.</p>
  </blockquote>
  
  <p>This seems to be what I want, but unfortunately if I do this, the whole video recording process is completely messed up. I am assuming that this function can not be passed null or not called at all in the process of recording video. Perhaps in other contexts this is okay. Unfortunately though, this does not seem to help me.</p>
  
  <p>My only next steps are to look into <code>TextureView</code>s and to use a preview Texture as opposed to a typical SurfaceView implementation in order to use openGL to stretch the texture to my desired size that differs from the actual resolution (and crop any excess off the screen), and then to Construct a Surface for the <code>setPreviewDisplay</code> function with the <code>Surface(SurfaceTexture surfaceTexture)</code> constructor for a Surface. I would like to avoid using a <code>TextureView</code> due to incompatibility below ICS, and also because this adds significant complexity.</p>
  
  <p>This seems like a delicate process, but I am hoping someone can offer some advice in this area.</p>
  
  <p>Thank you.</p>