Releases: Genymobile/scrcpy
scrcpy v1.20
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):
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
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:
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
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
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 errorscrcpy-noconsole.vbs
a one-line VBS script to startscrcpy.exe
without a console
scrcpy v1.16
To receive a notification on new releases, click on Watch > Releases only on the top.
scrcpy v1.16
Changes since v1.15.1:
- Add pinch-to-zoom simulation (#24)
- Fix clipboard paste (#1658)
- Inject POWER instead of WAKEUP on start (#1655)
Highlights
Pinch-to-zoom simulation
This is a long time requested feature (#24).
To simulate "pinch-to-zoom": Ctrl+click-and-move.
More precisely, hold Ctrl while pressing the left-click button. Until the left-click button is released, all mouse movements scale and rotate the content (if supported by the app) relative to the center of the screen.
Concretely, scrcpy generates additional touch events from a "virtual finger" at a location inverted through the center of the screen.
Bugfixes
Pasting (e.g. via Ctrl+v) was broken in some cases (#1658). The fix would have required a new hotfix version (v1.15.2), but since pinch-to-zoom is ready, just go for v1.16 right now.
In addition, some devices apparently do not support the WAKEUP key, so inject POWER on start to turn the device screen on.
scrcpy v1.15.1
scrcpy v1.15
To receive a notification on new releases, click on Watch > Releases only on the top.
scrcpy v1.15
Changes since v1.14:
- Forward Ctrl and Shift to the device (#1598, #555, #942)
- Change "resize to fit" shortcut from MOD+x to MOD+w (#1598)
- Make shortcut modifiers customizable (#1598)
- Restore power mode to "normal" on disconnection (#1572, #1576)
- Keep the screen off on powering on (best effort) (#1573, #1577)
- Add option to disable screensaver (#1370, #1502)
- Do not crash on missing clipboard manager (#1440, #1556)
- Fix touch events HiDPI-scaling (#1536, #15)
- Correctly inject repeating keycodes (#1013, #1519)
- Add option to ignore repeated key events (#1013, #1623)
- Increase clipboard size from 4k to 256k (#1117)
- Do not expose internal SDL logs to users (#1441)
- Upgrade platform-tools to 30.0.4 (adb) in Windows releases
- Upgrade FFmpeg to 4.3.1 in Windows releases
Highlights
Ctrl and Shift
Ctrl and Shift keys are now forwarded to the device.
This allows to trigger many shortcuts on the device itself. For example, Ctrl+t in Firefox opens a new tab, Ctrl+w closes the current tab. Ctrl+c or Ctrl+d can now be injected in Termux. Ctrl+z could be used to cancel an action, like a change in a text field for example.
This also greatly simplifies text selection, by using the keyboard (Shift+arrows, Ctrl+a…). And it makes copy-paste more straightforward (see below).
Customizable shortcut modifier
Since Ctrl is now forwarded to the device, scrcpy must use another shortcut modifier (called MOD in the documentation). By default, it's either (left) Alt or (left) Super.
The shortcut modifier can be changed by a command-line parameter (--shortcut-mod
). Here are some examples:
# use RCtrl for shortcuts
scrcpy --shortcut-mod=rctrl
# use either LAlt or RCtrl
scrcpy --shortcut-mod=lalt,rctrl
# use LCtrl+LAlt
scrcpy --shortcut-mod=lctrl+lalt
# use LCtrl+LAlt or Super
scrcpy --shortcut-mod=lctrl+lalt,lsuper,rsuper
Seamless copy-paste
Forwarding Ctrl brings a lot of changes and improvements regarding copy-paste:
- To copy or cut a text, Ctrl+c and Ctrl+x typically work, because they are forwarded to the device, which, in a text field, copies the text into the clipboard… and the clipboard is now automatically (since v1.14) synchronized with the computer keyboard.
- Pressing Ctrl+v synchronizes the computer clipboard to the device before sending the key event, therefore pasting typically works seamlessly.
- Seamless copy-paste introduced in v1.14 was limited if Android <= 7; by using Ctrl keys, it now works on all supported versions.
- MOD+c, MOD+x and MOD+v are also provided to inject COPY, CUT and PASTE keycodes (see README for details).
- MOD+Shift+v injects the computer clipboard content as a sequence of key events (it was Ctrl+v on previous versions, this is still useful sometimes).
- to be able to bind CUT to MOD+x, the "resize to fit" shortcut (which removes the black borders) has been changed to MOD+w.
The clipboard size has also been increased from 4k to 256k.
Screen off improvements
MOD+o (or --turn-screen-off
) allows to mirror with physical screen turned off.
However, the physical screen was not automatically restored on disconnection, which was annoying. Now it is.
In addition, on Android, pressing POWER cancels the effect of turn screen off. For convenience, scrcpy now attempts to maintain the screen off when it generates a POWER event (either via right-click or MOD+p).
Repeating key events
When a key is hold pressed, the system generates repeated key events.
The repeat count is now correctly forwarded to Android, and an option (--no-key-repeat
) has been added to completely disable them. This mitigates keyboard lag in some games.
scrcpy v1.14
To receive a notification on new releases, click on Watch > Releases only on the top.
scrcpy v1.14
Changes since v1.13:
- Add --stay-awake (#631)
- Add Ctrl+Shift+o shortcut to turn screen on (#175)
- Implement seamless copy-paste from Android to computer (#1056, #1423)
- Implement seamless UTF-8 copy-paste from computer to Android >= 7 (#786)
- Improve --show-touches behavior
- Properly handle Ctrl+C on Windows (avoid to corrupt recording) (#818)
- Add --verbosity to configure log level at runtime
- Add --codec-options to pass MediaFormat options directly (#1325)
- Add --force-adb-forward
- Apply workarounds only on error (#994)
- Increase LOD bias to reduce blurring on trilinear filtering (#1394)
- Fix HiDPI issues on secondary screen (#1408, #15)
- Fix rendering issues (#1408, #787)
- Fix window restoration regression (#1346)
- Fix unexpected focus behavior on scroll (#1362)
- Fix "buffer full" error on Ctrl+Shift+v (#1425)
- Upgrade platform-tools to 30.0.0 (adb) in Windows releases
Highlights
Stay awake
A new option has been added to prevent the device to sleep:
scrcpy --stay-awake
scrcpy -w # short option
This is especially useful when --turn-screen-off
/-S
is enabled, because the device screen will stay awake (no lock screen to unlock after some delay) with screen off:
scrcpy -Sw # turn sceen off and stay awake
The initial "stay awake" state is restored when scrcpy is closed. This is the case even on disconnection/unplug (a new mechanism has been implemented to cleanup on disconnection, --show-touches
also benefits from it).
Turn screen on
The shortcut to turn the screen back on after --turn-screen-off
or Ctrl
+o
had been removed (8c8649c) due to issues on some devices. Of course, it was still possible to turn it back on using the power button (twice), but it was not very convenient.
Therefore, to turn the screen on, the shortcut Ctrl
+Shift
+o
has been reactivated in this release. In practice, it works on many devices (in fact, I could not reproduce the issue anymore).
Seamless copy-paste
Clipboard synchronization between the Android device and the computer allowed to transfer UTF-8 text, but copy-pasting required an annoying two-steps copy.
Now, you can copy a text on Android (long-press on a text field, then click COPY), and immediately press Ctrl
+v
on the computer to paste it.
In the other direction, Ctrl
+Shift
+v
, in addition to synchronizing the clipboards, now injects a PASTE command (if the device runs Android >= 7). This preserves UTF-8 text.
Fix HiDPI issues on secondary screen
A rework of the rendering code (#1408) fixes the long-standing issue #15, causing wrong click locations on secondary monitors (especially on macOS).
Properly handle Ctrl+C on Windows
On Windows, Ctrl+C in the terminal just killed the program, without any cleanup. This was particularly annoying while recording, because in that case the resulting file was corrupted (#818).
Pressing Ctrl+C on Windows now quits the app properly (like on the other platforms).
Advanced codec options
A new advanced option has been added to pass any raw option to MediaFormat
. This could be used for example to change the profile/level of the codec:
scrcpy --codec-options profile=1,level=4096
scrcpy v1.13
To receive a notification on new releases, click on Watch > Releases only on the top.
scrcpy v1.13
Changes since v1.12.1:
- Add option to lock video orientation (#218, #1151)
- Add shortcuts to rotate the display (#218, #1274)
- Mirror secondary displays (#397, #898, #1177, #1238)
- Enable trilinear filtering when possible (#40, #1284)
- Add --render-driver parameter (#1284)
- Accept --max-fps before Android 10 (#488)
- Accept negative window position (#1242)
- Use another local port if 27183 is not available (#945, #951)
- Forward NumPad keys when NumLock is disabled (#1188)
- Fix issues when directory contains non-ASCII chars on Windows (#1002)
Do not print irrelevant workarounds errors (#994)- Fix possible BufferUnderflowException on touch event (#1245)
- Upgrade FFmpeg to 4.2.2 in Windows releases
- Upgrade SDL to 2.0.12 in Windows releases
Highlights
Rotation
The previous release (v1.12) added Ctrl
+r
to request the device to switch between portrait and landscape.
This release adds two additional rotation features, which do not change the device orientation:
- an option to lock the video orientation
- shortcuts to rotate display at any time
Lock video orientation
The parameter --lock-video-orientation
changes the mirroring orientation:
scrcpy --lock-video-orientation 0 # natural orientation
scrcpy --lock-video-orientation 1 # 90° counterclockwise
scrcpy --lock-video-orientation 2 # 180°
scrcpy --lock-video-orientation 3 # 90° clockwise
The locked orientation affects the recording, and never changes across the session.
Display rotation
New shortcuts are introduced to rotate the display at any time:
Ctrl
+←
(left) rotates the display 90° counterclockwiseCtrl
+→
(right) rotates the display 90° clockwise
This affects only the display, not the recording.
The initial value may also be provided on start via --rotation
. Possible values are 0, 1, 2 and 3 (having the same meaning as that of --lock-video-orientation
).
Multi-display
Some devices may expose secondary displays, like Samsung DeX (#397). To mirror them, a new flag --display
has been added:
scrcpy --display 1
Limitations
The secondary display may only be controlled if the device runs at least Android 10 (otherwise it is mirrored in read-only).
Sometimes, mirroring the secondary display just shows a black screen (if some flag called FLAG_SUPPORTS_PROTECTED_BUFFERS
is set for the display). There is no known solution for now (see discussions #898 and #1177).
Downscaling quality (trilinear filtering)
If the scrcpy window is far smaller (in pixels) than the Android device, visual quality can be very low (#40, #1284).
To improve the quality, trilinear filtering is enabled when possible (OpenGL 3.0+ or OpenGL ES 2.0+):
(see this comment for more details)
Mipmapping is automatically enabled if the rendering is done by OpenGL 3.0+ or OpenGL ES 2.0+.
On Windows, you may want to force OpenGL (instead of Direct3D) to benefit from this improvement:
scrcpy --render-driver=opengl
On macOS, it is not supported (there is no OpenGL 3.0).
To force-disable mipmaps even on supported versions of OpenGL, use --no-mipmaps
.