title: iOS: Resizing/Cropping recorded video
body: <p>What would be the best way to resize a user recorded video on the iphone?</p>
  
  <p>I currently have the ability to get video data in two ways:</p>
  
  <p>1) Get the file URL from <code>UIImagePickerController</code> after the video has been recorded</p>
  
  <p>2) Get the frames of the video as its being sent by a <code>AVCaptureSession</code></p>
  
  <p>For 1) I would need something which can read .mov h.264 files and spit out individual frames.  Is there such a thing?</p>
  
  <p>For 2) I thought about getting a UIImage for each frame, resizing the image and then recompiling a video with something like <code>AVAssetWriter</code>.  But this seems like a very intensive operation and I'm wondering if there's a better way to approach this problem.</p>
  
  <p>Is the general idea of resizing videos to resize each individual frame and then recompile a video?  Or is there a way to directly resize an entire video?</p>
  
  <p>I just basically need the user to record a video, and then to resize that video to 320x320, no fancy editing.</p>
  
  <p>Thanks for any help you can provide.</p>
  
  <p><strong>Edit:</strong>  Maybe 'resize' is the wrong word.  I really just need to <em>crop</em> the video so that it goes from 480x360 to 320x320.  Also this cropping doesn't need to happen in real time, I can do it once the video has been recorded.</p>