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 >
2 years ago
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 >
2 years ago
Romain Vimont
45a5e560df
Add server option send_dummy_byte
...
If set to false, no dummy byte is written to detect a connection error.
PR #2971 <https://github.com/Genymobile/scrcpy/pull/2971 >
2 years ago
Romain Vimont
3ba32c2a0d
Add server option send_device_meta
...
Similar to send_device_frame, this option allows to disable sending the
device name and size on start.
This is only useful when using the scrcpy-server alone to get a raw
H.264 stream, without using the scrcpy client.
PR #2971 <https://github.com/Genymobile/scrcpy/pull/2971 >
2 years ago
Romain Vimont
6b21f4ae13
Reorder scrcpy-server options
...
Move the options unused by the scrcpy client at the end.
These options may be useful to use scrcpy-server directly (to get a raw
H.264 stream for example).
PR #2971 <https://github.com/Genymobile/scrcpy/pull/2971 >
2 years ago
Romain Vimont
15bf27afdd
Make auto-downsize on error optional
...
Add --no-downsize-on-error option to disable attempts to use a lower
definition on MediaCodec error.
PR #2947 <https://github.com/Genymobile/scrcpy/pull/2947 >
2 years ago
Romain Vimont
4c47598865
Make lockVideoOrientation option name uniform
...
On the server, the option was named lockedVideoOrientation.
3 years ago
Romain Vimont
04e5537f8c
Pass server parameters as key=value pairs
...
The options values to configure the server were identified by their
command-line argument index. Now that there are a lot of arguments, many
of them being booleans, it became unreadable and error-prone.
Identify the arguments by a key string instead, and make them optional.
This will also simplify running the server manually for debugging.
3 years ago
Romain Vimont
2c3099e2de
Parse codec options early
...
For consistency with other options, parse the codec options on the
server before storing them in the Options instance.
3 years ago
Romain Vimont
6abff46c9f
Add option to disable clipboard autosync
...
By default, scrcpy automatically synchronizes the computer clipboard to
the device clipboard before injecting Ctrl+v, and the device clipboard
to the computer clipboard whenever it changes.
This new option --no-clipboard-autosync disables this automatic
synchronization.
Fixes #2228 <https://github.com/Genymobile/scrcpy/issues/2228 >
PR #2817 <https://github.com/Genymobile/scrcpy/pull/2817 >
3 years ago
Yu-Chen Lin
1d615a0d51
Support power off on close
...
PR #824 <https://github.com/Genymobile/scrcpy/pull/824 >
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Tzah Mazuz
76c2c6e69d
Adding new option --encoder
...
Some devices have more than one encoder, and some encoders may cause
issues or crash. With this option we can specify which encoder we want
the device to use.
PR #1827 <https://github.com/Genymobile/scrcpy/pull/1827 >
Fixes #1810 <https://github.com/Genymobile/scrcpy/issues/1810 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont
3df63c579d
Configure server verbosity from the client
...
Send the requested log level from the client.
This paves the way to configure it via a command-line argument.
4 years ago
Tzah Mazuz
080a4ee365
Add --codec-options
...
Add a command-line parameter to pass custom options to the device
encoder (as a comma-separated list of "key[:type]=value").
The list of possible codec options is available in the Android
documentation:
<https://d.android.com/reference/android/media/MediaFormat >
PR #1325 <https://github.com/Genymobile/scrcpy/pull/1325 >
Refs #1226 <https://github.com/Genymobile/scrcpy/pull/1226 >
Co-authored-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont
c77024314d
Add an option to keep the device awake
...
Add an option to prevent the device to sleep:
scrcpy --stay-awake
scrcpy -w
The initial state is restored on exit.
Fixes #631 <https://github.com/Genymobile/scrcpy/issues/631 >
4 years ago
Romain Vimont
4668638ee1
Handle "show touches" on the device-side
...
Now that the server can access the Android settings and clean up
properly, handle the "show touches" option from the server.
The initial state is now correctly restored, even on device
disconnection.
4 years ago
e_vigurskiy
4150eedcdf
Add display id parameter
...
Add --display command line parameter to specify a display id.
PR #1238 <https://github.com/Genymobile/scrcpy/pull/1238 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
George Stamoulis
1982bc439b
Add option to lock video orientation
...
PR #1151 <https://github.com/Genymobile/scrcpy/pull/1151 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont
1d97d7213d
Add option --max-fps
...
Add an option to limit the capture frame rate. It only works for devices
with Android >= 10.
Fixes <https://github.com/Genymobile/scrcpy/issues/488 >
5 years ago
Romain Vimont
acc4dcd520
Disable server controller if --no-control
...
If --no-control is disabled, there is no need for a controller.
It also avoids to power on the device on start if control is disabled.
5 years ago
Romain Vimont
345f8858d3
Send frame meta only if recording is enabled
...
The client needs the PTS for each frame only if recording is enabled.
Otherwise, the PTS are not necessary, and the protocol is more
straighforward.
6 years ago
Romain Vimont
caa9e30004
Add crop feature
...
Add an option to crop the screen on the server. This allows to mirror
only part of the device screen.
6 years ago
Romain Vimont
1038bad385
Make it work over tcpip
...
"adb reverse" currently does not work over tcpip (i.e. on a device
connected by "adb connect"):
<https://issuetracker.google.com/issues/37066218 >
To work around the problem, if the call to "adb reverse" fails, then
fallback to "adb forward", and reverse the client/server roles.
Keep the "adb reverse" mode as the default because it does not involve
connection retries: when using "adb forward", the client must try to
connect successively until the server listens.
Due to the tunnel, every connect() will succeed, so the client must
attempt to read() to detect a connection failure. For this purpose, when
using the "adb forward" mode, the server initially writes a dummy byte,
read by the client.
Fixes <https://github.com/Genymobile/scrcpy/issues/5 >.
6 years ago
Romain Vimont
6b546a87ab
Add bit-rate command-line option
...
Add a command-line option (-b/--bit-rate) to customize the video
bit-rate.
6 years ago
Romain Vimont
ee93f3f23a
Rename maximum_size to max_size
...
The long option is --max-size, so for consistency, adapt the code
accordingly.
6 years ago
Romain Vimont
b67907e24e
Convert server to an Android project
...
To simplify the device server-side build, use gradle to create an APK,
even if we use it as a simple jar, by running its main() method.
6 years ago