scrcpy 2.5 <https://github.com/Genymobile/scrcpy>
Make scrcpy window always on top (above other windows).
Encode the audio at the given bit rate, expressed in bits/s. Unit
suffixes are supported: 'K' (x1000) and 'M' (x1000000).
Default is 128K (128000).
Configure the audio buffering delay (in milliseconds).
Lower values decrease the latency, but increase the likelyhood of buffer
underrun (causing audio glitches).
Select an audio codec (opus, aac, flac or raw).
--audio-codec-options=key[:type]=value[,...]
Set a list of comma-separated key:type=value options for the device
The possible values for 'type' are 'int' (default), 'long', 'float' and
The list of possible codec options is available in the Android
<https://d.android.com/reference/android/media/MediaFormat>
Use a specific MediaCodec audio encoder (depending on the codec provided
The available encoders can be listed by --list-encoders.
Select the audio source (output or mic).
Configure the size of the SDL audio output buffer (in milliseconds).
If you get "robotic" audio playback, you should test with a higher value
(10). Do not change this setting otherwise.
-b, --video-bit-rate=value
Encode the video at the given bit rate, expressed in bits/s. Unit
suffixes are supported: 'K' (x1000) and 'M' (x1000000).
Select the camera size by its aspect ratio (+/- 10%).
Possible values are "sensor" (use the camera sensor aspect ratio),
"<num>:<den>" (e.g. "4:3") or "<value>" (e.g. "1.6").
Specify the device camera id to mirror.
The available camera ids can be listed by:
Select the device camera by its facing direction.
Possible values are "front", "back" and "external".
Enable high-speed camera capture mode.
This mode is restricted to specific resolutions and frame rates, listed
--camera-size=<width>x<height>
Specify an explicit camera capture size.
Specify the camera capture frame rate.
If not specified, Android's default frame rate (30 fps) is used.
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.
Use USB device (if there is exactly one, like adb -d).
Also see -e (--select-tcpip).
Disable screensaver while scrcpy is running.
Add a buffering delay (in milliseconds) before displaying. This
increases latency to compensate for jitter.
Default is 0 (no buffering).
Specify the device display id to mirror.
The available display ids can be listed by:
--display-orientation=value
Set the initial display orientation.
Possible values are 0, 90, 180, 270, flip0, flip90, flip180 and flip270.
The number represents the clockwise rotation in degrees; the "flip"
keyword applies a horizontal flip before the rotation.
Use TCP/IP device (if there is exactly one, like adb -e).
Also see -d (--select-usb).
Do not attempt to use "adb reverse" to connect to the device.
Select how to send keyboard inputs to the device.
Possible values are "disabled", "sdk", "uhid" and "aoa".
"disabled" does not send keyboard inputs to the device.
"sdk" uses the Android system API to deliver keyboard events to
"uhid" simulates a physical HID keyboard using the Linux UHID kernel
"aoa" simulates a physical keyboard using the AOAv2 protocol. It may
For "uhid" and "aoa", the keyboard layout must be configured (once and
for all) on the device, via Settings -> System -> Languages and input ->
Physical keyboard. This settings page can be started directly using the
shortcut MOD+k (except in OTG mode) or by executing: `adb shell am start
-a android.settings.HARD_KEYBOARD_SETTINGS`.
This option is only available when a HID keyboard is enabled (or a
physical keyboard is connected).
Kill adb when scrcpy terminates.
Inject computer clipboard text as a sequence of key events on Ctrl+v
This is a workaround for some devices not behaving as expected when
setting the device clipboard programmatically.
List the valid camera capture sizes.
List video and audio encoders available on the device.
--lock-video-orientation[=value]
Lock capture video orientation to value.
Possible values are "unlocked", "initial" (locked to the initial
orientation), 0, 90, 180 and 270. The values represent the clockwise
rotation from the natural device orientation, in degrees.
Passing the option without argument is equivalent to passing "initial".
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).
Limit the frame rate of screen capture (officially supported since
Android 10, but may work on earlier versions).
Select how to send mouse inputs to the device.
Possible values are "disabled", "sdk", "uhid" and "aoa".
"disabled" does not send mouse inputs to the device.
"sdk" uses the Android system API to deliver mouse eventsto
"uhid" simulates a physical HID mouse using the Linux UHID kernel module
"aoa" simulates a physical mouse using the AOAv2 protocol. It may only
In "uhid" and "aoa" modes, the computer mouse is captured to control the
device directly (relative mouse mode).
LAlt, LSuper or RSuper toggle the capture mode, to give control of the
mouse back to the computer.
Configure bindings of secondary clicks.
The argument must be exactly 4 characters, one for each secondary click
(in order: right click, middle click, 4th click, 5th click).
Each character must be one of the following:
'+': forward the click to the device
'b': trigger shortcut BACK (or turn screen on if off)
'h': trigger shortcut HOME
's': trigger shortcut APP_SWITCH
'n': trigger shortcut "expand notification panel"
Default is 'bhsn' for SDK mouse, and '++++' for AOA and UHID.
Disable device control (mirror the device in read-only).
Disable video and audio playback on the computer (equivalent to
--no-video-playback --no-audio-playback).
Disable audio forwarding.
Disable audio playback on the computer.
By default, scrcpy removes the server binary from the device and
restores the device state (show touches, stay awake and power mode) on
This option disables this cleanup.
By default, scrcpy automatically synchronizes the computer clipboard to
the device clipboard before injecting Ctrl+v, and the device clipboard
to the computer clipboard whenever it changes.
This option disables this automatic synchronization.
By default, on MediaCodec error, scrcpy automatically tries again with a
This option disables this behavior.
Do not forward repeated key events when a key is held down.
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.
Do not forward mouse hover (mouse motion without any clicks) events.
Do not power on the device on start.
Disable video forwarding.
Disable video playback on the computer.
Disable scrcpy window. Implies --no-video-playback and --no-control.
Same as --display-orientation=value --record-orientation=value.
Run in OTG mode: simulate physical keyboard and mouse, as if the
computer keyboard and mouse were plugged directly to the device via an
In this mode, adb (USB debugging) is not necessary, and mirroring is
LAlt, LSuper or RSuper toggle the mouse capture mode, to give control of
the mouse back to the computer.
Keyboard and mouse may be disabled separately using--keyboard=disabled
It may only work over USB.
See --keyboard and --mouse.
Set the TCP port (range) used by the client to listen.
Configure pause on exit. Possible values are "true" (always pause on
exit), "false" (never pause on exit) and "if-error" (pause only if an
This is useful to prevent the terminal window from automatically
closing, so that error messages can be read.
Passing the option without argument is equivalent to passing "true".
Turn the device screen off when closing scrcpy.
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
Start FPS counter, to print framerate logs to the console. It can be
started or stopped at any time with MOD+i.
Set the target directory for pushing files to the device by drag & drop.
It is passed as is to "adb push".
Default is "/sdcard/Download/".
The format is determined by the --record-format option if set, or by the
Inject key events for all input keys, and ignore text events.
Force recording format (mp4, mkv, m4a, mka, opus, aac, flac or wav).
--record-orientation=value
Set the record orientation.
Possible values are 0, 90, 180 and 270. The number represents the
clockwise rotation in degrees.
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>
By default, scrcpy mirrors only the video when audio capture fails on
the device. This option makes scrcpy fail if audio is enabled but does
The device serial number. Mandatory only if several devices are
Turn the device screen off immediately.
--shortcut-mod=key[+...][,...]
Specify the modifiers to use for scrcpy shortcuts.
Possible keys are "lctrl", "rctrl", "lalt", "ralt", "lsuper" and
Several shortcut modifiers can be specified, separated by ','.
For example, to use either LCtrl or LSuper for scrcpy shortcuts, pass
Default is "lalt,lsuper" (left-Alt or left-Super).
Enable "show touches" on start, restore the initial value on exit.
It only shows physical touches (not clicks from scrcpy).
Configure and reconnect the device over TCP/IP.
If a destination address is provided, then scrcpy connects to this
address before starting. The device must listen on the given TCP port
If no destination address is provided, then scrcpy attempts to find the
IP address of the current device (typically connected over USB), enables
TCP/IP mode, then connects to this address before starting.
Set the maximum mirroring time, in seconds.
Set the IP address of the adb tunnel to reach the scrcpy server. This
option automatically enables --force-adb-forward.
Set the TCP port of the adb tunnel to reach the scrcpy server. This
option automatically enables --force-adb-forward.
Default is 0 (not forced): the local port used for establishing the
Print the version of scrcpy.
Set the log level (verbose, debug, info, warn or error).
Output to v4l2loopback device.
It requires to lock the video orientation (see
--lock-video-orientation).
This feature is only available on Linux.
Add a buffering delay (in milliseconds) before pushing frames. This
increases latency to compensate for jitter.
This option is similar to --display-buffer, but specific to V4L2 sink.
Default is 0 (no buffering).
This option is only available on Linux.
Select a video codec (h264, h265 or av1).
--video-codec-options=key[:type]=value[,...]
Set a list of comma-separated key:type=value options for the device
The possible values for 'type' are 'int' (default), 'long', 'float' and
The list of possible codec options is available in the Android
<https://d.android.com/reference/android/media/MediaFormat>
Use a specific MediaCodec video encoder (depending on the codec provided
The available encoders can be listed by --list-encoders.
Select the video source (display or camera).
Camera mirroring requires Android 12+.
Keep the device on while scrcpy is running, when the device is plugged
Disable window decorations (display borderless window).
Set a custom window title.
Set the initial window horizontal position.
Set the initial window vertical position.
Set the initial window width.
Default is 0 (automatic).
Set the initial window height.
Default is 0 (automatic).
In the following list, MOD is the shortcut modifier. By default, it's (left)
Alt or (left) Super, but it can be configured by --shortcut-mod (see above).
Flip display horizontally
Pause or re-pause display
Resize window to 1:1 (pixel-perfect)
Double-click on black borders
Resize window to remove black borders
Right-click (when screen is on)
Click on POWER (turn screen on/off)
Right-click (when screen is off)
Turn device screen off (keep mirroring)
Expand notification panel
Collapse notification panel
Copy to clipboard (inject COPY keycode, Android >= 7 only)
Cut to clipboard (inject CUT keycode, Android >= 7 only)
Copy computer clipboard to device, then paste (inject PASTE keycode,
Inject computer clipboard text as a sequence of key events
Open keyboard settings on the device (for HID keyboard only)
Enable/disable FPS counter (print frames/second in logs)
Pinch-to-zoom and rotate from the center of the screen
Tilt (slide vertically with two fingers)
Install APK from computer
Push file to device (see --push-target)
Device serial to use if no selector (-s, -d, -e or --tcpip=<addr>) is
Path to the server binary
0 Normal program termination
2 Device disconnected while running