Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1v committed Jun 21, 2023
2 parents b931562 + 4ad7479 commit 744312e
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 17 deletions.
8 changes: 5 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -168,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
Expand Down Expand Up @@ -229,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.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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…
Expand All @@ -39,18 +39,22 @@ 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).

[enable-adb]: https://developer.android.com/studio/debug/dev-options#enable

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

Note that USB debugging is not required to run scrcpy in [OTG
mode](doc/hid-otg.md#otg).


## Get the app

Expand Down
4 changes: 2 additions & 2 deletions app/scrcpy.1
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -71,7 +71,7 @@ Default is 5.

.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).

Expand Down
4 changes: 2 additions & 2 deletions app/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,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).",
},
Expand Down Expand Up @@ -185,7 +185,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).",
},
Expand Down
9 changes: 8 additions & 1 deletion doc/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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
Expand All @@ -91,7 +98,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
Expand Down
4 changes: 4 additions & 0 deletions doc/hid-otg.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
4 changes: 1 addition & 3 deletions doc/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _<kbd>[Super]</kbd> is typically the <kbd>Windows</kbd> or <kbd>Cmd</kbd> key._
| Resize window to 1:1 (pixel-perfect) | <kbd>MOD</kbd>+<kbd>g</kbd>
| Resize window to remove black borders | <kbd>MOD</kbd>+<kbd>w</kbd> \| _Double-left-click¹_
| Click on `HOME` | <kbd>MOD</kbd>+<kbd>h</kbd> \| _Middle-click_
| Click on `BACK` | <kbd>MOD</kbd>+<kbd>b</kbd> \| _Right-click²_
| Click on `BACK` | <kbd>MOD</kbd>+<kbd>b</kbd> \| <kbd>MOD</kbd>+<kbd>Backspace</kbd> \| _Right-click²_
| Click on `APP_SWITCH` | <kbd>MOD</kbd>+<kbd>s</kbd> \| _4th-click³_
| Click on `MENU` (unlock screen)⁴ | <kbd>MOD</kbd>+<kbd>m</kbd>
| Click on `VOLUME_UP` | <kbd>MOD</kbd>+<kbd>↑</kbd> _(up)_
Expand Down
2 changes: 1 addition & 1 deletion doc/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion doc/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 744312e

Please sign in to comment.