MPMoviePlayerController alternatives on iPhone?
Asked Answered
P

3

7

I am looking for alternatives to the MPMoviePlayerController on the iPhone. As a video player its functionality is very limited. According to the class reference there is no way to get the current play back time or set a new time, for example. It's just play and stop.

Are there any middleware solutions out there for iPhone video playback that offer more functionality? CRI has something in development but it has not been released. I haven't been able to find anything else.

Thanks.

Puga answered 23/4, 2009 at 9:41 Comment(1)
I'm in no way supporting MPMoviePlayerController, but it does have a property for "initialPlaybackTime". Depending on your need, this combined with the Play/Finished notifications and a timer/thread can provide some degree of additional control. It ain't pretty though! :)Skiplane
S
3

Keep in mind that even though a project is GPL, that does not mean you can't contact the author's about an LGPL option on the underlying code.

A possible roll your own solution would be to use openGL as a compositing surface for the video and obtain a behind the scenes library like ffmpeg if you need to process specific video types.

NeHe has an example of rendering AVI's to openGL: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=35

FFMpeg has recently been ported to iPhone and is an LGPL based product: http://geek.thinkunique.org/2008/03/05/ffmpeg-on-the-iphone/

(Note: There is some debate over the commercial use of LGPL on iPhone because the license references the phrase "dynamic" when referring to library linkage, which iPhone doesn't allow. I have not seen any project teams balk at their code being used on the iPhone statically, but you should contact the authors directly for clarification.)

Another (though GPL) version of an OpenGL video player is: http://code.google.com/p/glover/

What your getting through a solution like this is basically a bypass on the iPhone/Mac/CALayer specific technical details and leveraging an existing knowledge base of video through OpenGL which although not extensive, is still broadly supported.

If you are dealing with a specific video style, then you may want to see if a library is avaiable for the specific video format direct from the vendor instead of using a multi-purpose tool like FFMpeg. Once you have the compositing working, the video can come from most any library.

Barney

Skiplane answered 17/11, 2009 at 23:35 Comment(0)
S
2

You could use AVPlayer. See the documentation

You can then get the current playback time with currentTime and seek to a specified time with seekToTime:.

You have to direct the visual output of an AVPlayer instance to an AVPlayerLayer object (subclass of CALayer). See the first listing here.

Stamey answered 17/6, 2011 at 7:38 Comment(0)
B
0

VLC has been ported to iPhone but not using the official SDK.

Blarney answered 23/4, 2009 at 12:5 Comment(1)
Thanks for the heads up. I'm looking for something that I can use as a developer for video playback in a custom application and isn't on a GPL license with more features than MPMoviePlayerController. Middleware that costs money is fine - I just haven't been able to find it.Puga

© 2022 - 2024 — McMap. All rights reserved.