Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to record screen video as like Talking Tomcat application does in iphone?

hey i m trying the record the gameplay of my game so that i can upload its video to youtube from device itself...m trying to do same thing as Talking tomcat app for iphone..recording the video then playing it ,etc...

i m using glReadPixels() for reading framebuffer data and then writing it to video with the help of AVAssetWriter in AVFoundation framwork. But reading the data on each drawing decreases the FPS from around 30-35 to 2-3 only while using glReadPixels.

i think Talking tomcat is also made with the help of Opengl ES it also has the video recording facility but it doesnot slows down while reading each frame any idea.... ?

like image 488
Tornado Avatar asked Aug 08 '11 09:08

Tornado


People also ask

What is screen recording on iPhone?

The screen recording feature will allow you to make a video of every swipe, tap, and sound on your screen for as long as the recording runs. It's just one of the many iPhone tricks that will make your life easier—guaranteed. Swipe down (iPhone X or later) or up (iPhone 8 or earlier) to open the Control Center.


1 Answers

In case someone want to implement the same..i figured out myself. First of all to my surprise i found that talking tomcat is not a 3D game app...it uses frame animations for all movements. and if some one wants to capture the that kind of view then they can use following code---

UIGraphicsBeginImageContext(self.view.bounds.size); //self.view.window.frame.size
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);

and then use AVAssetWriter for creating the video from that frames. ofcourse you can find code for that in some other post.. For me its not useful as i have to capture 3D part.. Cheers

like image 177
Tornado Avatar answered Sep 17 '22 19:09

Tornado