1. 程式人生 > >Android 螢幕錄製命令adb screenrecord

Android 螢幕錄製命令adb screenrecord

錄製視訊到內部儲存:

adb shell screenrecord --size 1920x480 /storage/sdcard0/demo.mp4


最大支援的解析度:1920x1088

The max width/height supported by codec is 1920x1088
指定錄製時間:
adb shell screenrecord  --time-limit 10 /storage/sdcard0/demo.mp4


指定視訊位元率:
adb shell screenrecord --bit-rate 6000000 /storage/sdcard0/demo.mp4

停止錄製:

Ctrl + C中斷錄製,或者到達指定錄製時間自動停止



adb pull或者用USB拷貝出來:

adb pull /storage/sdcard0/demo.mp4



幫助選單:

$ 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.