Capture real-time screen video from iPhone and iPad including audio and post to YouTube, Facebook, etc

snibbe picture snibbe · Apr 14, 2011 · Viewed 13.4k times · Source

Does anyone have pointers to some working code or techniques for capturing the full-screen real-time OpenGL graphics on the iPhone and iPad, combine it with the audio coming out of the device, and compile it into a video to post online?

For example, apps such as "Talking Tomcat" do this. I'm using Cocos2D, but a solution from any framework is welcome, ideally using up-to-date APIs. It seems like this should be a solved problem given how useful and pervasive such a function is. However, all the postings I have found on this topic are out of date or incomplete.

One of the better sources of information I've found so far is here: http://www.subfurther.com/blog/2011/04/12/voices-that-matter-iphone-spring-2011/

Answer

aroth picture aroth · Jun 15, 2011

There's an updated version of the above-mentioned ScreenCaptureView class available that has video-recording support built-in (see link). 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.

Edit - Working link here: https://github.com/adam-roth/screen-cap-view