Update documentation about video orientation

orientation.10
Romain Vimont 6 months ago
parent c546293f35
commit cdd78273dc

@ -101,6 +101,16 @@ scrcpy --video-source=camera --camera-size=1920x1080 -m3000 # error
``` ```
## Rotation
To rotate the captured video, use the [video orientation](video.md#orientation)
option:
```
scrcpy --video-source=camera --camera-size=1920x1080 --orientation=90
```
## Frame rate ## Frame rate
By default, camera is captured at Android's default frame rate (30 fps). By default, camera is captured at Android's default frame rate (30 fps).

@ -50,6 +50,12 @@ scrcpy --record=file --record-format=mkv
``` ```
## Rotation
The video can be recorded rotated. See [video
orientation](video.md#orientation).
## No playback ## No playback
To disable playback while recording: To disable playback while recording:

@ -97,39 +97,50 @@ scrcpy --video-codec=h264 --video-encoder='OMX.qcom.video.encoder.avc'
``` ```
## Rotation ## Orientation
The rotation may be applied at 3 different levels: The orientation may be applied at 3 different levels:
- The [shortcut](shortcuts.md) <kbd>MOD</kbd>+<kbd>r</kbd> requests the - The [shortcut](shortcuts.md) <kbd>MOD</kbd>+<kbd>r</kbd> requests the
device to switch between portrait and landscape (the current running app may device to switch between portrait and landscape (the current running app may
refuse, if it does not support the requested orientation). refuse, if it does not support the requested orientation).
- `--lock-video-orientation` changes the mirroring orientation (the orientation - `--lock-video-orientation` changes the mirroring orientation (the orientation
of the video sent from the device to the computer). This affects the of the video sent from the device to the computer). This affects the
recording. recording.
- `--rotation` rotates only the window content. This only affects the display, - `--orientation` is applied on the client side, and affects display and
not the recording. It may be changed dynamically at any time using the recording. For the display, it can be changed dynamically using
[shortcuts](shortcuts.md) <kbd>MOD</kbd>+<kbd></kbd> and [shortcuts](shortcuts.md).
<kbd>MOD</kbd>+<kbd></kbd>.
To lock the mirroring orientation: To lock the mirroring orientation (on the capture side):
```bash ```bash
scrcpy --lock-video-orientation # initial (current) orientation scrcpy --lock-video-orientation # initial (current) orientation
scrcpy --lock-video-orientation=0 # natural orientation scrcpy --lock-video-orientation=0 # natural orientation
scrcpy --lock-video-orientation=1 # 90° counterclockwise scrcpy --lock-video-orientation=90 # 90° clockwise
scrcpy --lock-video-orientation=2 # 180° scrcpy --lock-video-orientation=180 # 180°
scrcpy --lock-video-orientation=3 # 90° clockwise scrcpy --lock-video-orientation=270 # 270° clockwise
``` ```
To set an initial window rotation: To orient the video (on the rendering side):
```bash ```bash
scrcpy --rotation=0 # no rotation scrcpy --orientation=0
scrcpy --rotation=1 # 90 degrees counterclockwise scrcpy --orientation=90 # 90° clockwise
scrcpy --rotation=2 # 180 degrees scrcpy --orientation=180 # 180°
scrcpy --rotation=3 # 90 degrees clockwise scrcpy --orientation=270 # 270° clockwise
scrcpy --orientation=flip0 # hflip
scrcpy --orientation=flip90 # hflip + 90° clockwise
scrcpy --orientation=flip180 # vflip (hflip + 180°)
scrcpy --orientation=flip270 # hflip + 270°
``` ```
The orientation can be set separately for display and record if necessary, via
`--display-orientation` and `--record-orientation`.
The rotation is applied to a recorded file by writing a display transformation
to the MP4 or MKV target file. Flipping is not supported, so only the 4 first
values are allowed when recording.
## Crop ## Crop
The device screen may be cropped to mirror only part of the screen. The device screen may be cropped to mirror only part of the screen.

Loading…
Cancel
Save