Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record/Capture Android App Behavior - Convert To Animated GIF

I would like to capture/record the behavior of my Android app, running on an emulator and make a GIF image out it. Just like this one -

enter image description here

like image 303
RoCk RoCk Avatar asked Jan 10 '16 05:01

RoCk RoCk


3 Answers

First record video from AndroidStudio Select "Screen Record" enter image description here

and save .mp4 video then go to any online tools to convert mp4 to gif

for example http://ezgif.com and https://cloudconvert.com

like image 74
Sally Avatar answered Nov 03 '22 05:11

Sally


You can record a video from your emulator or real device using the standard ADB tool:

adb shell screenrecord /sdcard/foo.mp4

To convert the video from MP4 to animated GIF, use ffmpeg (again, a standard, open-source tool):

 ffmpeg -i foo.mp4 foo.gif

Some refinements

Given that phones nowadays have huge resolutions, a 10-second GIF can easily exceed several megabytes in size. To avoid that, record at a lower resolution by passing a --size XXXxYYY argument to screenrecord:

adb shell screenrecord --size 1024x768 /sdcard/compact.mp4

If you need to install ADB on Linux, just run sudo apt install adb.

If you want to trim the beginning or the end of the video, pass the following arguments to ffmpeg:

  • -ss 00:00:05 - where to start (e.g. 5 seconds into the video)
  • -t 00:00:10 - total duration (e.g. 10 seconds)

No need for video editors or to upload your possibly confidential screencast online.

like image 22
Dan Dascalescu Avatar answered Nov 03 '22 04:11

Dan Dascalescu


I found the easiest way (you have to update latest android studio & android monitory)

  • Click... option to open More Setting on Android Monitor
  • Select Screen Record option on left
  • Click START RECORDING Button to record video
  • Click STOP RECORDING Button to stop recording
  • Change WEBM format to GIF and save it
  • Enjoy...

enter image description here Watch video tutorial on YouTube

like image 22
duyuanchao Avatar answered Nov 03 '22 03:11

duyuanchao