Romain Vimont
6a103c809f
Add UHID mouse support
...
Use the following command:
scrcpy --mouse=uhid
PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473 >
2024-03-01 00:52:13 +01:00
Simon Chan
840680f546
Add UHID keyboard support
...
Use the following command:
scrcpy --keyboard=uhid
PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-03-01 00:51:54 +01:00
Simon Chan
ea98d49bae
Introduce --keyboard and --mouse
...
Until now, there was two modes for keyboard and mouse:
- event injection using the Android system API (default)
- HID/AOA over USB
For this reason, the options were exposed as simple flags:
- -K or --hid-keyboard to enable physical keyboard simulation (AOA)
- -M or --hid-mouse to enable physical mouse simulation (AOA)
Replace them by explicit --keyboard and --mouse options, with 3 possible
values:
- disabled
- sdk (default)
- aoa
This will allow to add a new mode (uhid).
PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-03-01 00:51:15 +01:00
Romain Vimont
a9d6cb5837
Add --record-orientation
...
Add an option to store the orientation to apply in a recorded file.
Only rotations are supported (not flips).
PR #4441 <https://github.com/Genymobile/scrcpy/pull/4441 >
2023-11-23 23:34:46 +01:00
Romain Vimont
2f92686930
Pass --lock-video-orientation argument in degrees
...
For consistency with the new --display-orientation option, express the
--lock-video-orientation in degrees clockwise:
* --lock-video-orientation=0 -> --lock-video-orientation=0
* --lock-video-orientation=3 -> --lock-video-orientation=90
* --lock-video-orientation=2 -> --lock-video-orientation=180
* --lock-video-orientation=1 -> --lock-video-orientation=270
PR #4441 <https://github.com/Genymobile/scrcpy/pull/4441 >
2023-11-23 23:27:32 +01:00
Romain Vimont
bb88b60227
Add --display-orientation
...
Deprecate the option --rotation and introduce a new option
--display-orientation with the 8 possible orientations (0, 90, 180, 270,
flip0, flip90, flip180 and flip270).
New shortcuts MOD+Shift+(arrow) dynamically change the display
(horizontal or vertical) flip.
Fixes #1380 <https://github.com/Genymobile/scrcpy/issues/1380 >
Fixes #3819 <https://github.com/Genymobile/scrcpy/issues/3819 >
PR #4441 <https://github.com/Genymobile/scrcpy/pull/4441 >
2023-11-23 23:27:28 +01:00
Romain Vimont
200488111e
Add support for RAW audio (WAV) recording
...
RAW audio forwarding was supported but not for recording.
Add support for recording a raw audio stream to a `.wav` file (and
`.mkv`).
2023-11-15 21:05:38 +01:00
megapro17
4857c5dd59
Add support for FLAC audio codec
...
PR #4410 <#https://github.com/Genymobile/scrcpy/pull/4410 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-11-15 12:02:57 +01:00
Andrew Gunnerson
6af4bd601f
Add support for high frame rate camera capture
...
Add --camera-high-speed to enable high frame rate camera capture. If
the option is enabled, then --camera-fps is mandatory.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-10-31 15:57:06 +01:00
Andrew Gunnerson
4722bff423
Add --camera-fps
...
Add a new option for specifying the camera frame rate.
By default, Android's default frame rate (30 fps) is used.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-10-31 15:57:06 +01:00
Romain Vimont
dd36d6135f
Support camera size selection using -m/--camera-ar
...
In addition to --camera-size to specify an explicit size, make it
possible to select the camera size automatically, respecting the maximum
size (already used for display mirroring) and an aspect ratio.
For example, "scrcpy --video-source=camera" followed by:
- (no additional arguments)
: mirrors at the maximum size, any a-r
- -m1920
: only consider valid sizes having both dimensions not above 1920
- --camera-ar=4:3
: only consider valid sizes having an aspect ratio of 4:3 (+/- 10%)
- -m2048 --camera-ar=1.6
: only consider valid sizes having both dimensions not above 2048
and an aspect ratio of 1.6 (+/- 10%)
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
2023-10-31 15:57:06 +01:00
Simon Chan
faebb7d70a
Add --camera-facing
...
Add an option to select the camera by its lens facing (front, back or
external).
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-10-31 15:57:06 +01:00
Romain Vimont
d544e577c0
Automatically select audio source
...
If --audio-source is not specified, select the default value
according to the video source:
- for display mirroring, use device audio by default;
- for camera mirroring, use microphone by default.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
2023-10-31 15:57:06 +01:00
Simon Chan
bfeecc0131
Add camera mirroring
...
Add --video-source=camera, and related options:
- --camera-id=<id>: select the camera by its id (see --list-cameras);
- --camera-size=<width>x<height>: select the capture size.
Fixed #241 <https://github.com/Genymobile/scrcpy/issues/241 >
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-10-31 15:57:06 +01:00
Romain Vimont
f032262cd7
Add --list-camera-sizes
...
Add an option to list the device camera declared sizes.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
2023-10-31 15:57:06 +01:00
Simon Chan
cd63896d63
Add --list-cameras
...
Add an option to list the device cameras.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-10-31 15:56:25 +01:00
Romain Vimont
f085765e04
Factorize --list- options handling
...
This will limit code duplication as more list options will be added.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213 >
2023-10-31 12:45:40 +01:00
Romain Vimont
d3c2955fb9
Add --time-limit
...
Add an option to stop scrcpy automatically after a given delay.
PR #4052 <https://github.com/Genymobile/scrcpy/pull/4052 >
Fixes #3752 <https://github.com/Genymobile/scrcpy/issues/3752 >
2023-06-10 16:04:51 +02:00
Romain Vimont
a3cdf1a6b8
Add option to kill adb on close
...
Killing adb on close by default would be incorrect, since it would break
any other usage of adb in parallel.
It could be easily done manually by calling "adb kill-server" once
scrcpy terminates, but add an option --kill-adb-on-close for
convenience.
Fixes #205 <https://github.com/Genymobile/scrcpy/issues/205 >
Fixes #2580 <https://github.com/Genymobile/scrcpy/issues/2580 >
Fixes #4049 <https://github.com/Genymobile/scrcpy/issues/4049 >
2023-06-05 19:48:21 +02:00
Romain Vimont
ff5ffc892f
Add option to select audio source
...
Pass --audio-source=mic to capture the microphone instead of the device
audio output.
2023-06-01 09:21:09 +02:00
Romain Vimont
1efbfe1175
Add separate video and audio playback options
...
Add --no-video-playback and --no-audio-playback. The option
--no-playback is now an alias for both.
PR #4033 <https://github.com/Genymobile/scrcpy/pull/4033 >
2023-05-27 10:08:10 +02:00
Romain Vimont
6ad46d70b8
Define v4l2_buffer only if HAVE_V4L2
...
If V4L2 support is disabled, there is no v4l2 buffer option.
2023-05-27 09:55:49 +02:00
Romain Vimont
a2c8910006
Rename --no-mirror to --no-playback
...
This option impacts video and audio _playback_. For example, if we use
V4L2, the device is still "mirrored" (via V4L2), even if playback is
disabled. Therefore, "playback" is more approriate than "mirror".
The initial option --no-display option was renamed to --no-mirror by
commit 6928acdeac
, but this has never been
released, so it is ok to rename it one more time.
Refs #3978 <https://github.com/Genymobile/scrcpy/pull/3978#issuecomment-1549420103 >
PR #4033 <https://github.com/Genymobile/scrcpy/pull/4033 >
2023-05-27 09:55:38 +02:00
Romain Vimont
b11b363e8e
Add recording to aac file
...
It is just an alias for mp4.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978 >
2023-05-08 17:11:34 +02:00
Romain Vimont
7321db6f28
Add recording to opus file
...
Use the FFmpeg opus muxer to record an opus file.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978 >
2023-05-08 17:11:34 +02:00
Romain Vimont
d6bcde565f
Accept .m4a and .mka
...
These are just aliases for mp4 and mkv when there is no video stream.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978 >
2023-05-08 17:11:34 +02:00
Romain Vimont
8c650e53cd
Add --no-video
...
Similar to --no-audio, add --no-video to play audio only.
Fixes #3842 <https://github.com/Genymobile/scrcpy/issues/3842 >
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978 >
2023-05-08 17:11:34 +02:00
Romain Vimont
6928acdeac
Rename --no-display to --no-mirror
...
The option impacts both video and audio playback, so "no display" is not
an appropriate name.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978 >
2023-05-08 16:40:58 +02:00
Romain Vimont
39544f34b4
Add --audio-output-buffer
...
On some systems, the SDL audio callback is not called frequently enough
(for example it requests 5ms of samples every 10ms), because the output
buffer is too small.
By default, we want to use a small value (5ms) to minimize latency and
buffer underrun, but if it does not work well, users need a way to
increase it.
Refs #3793 <https://github.com/Genymobile/scrcpy/issues/3793 >
2023-03-14 23:54:07 +01:00
Romain Vimont
d2952c7e93
Add --audio-codec=raw option
...
Add support for raw (PCM S16 LE) audio codec (a raw decoder is included
in FFmpeg).
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
df55bc2683
Add --audio-buffer
...
Expose an option to add a buffering delay (in milliseconds) before
playing audio.
This is similar to the options --display-buffer and --v4l2-buffer for
video frames.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
c1528cdca9
Add --require-audio
...
By default, scrcpy mirrors only the video when audio capture fails on
the device. Add an option to force scrcpy to fail if audio is enabled
but does not work.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
b65301f672
Add --list-displays
...
Add an option to list the device displays properly.
2023-03-10 22:22:15 +01:00
Romain Vimont
9196dc1563
Add --list-encoders
...
Add an option to list the device encoders properly.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
f9960e959f
Add --audio-encoder
...
Similar to --video-encoder, but for audio.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
b03c864c70
Add --audio-codec-options
...
Similar to --video-codec-options, but for audio.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
4601735e51
Add support for AAC audio codec
...
Add option --audio-codec=aac.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
839b842aa7
Add --audio-codec
...
Introduce the selection mechanism. Alternative codecs will be added
later.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
0870b8c8be
Add --audio-bit-rate
...
Add an option to configure the audio bit-rate.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
e694619d53
Rename --encoder to --video-encoder
...
This prepares the introduction of --audio-encoder.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
31555fa530
Rename --codec-options to --video-codec-options
...
This prepares the introduction of --audio-codec-options.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
9087e85c3f
Rename --bit-rate to --video-bit-rate
...
This prepares the introduction of --audio-bit-rate.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
cee40ca047
Rename --codec to --video-codec
...
This prepares the introduction of --audio-codec.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Simon Chan
3cf03e4a4b
Add --no-audio option
...
Audio will be enabled by default (when supported). Add an option to
disable it.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2023-03-10 22:22:15 +01:00
Romain Vimont
d2dce51038
Add support for AV1
...
Add option --codec=av1.
PR #3713 <https://github.com/Genymobile/scrcpy/pull/3713 >
2023-02-06 11:00:49 +01:00
Romain Vimont
4342c5637d
Add support for H265
...
Add option --codec=h265.
PR #3713 <https://github.com/Genymobile/scrcpy/pull/3713 >
Fixes #3092 <https://github.com/Genymobile/scrcpy/issues/3092 >
2023-02-06 11:00:49 +01:00
Romain Vimont
3e517cd40e
Add option to select video codec
...
Introduce the selection mechanism. Alternative codecs will be added in
further commits.
PR #3713 <https://github.com/Genymobile/scrcpy/pull/3713 >
2023-02-06 10:58:45 +01:00
Romain Vimont
0fca2ad830
Add option to not power on on start
...
By default, on start, the device is powered on. To prevent this
behavior, add a new option --no-power-on.
Fixes #3148 <https://github.com/Genymobile/scrcpy/issues/3148 >
PR #3210 <https://github.com/Genymobile/scrcpy/pull/3210 >
2022-04-28 19:12:52 +02:00
Romain Vimont
4b018be789
Add --print-fps to enable FPS counter on start
...
The FPS counter could be enabled/disabled via MOD+i.
Add a command line option to enable it on start. This is consistent with
other features like --turn-screen-off or --fullscreen.
Fixes #468 <https://github.com/Genymobile/scrcpy/issues/468 >
PR #3030 <https://github.com/Genymobile/scrcpy/pull/3030 >
2022-02-18 18:16:50 +01:00
Romain Vimont
ccbe370cc5
Add --no-cleanup option
...
It might be useful not to cleanup on exit, for example to leave the
screen turned off, or keep the server binary on the device (via the
server option "cleanup=false").
Fixes #1764 <https://github.com/Genymobile/scrcpy/issues/1764 >
PR #3020 <https://github.com/Genymobile/scrcpy/pull/3020 >
2022-02-15 19:25:57 +01:00