3

I would like to know if it is possible to capture a video of the iphone screen programmatically ? I saw there is an app for that but for jailbreak devices...So I do not know if there is some "legal" way to do it ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
drn
  • 429
  • 1
  • 6
  • 17

1 Answers1

5

Check out ScreenCaptureView, this has video-recording support built-in (see link).

What this does is it saves the contents of a UIView to a UIImage. The author suggests you can save a video of the app in use by passing the frames through AVCaptureSession.

I believe it hasn't been tested with an OpenGL subview, but assuming that it works you might be able to modify it slightly to include audio and then you'd be set.

Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
  • Hello. It's working fine for the screen capture. But i want to record audio too. How to start audio recording in this. – MinuMaster Apr 21 '12 at 10:08
  • why not try normal video recording in iOS its straight forward. Can you tell me your exact requirements? – Srikar Appalaraju Apr 21 '12 at 19:50
  • @Srikar: Thanks for sharing link.... Can you tell me how to achieve performance with this code while dragging UIImage on ScreenCaptureView??? I have done profiling on app and found the root cause that drawRect: method is the real culprit... where in the method createBitmapContextOfSize: takes almost 99% of the time. Can you tell me how to gain performance with this?? – DShah Mar 01 '13 at 19:17
  • Hi @SrikarAppal since this is a dated answer would this still be the best way to answer our question here? Thanks for your time! http://stackoverflow.com/questions/34956713/simplified-screen-capture-record-video-of-only-what-appears-within-the-layers-o – Crashalot Jan 22 '16 at 22:07