views:

2154

answers:

3

Is it possible using the iPhone SDK to grab a frame from a video in iPhone and save it or use it in any way in the application? Does the SDK give any control over the video other than play/stop or maybe access to the binary data of the video?

Also is it possible to know the time at which the user stopped watching the video (i know in SDK 3.0 it is possible to start the video from a specific time).

Thanks

EDIT: If not through the official APIs, is there another way to do any of the above in a way that won't ban the application from the AppStore?

+2  A: 

You can use lib used by ffmpeg to extract a frame like libh264

http://en.wikipedia.org/wiki/X264

Live TV apps on iPhone do that.

Hope this helps.

Thierry

thierryb
But how can i do this with the APIs Apple gives me? I don't have any video data anywhere as a variable to use one the library you suggest. I only give a path (string) to the MediaPlayer and it plays.
Dimitris
the path string you have is a filename; you can read from it and give the data to ffmpeg.
David Maymudes
A: 

please see the answer to my question here http://stackoverflow.com/questions/1259316/iphone-sdk-3-0-video-thumbnail/1301311#1301311 which answers this

ADAM
That is cool but I meant a specific frame in some point in the video.
Dimitris
+1  A: 

Here's a blog post about extracting frames from movies using ffmpeg:

http://www.codza.com/extracting-frames-from-movies-on-iphone

The corresponding project on github: iFrameExtractor

lajos
I saw something like this a while ago, thanks for sharing it here.
Dimitris