scrcpy 帮助文档


Usage: scrcpy [options]

Options:

    --always-on-top
        Make scrcpy window always on top (above other windows).
        使scrcpy窗口始终位于顶部(在其他窗口上方)。

    -b, --bit-rate value
        Encode the video at the given bit-rate, expressed in bits/s.
        Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000).
        Default is 8000000.
        以给定的比特率(以位/秒为单位)对视频进行编码。
        支持单位后缀:“ K”(x1000)和“ M”(x1000000)。
        默认值为8000000。

    --codec-options key[:type]=value[,...]
        Set a list of comma-separated key:type=value options for the
        device encoder.
        The possible values for 'type' are 'int' (default), 'long',
        'float' and 'string'.
        The list of possible codec options is available in the
        Android documentation:
        <https://d.android.com/reference/android/media/MediaFormat>
        设置逗号分隔的key:type = value选项列表
        设备编码器。
        'type'的可能值为'int'(默认),'long''float''string'。
        可能的编解码器选项列表在
        Android文档:
        <https://d.android.com/reference/android/media/MediaFormat>

    --crop width:height:x:y
        Crop the device screen on the server.
        The values are expressed in the device natural orientation
        (typically, portrait for a phone, landscape for a tablet).
        Any --max-size value is computed on the cropped size.
        裁剪服务器上的设备屏幕。
         值以设备自然方向表示
         (通常是手机的肖像,平板电脑的风景)。
         任何--max-size值都是根据裁剪后的大小计算的。

    --disable-screensaver
        Disable screensaver while scrcpy is running.
        在scrcpy运行时禁用屏幕保护程序。

    --display id
        Specify the display id to mirror.
        指定要镜像的显示标识。

        The list of possible display ids can be listed by:
            adb shell dumpsys display
        (search "mDisplayId=" in the output)
        可能的显示ID的列表可以通过以下方式列出:
             adb shell dumpsys显示
         (在输出中搜索“ mDisplayId =“)

        Default is 0.

    --encoder name
        Use a specific MediaCodec encoder (must be a H.264 encoder).
        使用特定的MediaCodec编码器(必须是H.264编码器)。

    --force-adb-forward
        Do not attempt to use "adb reverse" to connect to the
        the device.
        请勿尝试使用“ adb反向”连接到装置。

    --forward-all-clicks
        By default, right-click triggers BACK (or POWER on) and
        middle-click triggers HOME. This option disables these
        shortcuts and forward the clicks to the device instead.
        默认情况下,右键单击会触发BACK(或POWER)并
         单击鼠标中键可触发HOME。 此选项禁用这些
         快捷方式,然后将点击转发给设备。

    -f, --fullscreen
        Start in fullscreen.
        以全屏模式启动。

    -h, --help
        Print this help.

    --legacy-paste
        Inject computer clipboard text as a sequence of key events
        on Ctrl+v (like MOD+Shift+v).
        This is a workaround for some devices not behaving as
        expected when setting the device clipboard programmatically.
        注入计算机剪贴板文本作为一系列关键事件
         在Ctrl + v上(例如MOD + Shift + v)。
         对于某些无法正常运行的设备,这是一种解决方法
         以编程方式设置设备剪贴板时需要。

    --lock-video-orientation value
        Lock video orientation to value.
        Possible values are -1 (unlocked), 0, 1, 2 and 3.
        Natural device orientation is 0, and each increment adds a
        90 degrees rotation counterclockwise.
        Default is -1 (unlocked).
        将视频方向锁定为价值。
         可能的值为-1(未锁定),0、1、2和3。
         自然设备方向为0,每个增量添加一个
         逆时针旋转90度。
         默认值为-1(未锁定)。

    --max-fps value
        Limit the frame rate of screen capture (officially supported
        since Android 10, but may work on earlier versions).
        限制屏幕捕获的帧速率(官方支持
         (自Android 10起,但可能适用于较早版本)。

    -m, --max-size value
        Limit both the width and height of the video to value. The
        other dimension is computed so that the device aspect-ratio
        is preserved.
        Default is 0 (unlimited).
        将视频的宽度和高度都限制为value。 这
         计算其他尺寸,以便设备长宽比
         被保留。
         默认值为0(无限制)。

    -n, --no-control
        Disable device control (mirror the device in read-only).
        禁用设备控制(以只读方式镜像设备)。

    -N, --no-display
        Do not display device (only when screen recording is
        enabled).
        不显示设备(仅在进行屏幕录制时启用)。

    --no-key-repeat
        Do not forward repeated key events when a key is held down.
        按住某个键时,请勿转发重复的键事件。

    --no-mipmaps
        If the renderer is OpenGL 3.0+ or OpenGL ES 2.0+, then
        mipmaps are automatically generated to improve downscaling
        quality. This option disables the generation of mipmaps.
        如果渲染器是OpenGL 3.0+或OpenGL ES 2.0+,则
         自动生成mipmap以改善缩小比例
         质量。 此选项禁用生成Mipmap。
    -p, --port port[:port]
        Set the TCP port (range) used by the client to listen.
        Default is 27183:27199.
        设置客户端用于侦听的TCP端口(范围)。
         默认值为27183:27199。

    --prefer-text
        Inject alpha characters and space as text events instead of
        key events.
        This avoids issues when combining multiple keys to enter a
        special character, but breaks the expected behavior of alpha
        keys in games (typically WASD).
        将alpha字符和空格作为文本事件而不是文本事件
         关键事件。
         这样可以避免在组合多个键以输入密码时出现问题。
         特殊字符,但破坏了alpha的预期行为
         游戏中的按键(通常是WASD)。

    --push-target path
        Set the target directory for pushing files to the device by
        drag & drop. It is passed as-is to "adb push".
        Default is "/sdcard/".
        设置目标目录,用于通过以下方式将文件推送到设备
         拖放。 它按原样传递给“ adb push”。
         默认值为“ / sdcard /”。

    -r, --record file.mp4
        Record screen to file.
        The format is determined by the --record-format option if
        set, or by the file extension (.mp4 or .mkv).
        将屏幕记录到文件。
         格式由--record-format选项确定,如果
         设置,或通过文件扩展名(.mp4或.mkv)设置。

    --record-format format
        Force recording format (either mp4 or mkv).
        强制记录格式(mp4或mkv)。

    --render-driver name
        Request SDL to use the given render driver (this is just a
        hint).
        Supported names are currently "direct3d", "opengl",
        "opengles2", "opengles", "metal" and "software".
        <https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER>
        请求SDL使用给定的渲染驱动程序(这仅仅是一个暗示)。
         目前支持的名称是“ direct3d”,“ opengl”,
         “ opengles2”,“ opengles”,“ metal”和“软件”。
         <https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER>

    --render-expired-frames
        By default, to minimize latency, scrcpy always renders the
        last available decoded frame, and drops any previous ones.
        This flag forces to render all frames, at a cost of a
        possible increased latency.
        默认情况下,为了最大程度地减少延迟,scrcpy始终呈现
         最后一个可用的解码帧,并丢弃任何先前的帧。
         该标志强制渲染所有帧,但代价是
         可能会增加延迟。

    --rotation value
        Set the initial display rotation.
        Possibles values are 0, 1, 2 and 3. Each increment adds a 90
        degrees rotation counterclockwise.
        设置初始显示旋转。
         可能的值为0、1、2和3。每个增量加90
         逆时针旋转1度。

    -s, --serial serial
        The device serial number. Mandatory only if several devices
        are connected to adb.
        设备序列号。 仅当有多个连接到adb设备时才必须

    --shortcut-mod key[+...]][,...]
        Specify the modifiers to use for scrcpy shortcuts.
        Possible keys are "lctrl", "rctrl", "lalt", "ralt",
        "lsuper" and "rsuper".
        指定用于scrcpy快捷方式的修饰符。 可能的键是“ lctrl”,“ rctrl”,“ lalt”,“ ralt”,“ lsuper”和“ rsuper”。

        A shortcut can consist in several keys, separated by '+'.
        Several shortcuts can be specified, separated by ','.
        快捷方式可以包含多个键,以“ +”号分隔。 可以指定多个快捷方式,以“,”分隔。

        For example, to use either LCtrl+LAlt or LSuper for scrcpy
        shortcuts, pass "lctrl+lalt,lsuper".
        例如,要将LCtrl + LAlt或LSuper用于scrcpy快捷方式,请传递“ lctrl + lalt,lsuper”。

        Default is "lalt,lsuper" (left-Alt or left-Super).
        默认值为“ lalt,lsuper”(左-Alt或左-Super)。

    -S, --turn-screen-off
        Turn the device screen off immediately.
        立即关闭设备屏幕。

    -t, --show-touches
        Enable "show touches" on start, restore the initial value
        on exit.
        It only shows physical touches (not clicks from scrcpy).
        在开始时启用“显示触摸”,在退出时恢复初始值。 它仅显示物理触摸(不显示来自scrcpy的点击)。

    -v, --version
        Print the version of scrcpy.

    -V, --verbosity value
        Set the log level (debug, info, warn or error).
        Default is info.
        设置日志级别(调试,信息,警告或错误)。
         默认值为info。

    -w, --stay-awake
        Keep the device on while scrcpy is running, when the device
        is plugged in.
        插入设备后,在scrcpy运行时保持设备开机。

    --window-borderless
        Disable window decorations (display borderless window).
        禁用窗口装饰(显示无边界窗口)。

    --window-title text
        Set a custom window title.
        设置自定义窗口标题。

    --window-x value
        Set the initial window horizontal position.
        Default is "auto".
        设置初始窗口水平位置。 默认自动

    --window-y value
        Set the initial window vertical position.
        Default is "auto".
        设置初始窗口垂直位置。
         默认为“自动”。

    --window-width value
        Set the initial window width.
        Default is 0 (automatic).
        设置初始窗口宽度。
         默认值为0(自动)。

    --window-height value
        Set the initial window width.
        Default is 0 (automatic).
        设置初始窗口宽度。
         默认值为0(自动)。
         

文章作者: 鱍鱍
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 鱍鱍 !
  目录