From 6ad037ea043debb1fb240912a8a4b639a5e2d96e Mon Sep 17 00:00:00 2001 From: Bernard Cafarelli Date: Tue, 14 Mar 2023 21:51:54 +0100 Subject: [PATCH 01/13] Update Gentoo instructions scrcpy is available directly in the distro, drop link to the overlay (which only contains older versions). PR #3816 Signed-off-by: Romain Vimont --- doc/linux.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/linux.md b/doc/linux.md index bc354959..68b4ee10 100644 --- a/doc/linux.md +++ b/doc/linux.md @@ -9,12 +9,10 @@ Scrcpy is packaged in several distributions and package managers: - Debian/Ubuntu: `apt install scrcpy` - Arch Linux: `pacman -S scrcpy` - Fedora: `dnf copr enable zeno/scrcpy && dnf install scrcpy` - - Gentoo: [ebuild][ebuild-link] file + - Gentoo: `emerge scrcpy` - Snap: `snap install scrcpy` - … (see [repology](https://repology.org/project/scrcpy/versions)) -[ebuild-link]: https://github.com/maggu2810/maggu2810-overlay/tree/master/app-mobilephone/scrcpy - ### Latest version However, the packaged version is not always the latest release. To install the From 45717733a10b8e73ae70b25722b2ddf5922c1c07 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 15 Mar 2023 00:36:13 +0100 Subject: [PATCH 02/13] Document missing Opus encoder error And how to solve it. --- doc/audio.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/audio.md b/doc/audio.md index 3755fe37..c436eb56 100644 --- a/doc/audio.md +++ b/doc/audio.md @@ -35,6 +35,13 @@ scrcpy --audio-codec=aac scrcpy --audio-codec=raw ``` +In particular, if you get the following error: + +> Failed to initialize audio/opus, error 0xfffffffe + +then your device has no Opus encoder: try `scrcpy --audio-codec=aac`. + + Several encoders may be available on the device. They can be listed by: ```bash From d9a644df9c060ae844cee0bf451af608e5284c66 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 15 Mar 2023 10:36:07 +0100 Subject: [PATCH 03/13] Clarify V4L2 feature in README The previous formulation could suggest that the device camera could be used as a webcam. This is not the case (yet?). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b9e4d46..5bafbe2b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Its features include: - mirroring with [Android device screen off](doc/device.md#turn-screen-off) - [copy-paste](doc/control.md#copy-paste) in both directions - [configurable quality](doc/video.md) - - Android device [as a webcam (V4L2)](doc/v4l2.md) (Linux-only) + - Android device screen [as a webcam (V4L2)](doc/v4l2.md) (Linux-only) - [physical keyboard/mouse simulation (HID)](doc/hid-otg.md) - [OTG mode](doc/hid-otg.md#otg) - and more… From 55899c091e0b4940516cd811a248bad1a9c8cff4 Mon Sep 17 00:00:00 2001 From: NextDev65 <12612637+NextDev65@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:26:45 -0500 Subject: [PATCH 04/13] Fix typo in doc/audio.md The documentation is about audio bit rate, not video bit rate. PR #3839 Signed-off-by: Romain Vimont --- doc/audio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/audio.md b/doc/audio.md index c436eb56..bd324465 100644 --- a/doc/audio.md +++ b/doc/audio.md @@ -62,7 +62,7 @@ check `--audio-codec-options` in the manpage or in `scrcpy --help`. ## Bit rate -The default video bit-rate is 128Kbps. To change it: +The default audio bit-rate is 128Kbps. To change it: ```bash scrcpy --audio-bit-rate=64K From 478aece68f2b24def8f9be198a733a106b25616f Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 20 Mar 2023 08:35:13 +0100 Subject: [PATCH 05/13] Replace "bit-rate" with "bit rate" --- app/scrcpy.1 | 4 ++-- app/src/cli.c | 4 ++-- doc/audio.md | 2 +- doc/video.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/scrcpy.1 b/app/scrcpy.1 index 65357686..1ea65796 100644 --- a/app/scrcpy.1 +++ b/app/scrcpy.1 @@ -21,7 +21,7 @@ Make scrcpy window always on top (above other windows). .TP .BI "\-\-audio\-bit\-rate " value -Encode the audio at the given bit\-rate, expressed in bits/s. Unit suffixes are supported: '\fBK\fR' (x1000) and '\fBM\fR' (x1000000). +Encode the audio at the given bit rate, expressed in bits/s. Unit suffixes are supported: '\fBK\fR' (x1000) and '\fBM\fR' (x1000000). Default is 128K (128000). @@ -57,7 +57,7 @@ The available encoders can be listed by \-\-list\-encoders. .TP .BI "\-b, \-\-video\-bit\-rate " value -Encode the video at the given bit\-rate, expressed in bits/s. Unit suffixes are supported: '\fBK\fR' (x1000) and '\fBM\fR' (x1000000). +Encode the video at the given bit rate, expressed in bits/s. Unit suffixes are supported: '\fBK\fR' (x1000) and '\fBM\fR' (x1000000). Default is 8M (8000000). diff --git a/app/src/cli.c b/app/src/cli.c index cb101a51..69559afc 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -116,7 +116,7 @@ static const struct sc_option options[] = { .longopt_id = OPT_AUDIO_BIT_RATE, .longopt = "audio-bit-rate", .argdesc = "value", - .text = "Encode the audio at the given bit-rate, expressed in bits/s. " + .text = "Encode the audio at the given bit rate, expressed in bits/s. " "Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000).\n" "Default is 128K (128000).", }, @@ -160,7 +160,7 @@ static const struct sc_option options[] = { .shortopt = 'b', .longopt = "video-bit-rate", .argdesc = "value", - .text = "Encode the video at the given bit-rate, expressed in bits/s. " + .text = "Encode the video at the given bit rate, expressed in bits/s. " "Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000).\n" "Default is 8M (8000000).", }, diff --git a/doc/audio.md b/doc/audio.md index bd324465..bf286809 100644 --- a/doc/audio.md +++ b/doc/audio.md @@ -62,7 +62,7 @@ check `--audio-codec-options` in the manpage or in `scrcpy --help`. ## Bit rate -The default audio bit-rate is 128Kbps. To change it: +The default audio bit rate is 128Kbps. To change it: ```bash scrcpy --audio-bit-rate=64K diff --git a/doc/video.md b/doc/video.md index a2e9d106..a0dbf7dd 100644 --- a/doc/video.md +++ b/doc/video.md @@ -21,7 +21,7 @@ If encoding fails, scrcpy automatically tries again with a lower definition ## Bit rate -The default video bit-rate is 8 Mbps. To change it: +The default video bit rate is 8 Mbps. To change it: ```bash scrcpy --video-bit-rate=2M From 2d3059e1ab687a18123636784f1e98ac653d3469 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 20 Mar 2023 19:40:35 +0100 Subject: [PATCH 06/13] Reference FAQ from HID/OTG documentation Reference the FAQ section about "HID/OTG issues on Windows" from the HID/OTG documentation. --- doc/hid-otg.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/hid-otg.md b/doc/hid-otg.md index c64af752..7dfc60fc 100644 --- a/doc/hid-otg.md +++ b/doc/hid-otg.md @@ -106,3 +106,7 @@ scrcpy --otg # keyboard and mouse Like `--hid-keyboard` and `--hid-mouse`, it only works if the device is connected over USB. + +## HID/OTG issues on Windows + +See [FAQ](/FAQ.md#hidotg-issues-on-windows). From 21df2c240e544b1c1eba7775e1474c1c772be04b Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 23 Mar 2023 19:02:14 +0100 Subject: [PATCH 07/13] Mention necessary reboot After setting "USB debugging (security settings)", a reboot is necessary. --- FAQ.md | 2 ++ README.md | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 25bae5d5..484e9c50 100644 --- a/FAQ.md +++ b/FAQ.md @@ -159,6 +159,8 @@ In developer options, enable: > **USB debugging (Security settings)** > _Allow granting permissions and simulating input via USB debugging_ +Rebooting the device is necessary once this option is set. + [simulating input]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323 diff --git a/README.md b/README.md index 5bafbe2b..ddcc565a 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,8 @@ Make sure you [enabled USB debugging][enable-adb] on your device(s). On some devices, you also need to enable [an additional option][control] `USB debugging (Security Settings)` (this is an item different from `USB debugging`) -to control it using a keyboard and mouse. +to control it using a keyboard and mouse. Rebooting the device is necessary once +this option is set. [control]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323 From 00534b0b2d06a2b31a94e2bbbfe35961a9b8879a Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 28 Mar 2023 08:30:43 +0200 Subject: [PATCH 08/13] Fix typo in FAQ --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 484e9c50..30155808 100644 --- a/FAQ.md +++ b/FAQ.md @@ -231,4 +231,4 @@ Translations of this FAQ in other languages are available in the [wiki]. [wiki]: https://github.com/Genymobile/scrcpy/wiki -Only this README file is guaranteed to be up-to-date. +Only this FAQ file is guaranteed to be up-to-date. From a1e8a340016875cfea4b42b326026889d684f221 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 28 Mar 2023 08:29:41 +0200 Subject: [PATCH 09/13] Fix documentation link in FAQ --- FAQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index 30155808..a6eaeefa 100644 --- a/FAQ.md +++ b/FAQ.md @@ -170,12 +170,12 @@ The default text injection method is [limited to ASCII characters][text-input]. A trick allows to also inject some [accented characters][accented-characters], but that's all. See [#37]. -Since scrcpy v1.20, it is possible to simulate a [physical keyboard][hid] (HID). +It is also possible to simulate a [physical keyboard][hid] (HID). [text-input]: https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3Aunicode [accented-characters]: https://blog.rom1v.com/2018/03/introducing-scrcpy/#handle-accented-characters [#37]: https://github.com/Genymobile/scrcpy/issues/37 -[hid]: README.md#physical-keyboard-simulation-hid +[hid]: doc/hid-otg.md ## Client issues From 8f0b38cc4f503ea16dd57c705ae0ede81efc8630 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 31 Mar 2023 07:51:34 +0200 Subject: [PATCH 10/13] Specify in README that OTG does not require adb --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ddcc565a..9969dc51 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,9 @@ this option is set. [control]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323 +Note that USB debugging is not required to run scrcpy in [OTG +mode](doc/hid-otg.md#otg). + ## Get the app From cb20bcb16f4ca191e237c8744a7c2e6d29701d60 Mon Sep 17 00:00:00 2001 From: parknich081 <45834520+parknich081@users.noreply.github.com> Date: Wed, 26 Apr 2023 09:49:26 -0400 Subject: [PATCH 11/13] Clarify API versions that support Audio Forwarding Reword the supported API versions for audio forwarding sentence to clarify that it supports API >= 30 PR #3949 Signed-off-by: Romain Vimont --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9969dc51..9002031d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Its features include: The Android device requires at least API 21 (Android 5.0). -[Audio forwarding](doc/audio.md) is supported from API 30 (Android 11). +[Audio forwarding](doc/audio.md) is supported for API >= 30 (Android 11+). Make sure you [enabled USB debugging][enable-adb] on your device(s). From 958f22490b3ab86677bd8b6126ddaa4de4082798 Mon Sep 17 00:00:00 2001 From: Marek Madejski Date: Tue, 16 May 2023 12:53:58 +0200 Subject: [PATCH 12/13] Document installation via winget on Windows PR #4005 Refs #1444 Refs #3932 Signed-off-by: Romain Vimont --- doc/windows.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/windows.md b/doc/windows.md index 521ad45e..2cbd99b6 100644 --- a/doc/windows.md +++ b/doc/windows.md @@ -15,7 +15,13 @@ Download the [latest release]: and extract it. -Alternatively, you could install it from packages manager, like [Chocolatey]: +Alternatively, you could install it from packages manager, like [Winget]: + +```bash +winget install scrcpy +``` + +or [Chocolatey]: ```bash choco install scrcpy @@ -30,6 +36,7 @@ scoop install scrcpy scoop install adb # if you don't have it yet ``` +[Winget]: https://github.com/microsoft/winget-cli [Chocolatey]: https://chocolatey.org/ [Scoop]: https://scoop.sh From 4ad74794255b7669a89c023afc7ae7a2c0da4dc3 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 8 Jun 2023 08:52:21 +0200 Subject: [PATCH 13/13] Add missing shortcut in documentation MOD+Backspace also triggers BACK. --- doc/shortcuts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/shortcuts.md b/doc/shortcuts.md index 6528e7b4..5e706402 100644 --- a/doc/shortcuts.md +++ b/doc/shortcuts.md @@ -29,7 +29,7 @@ _[Super] is typically the Windows or Cmd key._ | Resize window to 1:1 (pixel-perfect) | MOD+g | Resize window to remove black borders | MOD+w \| _Double-left-click¹_ | Click on `HOME` | MOD+h \| _Middle-click_ - | Click on `BACK` | MOD+b \| _Right-click²_ + | Click on `BACK` | MOD+b \| MOD+Backspace \| _Right-click²_ | Click on `APP_SWITCH` | MOD+s \| _4th-click³_ | Click on `MENU` (unlock screen)⁴ | MOD+m | Click on `VOLUME_UP` | MOD+ _(up)_