Android shell commands Screenrecord and uptime

Source: Internet
Author: User

1. Use uptime to view boot time

130| [Email protected]:/$ uptime
Up time:00:12:32, Idle time:01:28:59, sleep time:00:00:00
2. Recording the screen with Screenrecord

$ adb shell screenrecord --help Usage: screenrecord [options] <filename> Records the device‘s display to a .mp4 file. Options: --size WIDTHxHEIGHT      Set the video size, e.g. "1280x720" .  Default is the device‘s main      display resolution ( if supported), 1280x720 if not.  For best results,      use a size supported by the AVC encoder. --bit-rate RATE      Set the video bit rate, in megabits per second.  Default 4Mbps. -- time -limit TIME      Set the maximum recording time , in seconds.  Default / maximum is 180. --rotate      Rotate the output 90 degrees. --verbose      Display interesting information on stdout. --help      Show this message. Recording continues until Ctrl-C is hit or the time limit is reached.

Screenrecord Use Example
(1). Basic use

12 // 录制默认分辨率,默认4Mbps,默认180s的视频,保存到sdcard上名为FILENAME.mp4$adb shell screenrecord /sdcard/FILENAME.mp4

(2). Specify Resolution (parameter:--size)

12 // 分辨率为112x112,建议不要指定分辨率,使用默认分辨率效果最佳$adb shell screenrecord --size 112x112 /sdcard/FILENAME.mp4

Note that the resolution is not completely customizable, such as recording 100x100 on my phone will prompt error:

1234 // 100x100不支持,建议设为112x112$adb shell screenrecord --size 100x100 /sdcard/FILENAME.mp4The max width/height supported by codec is 1920x1088100x100 is not supported by codec, suggest to set it as 112x112

(3). Specify bit rate (parameter:--bit-rate)

12 // 设置比特率为8Mbps,比特率越大,文件越大,画面越清晰$adb shell screenrecord --bit-rate 8000000/sdcard/FILENAME.mp4

(4). Rotation (parameter:--rotate)

12 // 旋转90度$adb shell screenrecord --rotate /sdcard/FILENAME.mp4

Android shell commands Screenrecord and uptime

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.