Android Video recording command Screenrecord

Source: Internet
Author: User

Android Video recording command Screenrecord you need to know:
    • Screenrecord is a shell command
    • Support Android4.4 (API level 19) above
    • Supported video formats: MP4
Some restrictions
    • Some devices may not be able to record directly because the resolution is too high and if you encounter such a problem, try specifying a lower resolution
    • Screen rotation during recording is not supported, if the recording process rotates, it is possible that the screen is cut off
    • The sound won't be recorded when you record the video.
Start recording command:
adb shell screenrecord /sdcard/demo.mp4

Note: Recorded phone screen, video format mp4, stored in the phone SD card, the default recording time is 180s

Limit recording time:

Parameter:--time-limit

adb shell screenrecord  --time-limit 10 /sdcard/demo.mp4

Description: Limit video recording time to 10s, if not limited, default 180s

Specify the video resolution size:

Parameter:--size

adb shell screenrecord --size 1280*720 /sdcard/demo.mp4

Description: Recorded video, resolution 1280*720, if you do not specify the default use of the phone's resolution, for best results, use the Advanced video encoding (AVC) supported size on the device

Specifies the bitrate of the video

Parameter:--bit-rate

adb shell screenrecord --bit-rate 6000000 /sdcard/demo.mp4

Description: Specifies that the video has a bit rate of 6Mbps, and if not specified, the default is 4Mbps. You can increase the bitrate to improve the video quality or reduce the bit rate in order to make the file smaller

Display log at the command line

Parameter:--verbose

[email protected] wirelessqa$ adb shell screenrecord --time-limit 10 --verbose /sdcard/demo.mp4Main display is 1080x1920 @60.00fps (orientation=0)Configuring recorder for 1080x1920 video at 4.00MbpsContent area is 1080x1920 at offset x=0 y=0Time limit reachedEncoder stopping; recorded 96 frames in 10 secondsStopping encoder and muxerExecuting: /system/bin/am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/demo.mp4Broadcasting: Intent { act=android.intent.action.MEDIA_SCANNER_SCAN_FILE dat=file:///sdcard/demo.mp4 }Broadcast completed: result=0
Rotate 90 degrees

Parameter:--rotate

Description: This function is experimental, not good to know

View Help Commands

Parameter:--help

[email protected] ~$ adb shell screenrecord --helpUsage: 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.
Export Video:
adb pull /sdcard/demo.mp4

Description: Export the video to the current directory

Android Video recording command Screenrecord

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.