title: Capture UIImage frame of AVPlayer streaming .m3u8 for given time?
body: <p>So I have an AVPlayer that playing a live stream of an .m3u8 video and from what I've found searching it looks like you can't use AVAssetImageGenerator to make a screen shot but instead should use AVPlayerItemVideoOutput and </p>
  
  <pre><code>- (CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime itemTimeForDisplay:(CMTime *)outItemTimeForDisplay
  </code></pre>
  
  <p>but when I try and get the outputs from my AVPlayer.</p>
  
  <pre><code>NSArray *outputs = self.mainPlayer.currentItem.outputs;
  </code></pre>
  
  <p>I get an empty array.</p>
  
  <p>The video plays just fine.  Ultimatly what I want is a method like this.</p>
  
  <pre><code>-(UIImage *)frameFor:(CMTime)time;
  </code></pre>
  
  <p>At some point the CALayer on the view needs to be getting this image data so their has to be a way to grab that at some point.  I tried just capturing the CALayer my AVPLayerLayer is attached to but I don't get anything more than the blank view color (bright pink just to make sure its return something).  Their has to be some way of grabbing this data.</p>