Search code examples
iosiphoneavfoundationuiimagepickercontrollercore-video

Saving video screencast of iPhone application


Is there a way to capture video of a screen from your own application? As far as I see there is no way to do it with UIImagePickerController (cameras only), but maybe there is a way to do it with iOS 4 AV Foundation or Core Video?


Solution

  • There seems to be two ways of capturing the content of the application while it's running:

    1. Use the private API UIGetScreenImage() function which seems to be accepted by Apple now;
    2. Use the following thread's captureView method to capture the image.

    You'll have to capture it at many times per second (I guess 24 times should be ok for human eye persistence) then you'll have to produce the movie. Perhaps you could use the ffmpeg iphone port.

    Alternatively, if you'd like to capture your application's running for a demo, your best bet would be to run your application on the simulator and use a Mac OS X screencast software to capture it. See also SimFinger which "bundle of little tricks to make a screen capture of the iPhone Simulator suck less".

    Finally, perhaps the following StackOverflow thread might help you produce better screencasts.