Allow capturing virtual displays at a lower resolution using -m/--max-size. In the original implementation in #5370, the virtual display size was necessarily the same as the capture size. The --max-size value was only allowed to determine the virtual display size when no explicit size was provided. Since the dpi was scaled down accordingly, it is often better to create a virtual display at the target capture size directly. However, not everything is rendered according to the virtual display DPI. For example, a page in Firefox is rendered too big on small virtual displays. Thus, it makes sense to be able create a virtual display at a given size, and capture it at a lower resolution with --max-size. This is now possible using OpenGL filters. Therefore, change the behavior of --max-size for virtual displays: - --max-size does not impact --new-display without size argument anymore (the virtual display size is the main display size); - it is used to limit the capture size (whether an explicit size is provided or not). This new behavior is consistent with main display capture. Refs #5370 comment <https://github.com/Genymobile/scrcpy/pull/5370#issuecomment-2438944401> Refs #5370 <https://github.com/Genymobile/scrcpy/pull/5370> PR #5506 <https://github.com/Genymobile/scrcpy/pull/5506>
918 B
918 B
Virtual display
New display
To mirror a new virtual display instead of the device screen:
scrcpy --new-display=1920x1080
scrcpy --new-display=1920x1080/420 # force 420 dpi
scrcpy --new-display # use the main display size and density
scrcpy --new-display=/240 # use the main display size and 240 dpi
Start app
On some devices, a launcher is available in the virtual display.
When no launcher is available, the virtual display is empty. In that case, you must start an Android app.
For example:
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
System decorations
By default, virtual display system decorations are enabled. But some devices might display a broken UI;
Use --no-vd-system-decorations
to disable it.
Note that if no app is started, no content will be rendered, so no video frame will be produced at all.