Skip to content

Releases: Genymobile/scrcpy

scrcpy v2.0

12 Mar 01:56
v2.0
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v2.0

Changes since v1.25:

  • Add Audio forwarding (#14, #3757)
  • Add H265 and AV1 video codec support (#3713)
  • Add --list-displays and --list-encoders
  • Fix clicks on Chrome when --forward-on-clicks is enabled (#3635)
  • Retry on spurious encoder error (#3693)
  • Make --turn-screen-off work on all displays (#3716)
  • Restore resizing workaround for Windows (#3640)
  • Upgrade platform-tools to 34.0.1 (adb) in Windows releases
  • Upgrade FFmpeg to 6.0 in Windows releases (and use a minimal build)
  • Upgrade SDL to 2.26.4 in Windows releases

Highlights

Read the blog post announcing the release: scrcpy 2.0, with audio.


scrcpy v1.25

22 Dec 12:04
v1.25
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v1.25

Changes since v1.24:

  • Adapt copy-paste internals for Android 13 (#3497)
  • Add support for high-precision scrolling (#3363, #3369)
  • Add desktop entry files for Linux (#295, #296, #748, #1636, #3351)
  • Add bash and zsh autocompletion for -s/--serial (#3522, #3523)
  • Use current adb port (if any) for --tcpip (#3591, #3592)
  • Add fallback to get display information on some devices (#3416, #3573)
  • Fix click behavior when --forward-all-clicks is set (#3568, #3579)
  • Fix support for non-ASCII characters in window title (#2932, #3547)
  • Fix getDisplayIds() crash on some versions of Android 13 beta (#3446)
  • Upgrade platform-tools to 33.0.3 (adb) in Windows releases
  • Upgrade FFmpeg to 5.1.2 in Windows 64-bit releases
  • Upgrade SDL to 2.26.1 in Windows releases
  • Various technical fixes

Highlights

Android 13

Recent method signature changes in Android 13 broke copy-paste for scrcpy (#3497). This version adapt the calls to make it work again.

High-precision scrolling

This version uses high-precision scrolling if the computer supports it. As a result, scrolling is smoother, as you can see in #3363.

Serial auto-completion

When several devices are connected, it might be necessary to pass the serial of the device to mirror.

The serial is now auto-completed in bash and zsh:

scrcpy -s <tab><tab>  # auto-complete by the devices listed by "adb devices"

Menu shortcuts

Two new menu shortcuts are added on Linux (here is a screenshot on XFCE):

menu_scrcpy

They allow to launch scrcpy (without arguments) either with a visible terminal or not.

To pass command line arguments, it must still be started from a terminal or a script though.


scrcpy v1.24

28 Apr 19:18
v1.24
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v1.24

Changes since v1.23:

  • Adapt input injection for Android 13 (#3186, #3190)
  • Add --no-power-on (#3148, #3210)
  • Read $ANDROID_SERIAL if no selector is specified (#3111, #3113)
  • Consider emulators as TCP/IP devices (-e) (#3137)
  • Apply requested window size in OTG mode (#3099, #3219)
  • Add specific exit code for device disconnection (#3083, #3085)
  • Enable libusb support for Windows 32-bit releases (#3204, #3206)
  • Upgrade libusb to 1.0.26 in Windows releases (#3206)
  • Upgrade platform-tools to 33.0.1 (adb) in Windows releases (#3206)
  • Upgrade SDL to 2.0.22 in Windows releases
  • Upgrade FFmpeg to 5.0.1 in Windows 64-bit releases
  • Improve some error messages
  • Various technical fixes

Highlights

Android 13 (preview)

Input injection from previous scrcpy versions failed on Android 13 preview (#3186). This version makes it work.

HID/OTG support for Windows 32-bit

The previous scrcpy version (v1.23) added HID/OTG support for all platforms except Windows 32-bit. By upgrading to the latest libusb version, Windows 32-bit is now supported.

$ANDROID_SERIAL

adb uses the ANDROID_SERIAL environment variable if no -s is specified. Use this same variable in scrcpy if no selector is specified (#3111):

# via a command line parameter
adb -s 0123456789abcdef shell
scrcpy -s 0123456789abcdef

# via an environment variable
export ANDROID_SERIAL=0123456789abcdef
adb shell
scrcpy

On Windows, setting an environment variable is slightly different:

:: in cmd
set ANDROID_SERIAL=0123456789abcdef
# in PowerShell
$env:ANDROID_SERIAL = '0123456789abcdef'

No power on

By default, on start, the device is powered on. A new option has been added to disable this behavior:

scrcpy --no-power-on

scrcpy v1.23

22 Feb 22:46
v1.23
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v1.23

Changes since v1.22:

  • Add HID/OTG support for Windows (--otg only) (#2773, #3011)
  • Add HID/OTG support for macOS (#2774, #3031)
  • Improve device selection (list devices, -d, -e) (#3005)
  • Downscale and retry on MediaCodec error in more cases (#2990, #3043)
  • Add ZSH completion script (#3012)
  • Add Bash completion script (#2930, #3048)
  • Add --no-cleanup option (#1764, #3020)
  • Add --printf-fps (#468, #3030)
  • Print both compiled and linked version of libs on --version
  • Fix FPS counter (broken in v1.22)
  • Various technical refactors and fixes

Highlights

HID/OTG on all platforms

Physical keyboard and mouse simulation (HID) was only available on Linux.

The previous release (v1.22) introduced a new OTG feature (--otg), to use the computer keyboard and mouse as if they were plugged directly to the device via an OTG cable, without mirroring and without requiring adb (USB debugging).

In v1.23, this feature is now also available on Windows (with some limitations) and macOS.

HID keyboard and mouse may be used either in "mirroring" mode (the default with mirroring enabled) or OTG mode (when --otg is passed):

# HID in mirroring mode
scrcpy --hid-keyboard --hid-mouse
scrcpy -KM  # the same, but using short options

# HID in OTG mode
scrcpy --otg --hid-keyboard --hid-mouse
scrcpy --otg -KM  # the same, but using short options
scrcpy --otg      # also the same, both keyboard and mouse are enabled if not specified

On Windows, it is not possible to open a USB device if it is already open by another process (like the adb daemon). As a consequence, we can't send HID events if adb is running. Therefore, HID in mirroring mode is not possible, only OTG mode is supported on Windows (and the adb daemon is killed before starting). See #3011.

EDIT: And there are still issues on Windows when USB debugging is disabled: #3050 😞

Also, due to an issue in the libusb prebuilt library for win32, this feature is disabled in the win32 release (it will be enabled later when it's fixed).

Also note that the mouse capture (when --hid-mouse is enabled) has some issues on macOS. A workaround for the main problem has been implemented, but you might need an additional click to get the mouse pointer back (see #3031).

HID support Mirroring mode OTG mode
Linux ✔️ ✔️
macOS ✔️ ✔️
Windows 64-bit ✔️
Windows 32-bit

Improve device selection

Until now, if several devices were connected, scrcpy failed with:

$ scrcpy
scrcpy 1.22 <https://github.com/Genymobile/scrcpy>
error: more than one device/emulator
ERROR: "adb get-serialno" returned with value 1
ERROR: Could not get device serial
ERROR: Server connection failed

This was not very user-friendly: the user had to call adb devices manually to get the serial, then call scrcpy -s xxxxxxxxxx explicitly.

This release introduces features to improve device selection (#3005).

If several devices are connected, scrcpy prints the list of devices:

$ scrcpy

ERROR: Multiple (3) ADB devices:
ERROR:     -->   (usb)  fedcba09                        device  GM1913
ERROR:     -->   (usb)  01234567890abcdef         unauthorized  
ERROR:     --> (tcpip)  192.168.1.1:5555                device  Nexus_5
ERROR: Select a device via -s (--serial), -d (--select-usb) or -e (--select-tcpip)
ERROR: Server connection failed

So it is possible to immediately call scrcpy again with -s.

In addition, two new options allow to select a USB or TCP/IP device when there is only one connected:

  • -d (or --select-usb) uses a USB device (like adb -d)
  • -e (or --select-tcpip) uses a TCP/IP device (like adb -e)

For example, to run scrcpy with the single TCP/IP device:

$ scrcpy -e

DEBUG: ADB device found:
DEBUG:           (usb)  fedcba09                        device  GM1913
DEBUG:           (usb)  05f5e60a0ae518e5          unauthorized  
DEBUG:     --> (tcpip)  192.168.1.1:5555                device  Nexus_5

To run scrcpy with a single USB device:

$ scrcpy -d

ERROR: Multiple (2) ADB devices over USB:
ERROR:     -->   (usb)  fedcba09                        device  GM1913
ERROR:     -->   (usb)  01234567890abcdef         unauthorized  
ERROR:         (tcpip)  192.168.1.1:5555                device  Nexus_5
ERROR: Select a device via -s (--serial), -d (--select-usb) or -e (--select-tcpip)
ERROR: Server connection failed

Since there are several devices connected over USB in this example, it fails, with a detailed error message.

In OTG mode, the USB devices are also listed for convenience:

$ scrcpy --otg

ERROR: Multiple (2) USB devices:
ERROR:     --> fedcba09           (xxxx:xxxx)  OnePlus SM8150-MTP
ERROR:     --> 01234567890abcdef  (xxxx:xxxx)  LGE Nexus 5
ERROR: Select a device via -s (--serial)

Bash and ZSH completion scripts

Scrcpy has a lot of options. For convenience, auto-completion scripts were added for Bash (#3048) and ZSH (@hltdev8642, #3012).

Auto-downscale on MediaCodec error

Some devices are not able to encode a video at the device screen definition. As a consequence, for many users, the first experience with scrcpy was just a failure with a MediaCodec exception.

To solve this problem, the previous release (v1.22) added a mechanism to catch MediaCodec errors on start and automatically retry with a lower definition (scrcpy -m1024).

However, MediaCodec may fail in different ways (#2990, #3043), and some of them were not catched. Now they are.

FPS counter

It was possible to log the capture framerate in the console (printed every second), by pressing MOD+i in the scrcpy window. It was broken in v1.22 (nobody reported it, so it's probably not widely used), it's fixed now.

This release adds a new option --print-fps to start the FPS counter immediately.

Note that a new frame is produced only when the device screen surface "changes", so it's expected to get a low framerate depending on what you do on the device. For example:

  • if you play a 25 fps fullscreen video, then the capture framerate will not be higher than 25 fps;
  • if nothing changes on your screen, then the capture framerate will be 0 fps.

Contact

Scrcpy now has a twitter account: @scrcpy_app
There is also a subreddit: r/scrcpy

This might sometimes be more appropriate than GitHub issues when it's not to report a bug.

scrcpy v1.22

29 Jan 15:14
v1.22
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v1.22

Changes since v1.21:

  • Add HID mouse support (#2916)
  • Add OTG mode (HID only) (#2974)
  • Enable DPI awareness by default on Windows (#40, #2865)
  • Automatically retry with a lower definition on MediaCodec error (#2947)
  • Add a shortcut "open a terminal here" on Windows (#2970)
  • Add icon to scrcpy.exe (#2815)
  • Add server options to send raw H.264 video stream (#2971)
  • Fix process execution (mainly) on Windows 7 (#2838, #2840)
  • Fix adb server hang due to signal masking (#2870, #2873)
  • Fix input injection on some custom ROMs (#2250, #2946)
  • Fix possible overflow on copy-paste (#2859)
  • Upgrade SDL to 2.0.20 in Windows releases
  • Upgrade FFmpeg to 5.0 in Windows 64-bit releases (#1753, #2952)
  • Various technical refactors and fixes

Highlights

Add HID mouse support

Similar to the --hid-keyboard (or -K) added in scrcpy v1.20 (#2632), this release introduces a new option --hid-mouse (or -M) (#2916):

scrcpy -K    # HID keyboard
scrcpy -M    # HID mouse
scrcpy -KM   # HID keyboard and mouse

The mouse is "captured": the mouse pointer disappears from the computer and appears on the Android device.

Special captures keys, either Alt or Super, toggle (disable or enable) the mouse capture. Use one of them to give the control of the mouse back to the computer.

These capture keys do not conflict with shortcuts, since a shortcut is always a combination of the MOD key and some other key, while the capture key triggers an action only if it is pressed and released alone.

Like HID keyboard, it works only when the device is connected via USB, and is only supported on Linux.

OTG mode

A new option --otg (#2974) allows to run scrcpy with only physical keyboard (#2632) and mouse (#2916) simulation, without mirroring and without requiring adb (USB debugging), as if the computer keyboard and mouse were plugged directly to the device via an OTG cable.

scrcpy --otg
# Pass the serial if several USB devices are available
scrcpy --otg -s 0123456789abcdef

This opens a window (with just the scrcpy logo, there is no mirroring), which, when focused, fowards the keyboard and mouse to the device:

otg

The mouse capture works the same as explained in the previous section.

Since it works even with USB debugging disabled (i.e. without adb), it could for example be used to enable USB debugging on a device with a broken touchscreen (to then run scrcpy normally).

Like HID keyboard and HID mouse, this feature works only when the device is connected via USB, and is only supported on Linux.

DPI awareness on Windows

With HiDPI scaling on Windows, by default the quality was awful (#40, #2865).

The FAQ explained how to force correct HiDPI scaling by the application to fix the issue, but it was not convenient (and nobody reads the FAQ anyway).

On this new version, DPI awareness is enabled by default.

"Open a terminal here" on Windows

scrcpy is a command line application, and is configured with command line arguments.

On Windows, the file explorer lacks an "open a terminal here" feature, to open a terminal in the scrcpy directory, ready to execute adb or scrcpy.

The release now contains a file open_a_terminal_here.bat (#2970). Just double-click on it.

This will simplify passing arguments on Windows, and give a hint to users who don't know how to use the command line (remember, nobody reads the FAQ).

Auto-downscale on MediaCodec error

Some devices are not able to encode a video at the device screen definition. In that case, running scrcpy without argument just failed with an error.

The solution is simple: reduce the resolution (scrcpy -m1024 for example), as explained in the FAQ (did I mention that nobody reads the FAQ?).

In this new version, if the encoder fails before the first video frame, then scrcpy automatically retries with a lower definition (#2947), so in most cases it should work without explicitly passing a size argument.

It's better when it works out-of-the-box.

scrcpy v1.21

29 Nov 21:35
v1.21
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.21

Changes since v1.20:

  • Add --tcpip option to automate TCP/IP (wireless) connections (#2827)
  • Add --raw-key-events to always inject key events and ignore text events (#2816, #2831)
  • Add --no-clipboard-autosync to disable automatic clipboard synchronization (#2228, #2817, #2834)
  • Add --tunnel-host and --tunnel-port options (#2801, #2807)
  • Ensure clipboard synchronization is performed before injecting Ctrl+v via HID keyboard (#2814)
  • Adapt read/write settings for Android 12 (#2671, #2788, #2802)
  • Fix hanging with multiple scrcpy instances on Windows (#2779, #2783)
  • Fix quick interruption on Ctrl+c during server starting
  • Print help to stdout (instead of stderr)
  • Various technical refactors and fixes

NOTE: This version does not work on Windows 7 (#2838). A development version including a fix is available here: #2840.


Highlights

Simplify TCP/IP (wireless) configuration

Scrcpy uses adb to communicate with the device. To use scrcpy wirelessly, the users had to find the device IP address and connect via TCP/IP using adb directly.

For convenience, this version introduces a new option to configure TCP/IP connections automatically, with two variants.

If the device (accessible at 192.168.1.1 in this example) already listens on a port (typically 5555) for incoming adb connections, then run:

scrcpy --tcpip=192.168.1.1       # default port is 5555
scrcpy --tcpip=192.168.1.1:5555

If the adb TCP/IP mode is disabled (or if you don't know the IP address), connect the device over USB, then run:

scrcpy --tcpip    # without arguments

It will automatically find the device IP address (by parsing adb shell ip route), enable TCP/IP mode, then connects to the device before starting.

Configure tunneling

Two new options --tunnel-host and --tunnel-port (implemented by @RipleyTom) allow to connect to a remote ADB server. This allows for example to mirror a device plugged on another computer easily.

To connect to a remote ADB server (for example 192.168.1.2), make the server listen on all interfaces:

adb kill-server
adb -a nodaemon server start
# keep this open

Then, from another terminal, run scrcpy:

export ADB_SERVER_SOCKET=tcp:192.168.1.2:5037
scrcpy --tunnel-host=192.168.1.2

Note that all ADB communications between the server and the client are unencrypted.

To connect to a remote ADB server over the Internet, it is strongly recommended to use a SSH tunnel instead.

Improve Android 12 support

The way scrcpy was accessing to the settings is now blocked in Android 12 due to permission changes. In practice, --stay-awake (#2671) and --show-touches (#2788) were broken.

An alternative implementation (#2802) fixes the issue.

Add "raw key events" mode

There are two kinds of events generated when typing text:

  • key events, signaling that a key is pressed or released;
  • text events, signaling that a text has been entered.

By default, letters are injected using key events, so that the keyboard behaves as expected in games (typically for WASD keys).

An option --prefer-text allows to inject text events even for letters and space (see text injection preference).

This version introduces a new option (--raw-key-events, #2831), which always injects key events and ignores all text events.

This will typically result in the insertion of wrong characters for some keyboard layouts, but it may help a lot with some others (e.g. Chinese).

This option is only meaningful for the default injection method: with HID keyboard (--hid-keyboard), all keys are sent as scancodes.

Fix hanging on multiple instances on Windows

Scrcpy v1.20 introduced an important regression on Windows, preventing to launch several scrcpy instances simultaneously on Windows (#2779). It is fixed (by #2783) in this new version.

HID keyboard and Ctrl+v

To allow seamless copy-paste (see v1.15 highlights), on Ctrl+v, a request to synchronize the computer clipboard to the device clipboard is performed before injecting Ctrl+v.

But when HID keyboard (introduced in scrcpy v1.20), is enabled, the Ctrl+v injection is not sent on the same channel as the clipboard request, so they are not serialized, and may occur in any order. As a consequence, it could happen that the old clipboard content was pasted instead of the new one.

In v1.20, to minimize the probability of occurrence of the wrong order, a delay of 2 milliseconds was added before injecting Ctrl+v: e416332. Then it was increased to 5ms: 45b0f81. But even with 5ms, the wrong behavior sometimes happens.

To handle it properly, this new version implements an acknowledgment mechanism, so that Ctrl+v is injected over AOA only after the clipboard synchronization request has been performed and acknowledged by the server (#2814).

This ensures that Ctrl+v with an HID keyboard always pastes the expected content.

Optionally disable seamless copy-paste

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.

A new option --no-clipboard-autosync disables this automatic synchronization. This also disables the acknowledgment mechanism described above.

The scrcpy shortcuts MOD+c, MOD+x and MOD+v still allow explicit copy, cut and paste, even in this mode.

scrcpy v1.20

14 Nov 00:56
v1.20
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.20

Changes since v1.19:

  • Add official high-resolution icon (#1497, #1987)
  • Add HID keyboard support on Linux (#2632)
  • Adapt --help output to terminal size
  • Rework server initialization to avoid unresponsive Ctrl+c sometimes
  • Remove deprecated short options -T and -c
  • Fix "Could not find v4l2 muxer" (#2718)
  • Fix workarounds for Meizu devices (#240, #2656)
  • Fix support for expand notification feature on some devices (#2551)
  • Various technical refactors and fixes

Highlights

New scrcpy icon

Scrcpy used a low-definition XPM icon. Its source code was cool, but the result was awful.

This version introduces a new official icon (designed by @varlesh, author of the papirus icon theme):

scrcpy

HID keyboard

By default, scrcpy uses Android key or text injection: it works everywhere, but is (basically) limited to ASCII characters.

It is now possible to simulate a physical USB keyboard (#2632 by @AlynxZhou): the virtual keyboard is disabled and it works for all characters and IME.

However, it only works if the device is connected by USB, and is currently only supported on Linux (you could help making it work on Windows and macOS).

To enable this mode:

scrcpy --hid-keyboard
scrcpy -K  # short version

If it fails for some reason (for example because the device is not connected via USB), it automatically fallbacks to the default mode (with a log in the console). This allows to use the same command line options when connected over USB and TCP/IP.

In this mode, raw key events (scancodes) are sent to the device, independently of the host key mapping. Therefore, if your keyboard layout does not match, it must be configured on the Android device, in Settings → System → Languages and input → Physical keyboard.

Remove deprecated short options

Some command line options were first introduced with a short version:

  • -c/--crop
  • -T/--always-on-top

Since these are "advanced" features (not common enough), the short version of these options had been deprecated in scrcpy v1.11 two years ago. It's time to remove them (and it simplified some refactors). Only the long version remains.

scrcpy v1.19

10 Sep 19:58
v1.19
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.19

Changes since v1.18:

  • Implement (optional) buffering (#2464)
  • Make --turn-screen-off work even if --no-display (#2426)
  • Workaround Windows issue with non-ASCII path (#2619)
  • Print correct error messages on Windows socket errors (#2624)
  • Upgrade platform-tools to 31.0.3 (adb) in Windows releases (#2588)
  • Upgrade SDL to 2.0.16 in Windows releases (#2589)
  • Various technical fixes

Highlights

Buffering

This release brings a new feature to buffer the video stream for a given delay. This is especially useful for removing a source of stuttering for live-streaming.

To minimize latency, scrcpy was to always display a frame as soon as it is available, without waiting. This design decision is (on purpose) at the cost of jitter: the delay between frames is not preserved. Note that this does not impact recording (--record), which writes the timestamps captured on the device.

However, some real-time use cases may benefit from compensating for jitter, by adding a small latency. For example, few tens of seconds of latency for live-streaming are not important, but jitter is noticeable. The may also improve the mirroring of a video playback.

For this purpose, scrcpy v1.19 introduces two new options:

scrcpy --display-buffer=50  # add 50 ms buffering for display
scrcpy --v4l2-buffer=500    # add 500 ms buffering for v4l2 sink

In practice, here is a graph showing the difference in smoothness with a buffer of 50ms on a wireless connection:
capture_graph3

TL;DR: if you use scrcpy for live-streaming on Linux, use v4l2 with some buffering, and capture the V4L2 source via OBS:

scrcpy -b20M --no-display --v4l2-sink=/dev/video2 --v4l2-buffer=100

On other platforms, as a fallback, run scrcpy with some display buffer, then capture the window via OBS:

scrcpy -b20M --display-buffer=100

scrcpy v1.18

20 Jun 20:12
v1.18
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.18

Changes since v1.17:

  • Add support for Android 12 (#2129, #2402)
  • Add support for V4L2 (device screen capture as a webcam) (#2232, #2233, #2268)
  • Add an option to lock the initial video orientation
  • Add an option to power off the device on close (#824)
  • Bind 4th mouse button to APP_SWITCH (#2258)
  • Bind 5th mouse button to expand notification panel (#2258)
  • Expand settings panel on double-expand notification panel (#2260, #2264)
  • Push to /sdcard/Download by default (#2384)
  • Center the window on resize-to-fit (#2387)
  • Increase possible display id range (#2009)
  • Log input events in verbose mode (#2371)
  • Fix touch events parameters (#2125)
  • Fix left click on Samsung Browser (#2169)
  • Remove option --render-expired-frames (#2268)
  • Pass scrcpy-noconsole arguments through to scrcpy on Windows (#2052)
  • Upgrade platform-tools to 31.0.2 (adb) in Windows releases
  • Various technical fixes

Highlights

Android 12

Since Android 12, creating a secure display with shell permissions is not permitted anymore (#2129). As a consequence, protected content may not be mirrored on Android 12. To avoid an immediate crash when mirroring a device with Android 12 (preview), create a non-secure display. This is basically a revert of the fix for #36.

Android 12 also required some changes from scrcpy to write to the settings, needed for --stay-awake and --show-touches (#2402).

V4L2 (device screen capture as a webcam)

On Linux, a V4L2 sink (#2268) allows to expose the device screen as a webcam on the computer.

Once a new video device is created with v4l2loopback (for example /dev/video1), scrcpy can expose the video stream as a webcam instead of (or in addition to) displaying it in a window:

scrcpy --v4l2-sink=/dev/video1 --no-display

More details here.

The stream can then be opened with any V4L2-capable software. This allows for example expose the device screen to your favorite video-conference tool or to capture it directly from OBS (select Video Capture Device (V4L2) as a source).

Lock video orientation

The option to lock the video orientation now allows to lock the initial orientation. This avoids to pass an explicit orientation value.

It also simplifies V4L2 usage, which does not support video dimension changes.

Power off on close

On closing scrcpy, a new option to power off the device automatically (#824):

scrcpy --power-off-on-close

New shortcuts

The 4th and 5th buttons were not used. Now, the 4th button triggers APP_SWITCH and the 5th expands the notification panel on single click and the settings panel on double click (#2258, #2260, #2264).

The keyboard shortcut MOD+n+n has also been added to expand the settings panel.

Resize to fit

When the scrcpy window is resized, black borders may be added to preserve the aspect ratio of the device screen. It is possible to automatically resize the window to remove them (MOD+w or double click).

However, it preserved the left-corner location of the window. Now, it preserves the device screen content location (#2387).

Push to /sdcard/Download/

A file drag&drop to the scrcpy window used to push to /sdcard/ by default. Now the default is /sdcard/Download/.

It can still be changed by --push-target.

Log input events

In verbose mode (scrcpy -Vverbose), all input events sent to the device are printed in the console (#2371). This can be useful for debugging.

scrcpy v1.17

02 Jan 00:24
v1.17
Compare
Choose a tag to compare

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.17

Changes since v1.16:

  • Fix errors on Android 11 (#1468)
  • Add --encoder option (#1810, #1827)
  • Add --forward-all-clicks option (#1302, #1613)
  • Add --legacy-paste option (#1750, #1771)
  • Workaround screen off/on issue on exit (#1670)
  • Rework console/noconsole versions on Windows (#1875, #1988)
  • Terminate server properly without killing it on close (#1992)
  • List available shortcut keys on error (#1681)
  • Upgrade platform-tools to 30.0.5 (adb) in Windows releases
  • Upgrade SDL to 2.0.14 in Windows releases

Highlights

Android 11

The options --show-touches and --stay-awake have been broken by internal API changes in Android 11. The implementation have been adapted to work properly.

Forward right-click and middle-click

By default, scrcpy injects BACK on right-click and HOME on middle-click.

A new option --forward-all-clicks has been added to forward these clicks to the device instead.

Copy-paste workaround

Copy-paste have been improved by previous releases, especially v1.15.

However, setting the device clipboard programmatically does not work properly on some devices, causing confusing behavior (injecting PASTE does not paste the content set programmatically).

As a workaround, an option --legacy-paste is provided to change the behavior of Ctrl+v and MOD+v so that they also inject the computer clipboard text as a sequence of key events (the same way as MOD+Shift+v).

Screen off workarounds

Scrcpy v1.15 added restoration of the power mode on exit, to avoid leaving the physical screen off (enabled by --turn-screen-off or
MOD+o).

However, restoring the power mode while the device screen was off caused unexpected behaviors (even if the "screen off" feature was not used). Therefore, if the screen was off, don't try to restore the power mode, the state is already as expected.

Encoder selection

Some devices provide several encoders, and some of them may not work well.

A new option --encoder allows to select another available H.264 encoder.

Windows console/noconsole

Scrcpy is a command-line tool, so it does not suit Windows very well.

By default, running scrcpy.exe opens a new console, which is closed as soon as the process terminates. To let the user a chance to read any error message, a "pause" was implemented on error, but this caused issues for scripting (#1875).

In addition, to avoid opening a new terminal, a separate binary was provided with a special linking flag.

To simplify, these hacks have been moved into Windows-specific wrapper scripts:

  • scrcpy.exe is the main binary, with the same behavior as on other platforms (no pause on error)
  • scrcpy-console.bat is a simple wrapper script to pause on error
  • scrcpy-noconsole.vbs a one-line VBS script to start scrcpy.exe without a console