
{"id":51199,"date":"2026-05-14T13:40:48","date_gmt":"2026-05-14T13:40:48","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=51199"},"modified":"2026-05-14T13:40:48","modified_gmt":"2026-05-14T13:40:48","slug":"scrcpy-4-0-resizable-virtual-display","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2026\/05\/scrcpy-4-0-resizable-virtual-display\/","title":{"rendered":"Scrcpy Released 4.0 with Resizable Android Virtual Display"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-43768\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>Scrcpy, the popular tool to mirror and control Android screen on your computer or laptop, released new major 4.0 version a few days ago.<\/p>\n<p>The new version of this free open-source application ported from SDL2 to SDL3, added flex display, and many other exciting new features.<\/p>\n<p><!--more--><\/p>\n<div id=\"attachment_49087\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49087\" class=\"size-large wp-image-49087\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/06\/scrcpy-plcm10-700x475.webp\" alt=\"\" width=\"610\" height=\"414\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/06\/scrcpy-plcm10-700x475.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/06\/scrcpy-plcm10-300x204.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/06\/scrcpy-plcm10-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/06\/scrcpy-plcm10.webp 1154w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><p id=\"caption-attachment-49087\" class=\"wp-caption-text\">Android Screen on Ubuntu Desktop<\/p><\/div>\n<p>First, the new version migrated the backend for video rendering and input handling from SDL2 to SDL3, to benefit from active maintenance, bug fixes, and continued upstream support.<\/p>\n<p>The new SDL3 backend also introduced new features. Previously, it added black borders when resizing (scaling) the Android screen to keep the content aspect ratio. With the new API, the window aspect ratio is preserved while resizing, but without black borders.<\/p>\n<p>Though, if you want, add <code>--no-window-aspect-ratio-lock<\/code> flag when starting scrcpy to restore the old behavior.<\/p>\n<div id=\"attachment_51204\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-51204\" class=\"size-large wp-image-51204\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/scrcpy4-noborders-700x555.webp\" alt=\"\" width=\"610\" height=\"484\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/scrcpy4-noborders-700x555.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/scrcpy4-noborders-300x238.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/scrcpy4-noborders-768x609.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/scrcpy4-noborders.webp 897w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><p id=\"caption-attachment-51204\" class=\"wp-caption-text\">now black borders by default when scaling, but with option to restore<\/p><\/div>\n<p>Scrcpy 3.0 introduced a virtual display feature, allowing to start an app silently in your Android then mirror to PC desktop. So you can play Android games on PC, while the physical Android screen is not affected at the same time.<\/p>\n<p>With version 4.0, you can now <b>resize the virtual display window just like a native PC software window<\/b>. Meaning that you can run Android app or game on PC with custom size that you like.<\/p>\n<p>To enable this feature, start scrcpy with either <code>-x<\/code> or <code>--flex-display<\/code> option, along with <code>--new-display<\/code> which starts a virtual display.<\/p>\n<p>For example, run the command below to start the Android&#8217;s Firefox via virtual display on PC screen with re-sizable support.<\/p>\n<pre>scrcpy --new-display --flex-display --start-app=org.mozilla.firefox<\/pre>\n<p>The resizing may contain glitches, and it preserves the DPI, which is default to 160. Though, you can set custom DPI by <code>--new-display=1920x1080\/240<\/code> option when starting the virtual display, and, increase the bit-rate and change the codec for better quality on large window:<\/p>\n<pre>scrcpy --new-display=1920x1080\/240 --flex-display --video-codec=h265 -b16M<\/pre>\n<div id=\"attachment_51202\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-51202\" class=\"size-large wp-image-51202\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/resize-androidscreen-700x441.webp\" alt=\"\" width=\"610\" height=\"384\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/resize-androidscreen-700x441.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/resize-androidscreen-300x189.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/resize-androidscreen-768x484.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/05\/resize-androidscreen.webp 1430w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><p id=\"caption-attachment-51202\" class=\"wp-caption-text\">Android Virtual Display is resizable<\/p><\/div>\n<p>Scrcpy 4.0 also <b>added more controls for your Android&#8217;s camera.<\/b> You may use <code>--camera-torch<\/code> option to start Android screen mirroring with camera torch on, and\/or use <code>--camera-zoom=1.5<\/code> option to set camera zoom level.<\/p>\n<p>Or, use <code>MOD<\/code> + <code>t<\/code> key combination to turn on camera torch dynamically and use <code>MOD<\/code> + <code>Shift<\/code> + <code>t<\/code> to disable it. And, use <code>MOD<\/code> + <code>Up\/Down<\/code> arrows to zoom in\/out.<\/p>\n<p>It as well introduced new <code>--keep-active<\/code> option to prevent screen from turning off due to idle by simulating user activity.<\/p>\n<p>Other changes in Scrcpy 4.0 include:<\/p>\n<ul>\n<li>New background color command option.<\/li>\n<li>Show a disconnected icon for 2 seconds when connection lost.<\/li>\n<li>Add F11 full-screen shortcut.<\/li>\n<li>Add <code>Mod<\/code> + <code>q<\/code> quit shortcut.<\/li>\n<li>New option to configure the minimum video size alignment.<\/li>\n<li>New option to configure how the rendering fits the window.<\/li>\n<\/ul>\n<h3>Get Scrcpy 4.0<\/h3>\n<p>The official release note as well as the packages for Linux, macOS, and Windows are available in Github via the link below:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/github.com\/Genymobile\/scrcpy\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">Scrcpy Releases<\/a><\/div>\n<\/div>\n<p>For Linux on modern Intel\/AMD platform, select download the &#8220;scrcpy-linux-x86_64-v4.0.tar.gz&#8221; package, then extract, move executable files to your PATH, and done. <\/p>\n<p>For beginners, here&#8217;s a <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2023\/03\/scrcpy-2-0-install-android-remote-control\/\" target=\"_blank\">step by step guide<\/a> show you how to install and use Scrcpy in Ubuntu.<\/p>","protected":false},"excerpt":{"rendered":"<p>Scrcpy, the popular tool to mirror and control Android screen on your computer or laptop, released new major 4.0 version a few days ago. The new version of this free open-source application ported from SDL2 to SDL3, added flex display, and many other exciting new features.<\/p>\n","protected":false},"author":1,"featured_media":43768,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[2051],"class_list":["post-51199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-android"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/51199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=51199"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/51199\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/43768"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=51199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=51199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=51199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}