v4.0

affaan-m/ECCv4.0May 12, 2026by rom1v

AI Summary

A major version update that migrates the UI toolkit from SDL2 to SDL3 and introduces flexible window resizing and camera control features.

Key Highlights

  • Migration from SDL2 to SDL3
  • Flex display support with dynamic resizing
  • Camera torch and zoom controls
  • Aspect ratio locking for windows
  • Disconnected icon display

New Features

  • SDL3 migration
  • Flex display (`--flex-display`)
  • Camera torch (`--camera-torch`)
  • Camera zoom (`--camera-zoom`)
  • Aspect ratio locking (`--no-window-aspect-ratio-lock`)
  • Keep active mode (`--keep-active`)
  • Custom background color (`--background-color`)
  • Render fit (`--render-fit`)
  • Min size alignment (`--min-size-alignment`)
  • Fullscreen shortcut (F11)
  • Quit shortcut (Mod+q)

Full Release Notes

_To receive a notification when a new release is available, click on **Watch > Custom > Releases** at the top._

---

**scrcpy v4.0**

Changes since v3.3.4:
 - Migrate from SDL2 to SDL3 (#6216)
 - Add flex display support (#6772)
 - Add camera torch and zoom support (#6243)
 - Enforce window aspect ratio (#6761, #6774, #2317, #2387, #3460)
 - Add --keep-active (#6792, #6787)
 - Add --background-color (#6807, #5855)
 - Set default background color to dark gray (#6807)
 - Display disconnected icon before closing (#6662, #6651)
 - Add F11 as fullscreen shortcut (#6777)
 - Add Mod+q shortcut to quit (#6780, #6612)
 - Fix Meta Quest flickering (#5913)
 - Fix physical vs logical size confusion (#6772)
 - Fix copy-paste on rooted device (#6224)
 - Fix colorspace conversion issue (#1868)
 - Fix high CPU usage with audio silence decoded from OPUS (#6715)
 - Add session metadata for the video stream (#6159)
 - Respect video capabilities constraints (#6766)
 - Set Windows console code page to UTF-8 (#6663)
 - Fix support for device serial containing spaces (#6663, #6664, #3537)
 - Detect TCP devices provided by mDNS (#6665, #6248)
 - Keep Windows terminal open on error (#6667)
 - Set MediaCodec KEY_PRIORITY and KEY_LATENCY to minimum values (#6670)
 - Open the scrcpy window earlier (#6694, #6546)
 - Fix device rotation shortcut (5fedc795)
 - Use optimal size alignment (#6746, #4949, #6236)
 - Add --min-size-alignment (#6746)
 - Fix screensaver disabled unexpectedly without video playback (#6754)
 - Add --no-window-aspect-ratio-lock (#6761)
 - Fix rotation of square displays (#6770)
 - Align the virtual display size (#6771)
 - Add --render-fit (#6772)
 - Set default audio-output-buffer to 10ms (#6775, #3793)
 - Fix turning virtual display on via right-click (#6788)
 - Fix OpenGL runner shutdown deadlock (#6794)
 - Share SDL hints between normal and OTG modes (#6809, #6808)
 - Upgrade platform-tools (adb) to 37.0.0
 - Upgrade FFmpeg to 8.1.1 (#6715)
 - Upgrade SDL to 3.4.8
 - Upgrade dav1d to 1.5.3
 - Various technical fixes

---

<a id="highlights-v4.0"></a>

# Highlights

## SDL3

This release migrates from SDL2 to SDL3 to benefit from active maintenance, bug fixes, and continued upstream support. SDL3 also enables new features, such as aspect-ratio locking when resizing the window.

Thanks to the SDL maintainers for their work and for their [support and fixes](https://github.com/libsdl-org/SDL/issues?q=is%3Aissue%20(author%3A%40rom1v%20OR%20scrcpy)%20sort%3Acreated-desc)!

See #6216 for details.


## Flex display

A virtual display can now be made _flex_ using `--flex-display` (or `-x`), meaning it can be resized dynamically along with the client window.

Here is a demo:

```bash
scrcpy --new-display=/192 -x --start-app=org.mozilla.firefox --keep-active --no-vd-system-decorations
```

https://github.com/user-attachments/assets/0822bcf7-58c1-4106-87f6-c8089c08a777

Here are more examples:

```bash
# Start Android Settings in a window
scrcpy --new-display=1024x768/160 --start-app=com.android.settings --flex-display

# -x is equivalent to --flex-display
scrcpy --new-display=1024x768/160 --start-app=com.android.settings -x

# By default, the display size/dpi is 1280x960/160
scrcpy --new-display --start-app=com.android.settings --flex-display
```

Use `--keep-active` to prevent the screen from turning off (see below):

```bash
scrcpy --new-display -x --keep-active
```

Increase the bit rate and/or change the codec to maintain good quality even with large windows:

```bash
scrcpy --new-display -x --video-codec=h265 -b16M
```

See #6772 for more details.


## Camera torch and zoom

The camera can be controlled dynamically:
 - <kbd>MOD</kbd>+<kbd>t</kbd>: turn on the camera torch
 - <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>t</kbd>: turn off the camera torch
 - <kbd>MOD</kbd>+<kbd>↑</kbd> _(up)_: zoom in
 - <kbd>MOD</kbd>+<kbd>↓</kbd> _(down)_: zoom out

The camera torch can also be turned on at startup by `--camera-torch`:

```bash
scrcpy --video-source=camera --camera-torch
```

The camera zoom level can be set with `--camera-zoom`:

```bash
scrcpy --video-source=camera --camera-zoom=1.5
```

The supported zoom range for each camera is given by `--list-cameras` (any value outside the supported range will be clamped).


## Aspect ratio

Previously, the window could be freely resized, and black borders were added to maintain the content aspect ratio.

Thanks to a new API in SDL3, the window aspect ratio is now preserved while resizing, avoiding black borders.

The old behavior can be restored using `--no-window-aspect-ratio-lock`.


## Keep active

To prevent the device from turning off due to inactivity, `--keep-active` periodically signals user activity to the system:

```
scrcpy --keep-active
```

Contrary to [`--stay-awake`](https://github.com/Genymobile/scrcpy/blob/master/doc/device.md#stay-awake) and [`--screen-off-timeout`](https://github.com/Genymobile/scrcpy/blob/master/doc/device.md#screen-off-timeout), this does not change any global settings, and it works whether the device is plugged in or not.


## Background color

The default background was pure black; it is now dark gray.

It can be changed with `--background-color`, which accepts hexadecimal color codes (in 3-digit or 6-digit format):

```bash
scrcpy --background-color=#234567
scrcpy --background-color=234567  # leading '#' is optional
scrcpy --background-color=#567    # equivalent to #556677
```


## Disconnected icon

When the connection to the device is lost while mirroring, the window previously closed immediately, which could incorrectly suggest that scrcpy had crashed.

To make disconnections clearer, a disconnected icon is now displayed for 2 seconds before closing the window.

The icon replaces the screen content immediately:

<img width="230" height="512" alt="scrcpy_disconnected_2_small" src="https://github.com/user-attachments/assets/3b97ec67-814b-423c-b1dd-5c75036e93c5" />

More details in #6662.


## Meta Quest

Since a Meta Quest firmware upgrade, flickering occurred when mirroring the screen with scrcpy.

A workaround was implemented, so mirroring a Meta Quest now works again.

See the technical details in https://github.com/Genymobile/scrcpy/issues/5913#issuecomment-3677889916.


## High CPU usage with silence

A funny bug: playing silence used much more CPU than playing non-silence, during resampling of audio samples decoded from an OPUS audio stream (resampling was about 40× slower).

It turns out it was caused by [denormals](https://en.wikipedia.org/wiki/Subnormal_number): the OPUS decoder did not produce exact _zeros_, but tiny denormal numbers, which can cause [performance issues](https://en.wikipedia.org/wiki/Subnormal_number#Performance_issues).

This was fixed directly in FFmpeg: https://github.com/Genymobile/scrcpy/issues/6715#issuecomment-4061462344


## More shortcuts

<kbd>F11</kbd> now toggles fullscreen (like <kbd>MOD</kbd>+<kbd>f</kbd>), and <kbd>MOD</kbd>+<kbd>q</kbd> now quits scrcpy.

---

 - BlueSky: [`@scrcpy.bsky.social`](https://bsky.app/profile/scrcpy.bsky.social)
 - Twitter: [`@scrcpy_app`](https://twitter.com/scrcpy_app)
 - Reddit: [`r/scrcpy`](https://www.reddit.com/r/scrcpy)