Version: 1.0.1

Posted: 2008-04-24

Build Requirements: Xcode 2.0+

Runtime Requirements: Mac OS X 10.3.9, Mac OS X 10.4+, QuickTime 7+

View Source Code:

Download Sample (“”, 173.1K)
Download Sample (“QTCoreVideo101.dmg”, 211.1K)


QTCoreVideo101 is a cocoa application demonstrating (in the least amount of code possible) how to render a QuickTime Movie using OpenGL and the new video pipeline. It is a good place to start for developers looking at OpenGL, Core Video and Visual Contexts for the very first time.

In this sample we're using the following framework APIs:

QTKit is used to play back a QuickTime Movie.

QuickTime Visual Context is used as the drawing destination for the QuickTime Movie.

NSOpenGLView is used as our view, this is where we draw a video frame on a teapot or quad.

Core Video pipeline:

Movie -> Visual context -> OpenGL transforms -> OpenGL rendering ----> Hardware

What is Core Video:

Core Video delivers a modern foundation for video services providing a bridge between QuickTime and the GPU for hardware-accelerated video processing. This highly optimized pipeline for video presentation increases performance and reduces CPU load, freeing up resources for other operations.

Document Revision History

Date Notes
2008-04-24added automatic texture coordinate generation for teapot video
2005-07-19Updated to produce a universal binary. No code changes were required.
2005-07-15now calling QTVisualContextTask while owning lock overide and add lock around update method added clean-up code
2005-06-06Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.