Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture android screen and create video programmatically

In Android/Java, Is there any code example to capture the screenshot of a computer with good frames per second programatically and create video?

I'd like a tutorial or full source code to do this. I'd like the program to work with and without the device having been "rooted".

There is app in the play store called Screencast Video Recorder that does this. But you need to ROOT the device for it to work, so I know it can be done.

What's the best way to capture android screenshot and create a video programmatically on a non-rooted device?

like image 869
androidqq6 Avatar asked Nov 16 '12 20:11

androidqq6


People also ask

How can I record my Android screen secretly?

AZ Screen Recorder is a free app that records phone screen on your device. It allows you to capture screenshots, take videos, and even start a live video. You can view and edit all saved videos and shots right inside of the app.


2 Answers

There is an app called Telecine that is open source that allows you to record screens - the code can be found at https://github.com/JakeWharton/Telecine. All credit is to Jake Wharton.

If you need an example, you can find one at Commonsware's github page - Mark Murphy has provided a sample app for both screen capture and screen recording using the MediaProjection APIs.

like image 84
ucsunil Avatar answered Sep 17 '22 17:09

ucsunil


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.

like image 33
zmarties Avatar answered Sep 17 '22 17:09

zmarties