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

2

5

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.... ?

Furr answered 8/8, 2011 at 9:52 Comment(2)
hey I have some problem with my code for the same thing. In my video I can't add sound to the video. How did you add sound to the video fileTaxexempt
many posts have covered this topic ... see over these stackoverflow.com/questions/tagged/avassetwriterFurr
F
8

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

Furr answered 18/8, 2011 at 11:20 Comment(3)
hi.. I was searching for this issue and find this post... Thanks to show me a way.. Upvote for u :)Cogon
Please check my post https://mcmap.net/q/2033810/-create-an-application-that-creates-a-video-from-iphone-screen-and-add-audio-from-headphones-audio-input/642375 and reply to it if you know that. Will meet u on chat on monday morning time...Cogon
AVPlayerLayer Not Capture by [avplayerLayer renderInContext:UIGraphicsGetCurrentContext()];Cystolith
D
0

The question isn't new, but I thought I'd pitch in:

We provide an SDK called "Everyplay" that allows you to do exactly what you're looking for. It's free to use, and is lightweight.

We provide out-of-the-box integrations for Unity3D, cocos2d (1.x, 2.x), cocos2d-x, and you can of course integrate to a custom OpenGL-based game engine.

The documentation is available at https://developers.everyplay.com/doc

The documentation contains an example app key to use when developing, but you can of course sign up for your own client key at https://developers.everyplay.com/

Dacy answered 6/2, 2013 at 8:8 Comment(1)
Everyplay still needs many improvement. Especially the facecam recording is not the same as the preview. What's the point of setting the preview cam size/location only to be reset to default in the recorded video? Also, sound doesnt work in SpriteKit games.Forborne

© 2022 - 2025 — McMap. All rights reserved.