How I should go about recording a video screen capture of an OpenGL application?
So far my plan of attack is to take individual screenshots then run it through a video encoder.
Does anyone here know of any sample code I can look at or has any suggestions of things I can look at?
I'm looking for the OpenGL app to capture in game footage and save it as video content.
As of Android 4.4, there is a screen recording feature accessible via adb.
http://developer.android.com/tools/help/adb.html#screenrecord
The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file, which you can then download and use as part of a video presentation. This utility is useful for developers who want to create promotional or training videos without using a separate recording device.
Related
I've an app that uses a Native Activity as it is mostly C++ code (cross platform).
I also need to play Video and Audio so have another Activity that uses MediaPlayer to play video and/or audio. This is used in conjunction with the Native Activity to play Video in front of the OpenGL rendered application.
The MediaPlayer activity is based upon that in the ApiDemos example, and works fine on MOST devices (Nexus 7/10, Galaxy S3/Tab2, even some low-cost devices like Fusion5).
BUT running it on a low-cost Scroll Plus 7" tablet - the code functions, but no Video is displayed.
The Audio plays, the Video Controls show and are usable.
NOTE: I have actually been able to hack with the code to get the Video showing - though this is not a solution it may help someone identify the problem.
In my Native Code where the Open Gl render calls eglSwapBuffers, if I comment this line out the Video shows. (I complete the rendering in a loop inside android_main)
Obviously this means my OpenGL Rendering that needs to go on in the background stops working, so I cannot fix it this way.
Device:
Scroll Plus
7" TABLET by Storage Options
Jelly Bean 4.1
From LogCat i believe it is running a CedarX-based Media Decoder/Renderer.
After 4 days on this issue, I've finally found out that the Video was being drawn BEHIND my OpenGL. Why only on this device I don't know. All the other aspects of the Video Activity (the controls etc) are in front where it should be.
The eglSwapBuffers was a red-herring, in that case I was not drawing anything to the screen.
Android Smartphone/Tablet (2.3 and above): How can I capture a video and audio of an application? I need to record and save movie of my running application.
I know about DDMS, but it takes only screen shots. But I need video + audio being played in android app
Requirement: Need to make video of application installed in android smartphone/tablet. (i.e. capturing screens and voices appearing in the app), something like screencast
Many Thanks in advance
I use android screencast tools to mirror my android device on my pc.
Android Screencast
Droid # screen
and a screen recording tool to record screens.
e.g. on macbook i use quicktime player's screen recorder.
CamStudio for windows
When i run my application on the tablet(android) and hit the pause button it pauses the screen of the video but the video will jump a head how ever many seconds the pause when i un-pause the video. So if i start the video and then click pause and walk away i can come back and un-pause the video and it well jump right to the end.
The code i am using is ns.togglePause(); This same code works on the desktop and works with .flv and .f4v but will not work when i am using a mp4 on the tablet.
Has anyone seen this before or know why it would do something like this?
i am using flashdevelop to debug the application.
I found out that my problem is caused by encoding. This helped me solve my problem.I found this on adobes forms.
Video encoding is very important.
For example, use baseline profile level 3.1 for H264 for mobile
(and not High profile level 4.1 recommended for desktop).
For more information, see the MAX session of Fabio Sonnati:
"Encoding for Performance on Multiple Devices"
And if you have an Android phone/tablet, there is my AIR application
to watch Adobe MAX 2011 videos :
https://market.android.com/details?id=air.fr.inway.maxVideos2011
Search "Sonnati" for this session's video.
(For info, i use a video player based on OSMF 1.6)
The pdf presentation is available on Sonmati's blog:
http://sonnati.wordpress.com/
Is it possible and if so "how" would one create a "fake" Camera in an Android application. By "fake" I mean an all software creation that simply looks like a regular Camera to the OS but in actuality takes a Bitmap or byte array as its input data. I want to use such a device with a MediaRecorder to create h.264 videos.
Things this could be used for:
Image slideshow video creation
Screen capture to video file
Caveats: No rooting and no ROM modification
I think what you are looking for is a way to encode videos to H.264 in a way similar to what MediaRecorder does but not from the camera. You do not particularly care whether this is done with a "fake camera" or in some other way, correct? In that case...
You can use the MediaCodec API available in Android 4.1 and later. You can just give it a series of images and it will create video encoded with (where available) the hardware encoder. Some sample code: Create video from screen grabs in android and Encoding H.264 from camera with Android MediaCodec
If you are expecting to affect other apps with your "fake Camera", that is only possible by modifying the Android source code and rolling your own ROM mod.
Yes,you can!
No rooting and no ROM modification,the best way to do this is to build a virtual app that runs the other app as a plugin,so that you can modify anything in the target app. But there is so much work to do, the best news is that there are several open source projects to do this.
And so, the next thing is not so difficult,you only have to hook several libs so in /system/lib that affect the camera recording.
In fact, I have done this on my device, but I modified the system lib directly, it has to be rooted of course. But it works well on almost all apps except some apps that use the service to capture video.
We have to modify the service lib, but it is a little more difficult.
Android 1.6 supports video capture, however, not all phones will support video capture. Is there a way I can tell if the phone I am running on supports video capture or not?
Well, I couldn't find an official way to do this. The only way I know is to assume that all Android phones will support video capture, so if the phone is running 1.5 (3) or greater, it will support video capture.
android.os.Build.VERSION.SDK_INT