views:

635

answers:

3

In short, I want to create a simple video player which can play some major video formats like quicktime *.mov, for example. What I need is:

  • video playback (at least the most major formats would be great)
  • play, pause
  • need information about where the movie currently is (how many seconds passed, or how much percent)

I'm targeting the mac, for the beginning. So the preferred technology is Cocoa and Objective-C. But if there's just nothing for that, I could also imagine to do something with Java. Any idea?

+1  A: 
OscarRyz
+8  A: 

QTKit is the (built-in) Objective-C framework for developing with QuickTime. It includes QTMovieView and QTMovieLayer, an NSView and CALayer subclass respectively for playing any content that QuickTime understands. Simple playback controls can optionally be provided by these controls for free. Both can be used from Interface Builder, making a media app an almost zero-code affair. The QuickTime Programming Guide will get you started.

You should also check the QTKitPlayer sample code. It can do everything you describe and shows how to integrate all of the QTKit components for a playback-only application (QTKit also supports media capture and editing).

Barry Wark
+2  A: 

If you want to use Java then Java Media Framework or it's open source analog Freedom For Media in Java, will do the job. FMJ has native binding to DirectShow, QuickTime For Java and Gstreamer. It will do everything you need plus a little bit more. And you will not need to worry about which format you're playing.

tulskiy