title: Record video with AVCaptureVideoDataOutput
body: <p>I'm not sure what I should put in the method</p>
  
  <pre><code>- (void) captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection;
  </code></pre>
  
  <p>In order to write the frames to a video. Can anybody share with me the body of their code for this method, where the results is recording the frames to a movie?</p>
  
  <p>I thought I had my assetWriter and videoInput setup correctly, but all I'm getting is a movie with 1 frame used repeatedly.</p>