screenrecord

Usage

help

screenrecord --help
Usage: screenrecord [options] <filename>

Android screenrecord v1.2.  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 bits per second.  Value may be specified as
    bits or megabits, e.g. '4000000' is equivalent to '4M'.  Default 20Mbps.
--bugreport
    Add additional information, such as a timestamp overlay, that is helpful
    in videos captured to illustrate bugs.
--time-limit TIME
    Set the maximum recording time, in seconds.  Default / maximum is 180.
--verbose
    Display interesting information on stdout.
--help
    Show this message.

Recording continues until Ctrl-C is hit or the time limit is reached.

options

short

long

-h

-v

-s

-b

-t

-u

--help

--verbose

--size 1280x720

--bit-rate 20M

--time-limit 180

--bugreport

unofficial

-i

-f

-r

-o

--show-device-info

--show-frame-time

--rotate

--output-format mp4 h264 frames raw-frames

android 9

-N

-m

-p

--codec-name

--monotonic-time

--persistent-surface

-M

--mime-type video/avc

examples

显示设备信息、时间

screenrecord --bugreport --verbose --time-limit 5 /data/screen.mp4

显示设备信息

screenrecord --show-device-info --verbose --time-limit 5 /data/screen.mp4

显示时间

screenrecord --show-frame-time --verbose --time-limit 5 /data/screen.mp4

保存成帧格式

screenrecord --bugreport --verbose --output-format frames /data/screen.frames

Ctrl+C停止

保存成裸帧格式

screenrecord --bugreport --verbose --output-format raw-frames /data/screen.raw-frames

Ctrl+C停止

保存成原始码流

screenrecord --bugreport --verbose --time-limit 5 --output-format h264 /data/screen.h264

指定编码方式

screenrecord --bugreport --verbose --time-limit 5 --mime-type video/mp4v-es --size 800x480 /data/screen.mp4

screenrecord --bugreport --verbose --time-limit 5 --mime-type video/3gpp --size 800x480 /data/screen.mp4

指定编码器?

screenrecord --bugreport --verbose --time-limit 5 --mime-type video/mp4v-es --size 800x480 --codec-name OMX.google.mpeg4.encoder /data/screen.mp4

 patch

--- a/cmds/screenrecord/screenrecord.cpp
+++ b/cmds/screenrecord/screenrecord.cpp
@@ -938,6 +938,7 @@ int main(int argc, char* const argv[]) {
         { "codec-name",         required_argument,  NULL, 'N' },
         { "monotonic-time",     no_argument,        NULL, 'm' },
         { "persistent-surface", no_argument,        NULL, 'p' },
+        { "mime-type",          required_argument,  NULL, 'M' },
         { NULL,                 0,                  NULL, 0 }
     };

@@ -1026,6 +1027,9 @@ int main(int argc, char* const argv[]) {
         case 'p':
             gPersistentSurface = true;
             break;
+        case 'M':
+            kMimeTypeAvc = optarg;
+            break;
         default:
             if (ic != '?') {
                 fprintf(stderr, "getopt_long returned unexpected value 0x%x\n", ic);

相关推荐

  1. screenrecord

    2024-06-14 01:44:03       6 阅读
  2. screenrecord如何录屏

    2024-06-14 01:44:03       9 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-14 01:44:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-14 01:44:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-14 01:44:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-14 01:44:03       18 阅读

热门阅读

  1. 高精度汽车衡的应用领域有哪些?一文说清楚

    2024-06-14 01:44:03       6 阅读
  2. 时间类:SimpleDateFormatk

    2024-06-14 01:44:03       10 阅读
  3. window系统下为django自动绘制模型类关系图

    2024-06-14 01:44:03       7 阅读
  4. GaussDB系统视图归纳总结及常用运维SQL

    2024-06-14 01:44:03       8 阅读
  5. 开源项目-MES制造执行系统

    2024-06-14 01:44:03       9 阅读
  6. 58.强制类型转换

    2024-06-14 01:44:03       9 阅读
  7. 【Python入门与进阶】Python中变量的输出方式

    2024-06-14 01:44:03       9 阅读