Capture android screen and create video programmatically

20,633

Solution 1

Check the following link https://code.google.com/p/java-remote-control/

in this project the owner has created a java remote control i.e. he has captured the images from the remote computer and transfer to server and convert it to movies with different format all you need to understand what he has done and implement the same for all your needs. you can access the full source code with SVN client from the following URL

http://java-remote-control.googlecode.com/svn/trunk/

Also you can look for the Remote class in java which provides createScreenCapture method

Solution 2

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.

Solution 3

you can capture the screen via using DDMS as adb runs and has permission to the framebuffer:

follow this link for more details :

http://thetechjournal.com/electronics/android/how-to-capture-screenshots-and-record-video-on-android-device.xhtml

ALSO

check this links may be get some ideas about what you need :

http://answers.oreilly.com/topic/951-how-to-capture-video-of-the-screen-on-android/

http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/

and check this project :

http://sourceforge.net/projects/ashot/

hope this help .

Solution 4

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.

Share:
20,633
androidqq6
Author by

androidqq6

I'm still new in Android development, i hope to improve myself and sailing in this area of interest, because I enjoy in it so much, but I am still in the beginning .

Updated on November 03, 2020

Comments

  • androidqq6
    androidqq6 over 3 years

    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?