v1.19

Genymobile/scrcpyv1.19Sep 10, 2021by rom1v

AI Summary

Introduced optional video buffering to reduce stuttering, improved the behavior of the screen-off feature, and fixed Windows path handling.

Key Highlights

  • Implemented optional buffering to reduce jitter
  • Made --turn-screen-off work even with --no-display
  • Fixed Windows issues with non-ASCII paths

New Features

  • --display-buffer
  • --v4l2-buffer
  • Improved --turn-screen-off behavior

Full Release Notes

_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:

```bash
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](https://user-images.githubusercontent.com/543275/125527579-dc506790-51c5-4af2-a87e-41fd86b5a280.png)

**TL;DR:** if you use scrcpy for live-streaming on Linux, use [v4l2](https://github.com/Genymobile/scrcpy#v4l2loopback) with some buffering, and capture the V4L2 source via [OBS](https://obsproject.com):

```
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
```