When recording a video, the sound will not be recorded and the recording command starts:adb shell screenrecord /sdcard/demo.mp4
Recording mobile phone screen. The video format is mp4, which is stored in the mobile phone SD card. The default recording time is 180 s.
Limit the recording time:Parameter: -- time-limit
adb shell screenrecord --time-limit 10 /sdcard/demo.mp4
Note: The video recording time is limited to 10 s. If not limited, the default value is 180 s.
Specify the video resolution size:Parameter: -- size
adb shell screenrecord --size 1280*720 /sdcard/demo.mp4
Note: The Video Recording resolution is 1280*720. If you do not specify the resolution of the default mobile phone, use the size supported by the advanced video encoding (AVC) on the device for the best effect.
Specifies the video bit rate.Parameter: -- bit-rate
adb shell screenrecord --bit-rate 6000000 /sdcard/demo.mp4
Note: The specified video bit rate is 6 Mbps. If not specified, the default value is 4 Mbps. You can increase the bit rate to improve the video quality or reduce the bit rate to make the file smaller.
Display logs on the command lineParameter: -- verbose
bixiaopeng@bixiaopeng 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 degreesParameter: -- rotate
Note: This function is experimental and is not easy to use.
View help commandsParameter: -- help
bixiaopeng@bixiaopeng ~$ adb shell screenrecord --helpUsage: screenrecord [options]
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: exports a video to the current directory.
Public Account: wirelessqaAbout Author:Author: Bi Peng | old Bi mail: wirelessqa.me@gmail.com
Micro Blog: @ WirelessQA blog: http://blog.csdn.net/wirelessqa