Video
Source
Section titled “Source”By default, scrcpy mirrors the device screen.
It is possible to capture the device camera instead.
See the dedicated camera page.
By default, scrcpy attempts to mirror at the Android device resolution.
It might be useful to mirror at a lower definition to increase performance. To limit both width and height to some maximum value (here 1024):
scrcpy --max-size=1024scrcpy -m 1024 # short versionThe other dimension is computed so that the Android device aspect ratio is preserved. That way, a device in 1920×1080 will be mirrored at 1024×576.
If encoding fails, scrcpy automatically tries again with a lower definition
(unless --no-downsize-on-error is enabled).
For camera mirroring, the --max-size value is used to select the camera source
size instead (among the available resolutions).
Bit rate
Section titled “Bit rate”The default video bit rate is 8 Mbps. To change it:
scrcpy --video-bit-rate=2Mscrcpy --video-bit-rate=2000000 # equivalentscrcpy -b 2M # short versionFrame rate
Section titled “Frame rate”The capture frame rate can be limited:
scrcpy --max-fps=15The actual capture frame rate may be printed to the console:
scrcpy --print-fpsIt may also be enabled or disabled at anytime with MOD+i (see shortcuts).
The frame rate is intrinsically variable: a new frame is produced only when the screen content changes. For example, if you play a fullscreen video at 24fps on your device, you should not get more than 24 frames per second in scrcpy.
The video codec can be selected. The possible values are h264 (default),
h265 and av1:
scrcpy --video-codec=h264 # defaultscrcpy --video-codec=h265scrcpy --video-codec=av1H265 may provide better quality, but H264 should provide lower latency. AV1 encoders are not common on current Android devices.
For advanced usage, to pass arbitrary parameters to the MediaFormat,
check --video-codec-options in the manpage or in scrcpy --help.
Encoder
Section titled “Encoder”Several encoders may be available on the device. They can be listed by:
scrcpy --list-encodersSometimes, the default encoder may have issues or even crash, so it is useful to try another one:
scrcpy --video-codec=h264 --video-encoder=OMX.qcom.video.encoder.avcOrientation
Section titled “Orientation”The orientation may be applied at 3 different levels:
- The shortcut MOD+r requests the device to switch between portrait and landscape (the current running app may refuse, if it does not support the requested orientation).
--capture-orientationchanges the mirroring orientation (the orientation of the video sent from the device to the computer). This affects the recording.--orientationis applied on the client side, and affects display and recording. For the display, it can be changed dynamically using shortcuts.
To capture the video with a specific orientation:
scrcpy --capture-orientation=0scrcpy --capture-orientation=90 # 90° clockwisescrcpy --capture-orientation=180 # 180°scrcpy --capture-orientation=270 # 270° clockwisescrcpy --capture-orientation=flip0 # hflipscrcpy --capture-orientation=flip90 # hflip + 90° clockwisescrcpy --capture-orientation=flip180 # hflip + 180°scrcpy --capture-orientation=flip270 # hflip + 270° clockwiseThe capture orientation can be locked by using @, so that a physical device
rotation does not change the captured video orientation:
scrcpy --capture-orientation=@ # locked to the initial orientationscrcpy --capture-orientation=@0 # locked to 0°scrcpy --capture-orientation=@90 # locked to 90° clockwisescrcpy --capture-orientation=@180 # locked to 180°scrcpy --capture-orientation=@270 # locked to 270° clockwisescrcpy --capture-orientation=@flip0 # locked to hflipscrcpy --capture-orientation=@flip90 # locked to hflip + 90° clockwisescrcpy --capture-orientation=@flip180 # locked to hflip + 180°scrcpy --capture-orientation=@flip270 # locked to hflip + 270° clockwiseThe capture orientation transform is applied after --crop, but before
--angle.
To orient the video (on the client side):
scrcpy --orientation=0scrcpy --orientation=90 # 90° clockwisescrcpy --orientation=180 # 180°scrcpy --orientation=270 # 270° clockwisescrcpy --orientation=flip0 # hflipscrcpy --orientation=flip90 # hflip + 90° clockwisescrcpy --orientation=flip180 # vflip (hflip + 180°)scrcpy --orientation=flip270 # hflip + 270° clockwiseThe 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.
To rotate the video content by a custom angle (in degrees, clockwise):
scrcpy --angle=23The center of rotation is the center of the visible area.
This transformation is applied after --crop and --capture-orientation.
The device screen may be cropped to mirror only part of the screen.
This is useful, for example, to mirror only one eye of the Oculus Go:
scrcpy --crop=1224:1440:0:0 # 1224x1440 at offset (0,0)The values are expressed in the device natural orientation (portrait for a phone, landscape for a tablet).
Cropping is performed before --capture-orientation and --angle.
For display mirroring, --max-size is applied after cropping. For camera,
--max-size is applied first (because it selects the source size rather than
resizing the content).
Display
Section titled “Display”If several displays are available on the Android device, it is possible to select the display to mirror:
scrcpy --display-id=1The list of display ids can be retrieved by:
scrcpy --list-displaysA secondary display may only be controlled if the device runs at least Android 10 (otherwise it is mirrored as read-only).
It is also possible to create a virtual display.
Buffering
Section titled “Buffering”By default, there is no video buffering, to get the lowest possible latency.
Buffering can be added to delay the video stream and compensate for jitter to get a smoother playback (see #2464).
The configuration is available independently for the display, v4l2 sinks and audio playback.
scrcpy --video-buffer=50 # add 50ms buffering for video playbackscrcpy --audio-buffer=200 # set 200ms buffering for audio playbackscrcpy --v4l2-buffer=300 # add 300ms buffering for v4l2 sinkThey can be applied simultaneously:
scrcpy --video-buffer=50 --v4l2-buffer=300No playback
Section titled “No playback”It is possible to capture an Android device without playing video or audio on the computer. This option is useful when recording or when v4l2 is enabled:
scrcpy --v4l2-sink=/dev/video2 --no-playbackscrcpy --record=file.mkv --no-playback# interrupt with Ctrl+CIt is also possible to disable video and audio playback separately:
# Send video to V4L2 sink without playing it, but keep audio playbackscrcpy --v4l2-sink=/dev/video2 --no-video-playback
# Record both video and audio, but only play videoscrcpy --record=file.mkv --no-audio-playbackNo video
Section titled “No video”To disable video forwarding completely, so that only audio is forwarded:
scrcpy --no-videoVideo4Linux
Section titled “Video4Linux”See the dedicated Video4Linux page.