首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >从虚拟心理中的列表显示中获得亚行屏幕记录二次显示

从虚拟心理中的列表显示中获得亚行屏幕记录二次显示
EN

Stack Overflow用户
提问于 2020-10-03 02:10:16
回答 1查看 1.9K关注 0票数 1

你好,我正在尝试连接和屏幕记录,通过HDMI连接到Android设备上的第二个显示器。我能够成功的屏幕捕捉和录制主要的Android手机屏幕,但我有一个设备显示到第二个屏幕。

我想做的是:

  1. 屏幕记录第二次显示的内容,而不是主显示。
  2. 应用程序的显示是通过HDMI从Android设备到投影。

目前所做的工作:

  1. 标识是否有显示: 亚洲开发银行外壳c1q:/ $ dumpsys --显示id显示16409431620704260 (HWC显示1):port=4 pnpId=PRO displayName=“投影仪”显示19261213734341249 (HWC显示0):port=129 pnpId=QCM displayName="ss_dsi_panel_“
  2. 试图连接:

当试图对第二个显示(HWC显示1)进行屏幕记录时,adb似乎没有切换到特定列表显示的选项,shell屏幕记录-帮助选项也没有。

代码语言:javascript
运行
复制
127|c1q:/ $ 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.

我查阅了以下一些文件:

Android在这里:显示/显示#静态

来源: screenrecord.cpp:https://android.googlesource.com/platform/frameworks/av/+/ae6965ae7664aaea489a8d58358035610075c9af/cmds/screenrecord/screenrecord.cpp

屏幕记录可以很好地捕捉手机显示,但外部显示是一种C型HDMI输出微型投影仪,其目标是捕获和记录通过HDMI发送到的其他应用程序,而不管应用程序如何。第三方应用程序与Android手机屏幕上显示的内容不同。( Android Watch),并希望通过无线方式从桌面上录制这段视频。

代码语言:javascript
运行
复制
adb tcpip 5555
adb connect [Device IP Address]:5555
adb shell screenrecord /sdcard/Downloads/test.mp4

这非常好,下一部分是录制第二次显示。

代码语言:javascript
运行
复制
Display 16409431620704260 (HWC display 1): port=4 pnpId=PRO displayName="projector"

我理解可以为您自己的Android应用程序创建一个实现来访问显示,但我希望记录任何应用程序,切换到一个特定的显示器并在那里记录,SurfaceFlinger看到它,但没有看到连接到它和记录的选项。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-03 09:33:18

screenrecord版本1.3 (Android11)提供了选择不同显示器的可能性。特别是,--display-id是您必须用来提供ID或投影的参数。

代码语言:javascript
运行
复制
Android screenrecord v1.3.  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.
--display-id ID
    specify the physical display ID to record. Default is the primary display.
    see "dumpsys SurfaceFlinger --display-id" for valid display IDs.
--verbose
    Display interesting information on stdout.
--help
    Show this message.

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

在这里,您可以查看屏幕记录源代码。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64180082

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档