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>
This commit is contained in:
Romain Vimont
2023-06-01 18:46:50 +02:00
parent 5042f8de93
commit d3c2955fb9
12 changed files with 216 additions and 0 deletions

View File

@@ -61,3 +61,18 @@ It is also possible to disable video and audio playback separately:
# Record both video and audio, but only play video
scrcpy --record=file.mkv --no-audio-playback
```
## Time limit
To limit the recording time:
```bash
scrcpy --record=file.mkv --time-limit=20 # in seconds
```
The `--time-limit` option is not limited to recording, it also impacts simple
mirroring:
```
scrcpy --time-limit=20
```