title: Get pixel RGB value from video - Objective-C Mac
body: <p>I'd like to get a specific pixel's RGB value using an X/Y coordinate from a video file.</p>
  
  <p>Like, go through the video and print the current timecode (+fps) and RGB value of pixel at X/Y coordinate.</p>
  
  <p>Can anyone give me a starting point for this?</p>
  
  <p>I've seen a few examples using AVCaptureSession on iOS that use</p>
  
  <pre><code>- (void)captureOutput:(AVCaptureOutput *)captureOutput
  didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
         fromConnection:(AVCaptureConnection *)connection
  </code></pre>
  
  <p>To convert the sampleBuffer to a CIImage and grab the pixel value from wherever...</p>
  
  <p>Can this same technique be accomplished using a preexisting video file playing back?</p>