{"id":1258,"date":"2022-07-27T22:53:43","date_gmt":"2022-07-27T14:53:43","guid":{"rendered":"http:\/\/175.24.184.226\/?p=1258"},"modified":"2022-07-27T22:53:43","modified_gmt":"2022-07-27T14:53:43","slug":"scrcpy-%e6%89%8b%e6%9c%ba%e6%97%a0%e7%ba%bf%e6%8a%95%e5%b1%8f%e5%88%b0%e7%94%b5%e8%84%91","status":"publish","type":"post","link":"\/?p=1258","title":{"rendered":"scrcpy &#8211; \u624b\u673a\u65e0\u7ebf\u6295\u5c4f\u5230\u7535\u8111"},"content":{"rendered":"<p><a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/Genymobile\/scrcpy\">scrcpy<\/a> \u662f\u514d\u8d39\u5f00\u6e90\u7684\u6295\u5c4f\u8f6f\u4ef6\uff0c\u652f\u6301\u5c06\u5b89\u5353\u624b\u673a\u5c4f\u5e55\u6295\u653e\u5728 Windows\u3001macOS\u3001GNU\/Linux \u4e0a\uff0c\u5e76\u53ef\u76f4\u63a5\u501f\u52a9\u9f20\u6807\u5728\u6295\u5c4f\u7a97\u53e3\u4e2d\u8fdb\u884c\u4ea4\u4e92\u548c\u5f55\u5236\u3002<\/p>\n<p>\u5e02\u9762\u4e0a\u4e3b\u6d41\u7684\u591a\u5c4f\u534f\u540c\u8f6f\u4ef6\u90fd\u662f\u57fa\u4e8e scrcpy \u5f00\u53d1\uff0c\u5957\u5c42\u76ae\uff0cbug \u51e0\u4e4e\u6ca1\u6539\uff0c\u63a8\u8350\u76f4\u63a5\u4f7f\u7528\u5b98\u65b9\u7684 scrcpy\u3002<\/p>\n<p>\u672c\u6587\u4ee5 Window \u6295\u5c4f\u4e3a\u4f8b\uff0c\u517c\u5bb9 Win10 \u548c Win11\u3002scrcpy \u5b98\u65b9\u4e0b\u8f7d <a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/Genymobile\/scrcpy\/releases\/download\/v1.24\/scrcpy-win64-v1.24.zip\">scrcpy-win64-v1.24.zip<\/a>\uff0c\u6216\u4f7f\u7528\u56fd\u5185\u642c\u8fd0\u94fe\u63a5\uff1a<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/wwz.lanzouf.com\/iezWX03zx4de\">https:\/\/wwz.lanzouf.com\/iezWX03zx4de<\/a>\u3002<\/p>\n<h2>\u6709\u7ebf\u6295\u5c4f<\/h2>\n<ol>\n<li>\u4e0b\u8f7d\u5e76\u89e3\u538b scrcpy\u3002<\/li>\n<li>\u624b\u673a\u7aef\u5f00\u542f <code>\u5f00\u53d1\u8005\u9009\u9879<\/code> \u53ca <code>USB \u8c03\u8bd5<\/code>\u3002\u5f00\u53d1\u8005\u9009\u9879\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5904\u4e8e\u9690\u85cf\u72b6\u6001\uff0c\u8f6c\u5230<code>\u8bbe\u7f6e - \u5173\u4e8e\u624b\u673a<\/code>\uff0c\u7136\u540e\u70b9\u6309\u7248\u672c\u53f7\u4e03\u6b21\uff0c\u8fd4\u56de\u4e0a\u4e00\u5c4f\u5e55\uff0c\u5728\u5e95\u90e8\u53ef\u4ee5\u627e\u5230\u5f00\u53d1\u8005\u9009\u9879\u3002<\/li>\n<li>\u7528\u6570\u636e\u7ebf\u5c06\u624b\u673a\u548c\u7535\u8111\u8fde\u63a5\u8d77\u6765\uff0c\u6b64\u65f6\u624b\u673a\u4e0a\u5f39\u51fa\u6388\u6743\u63d0\u793a\uff0c\u70b9\u51fb <code>\u5141\u8bb8 USB \u8c03\u8bd5<\/code>\u3002<\/li>\n<li>\u53cc\u51fb\u89e3\u538b\u5f97\u5230\u7684 <strong>scrcpy.exe<\/strong> \u6587\u4ef6\uff0c\u5c31\u80fd\u8fdb\u884c\u6709\u7ebf\u6295\u5c4f\u4e86\u3002<\/li>\n<\/ol>\n<h2>\u65e0\u7ebf\u6295\u5c4f<\/h2>\n<p>\u65e0\u7ebf\u6295\u5c4f\u7684\u524d\u63d0\u662f\uff0c<strong>\u7535\u8111\u4e0e\u624b\u673a\u5904\u4e8e\u540c\u4e00\u5c40\u57df\u7f51<\/strong>\u3002<\/p>\n<p>\u6709\u7ebf\u6295\u5c4f\u7684 1-3 \u6b65\u540c\u6837\u9002\u7528\u4e8e\u65e0\u7ebf\u6295\u5c4f\uff0c\u5b8c\u6210\u540e\u6253\u5f00 PowerShell (~ cmd)\uff0c\u4f9d\u6b21\u64cd\u4f5c\u5e76\u8f93\u5165\u4ee3\u7801\u3002<\/p>\n<pre><code># a.\u5c06\u4ee3\u7801\u76ee\u5f55\u5b9a\u4f4d\u5230 scrcpy \u6587\u4ef6\u5939\u3002\ncd D:\\Libraries\\Desktop\\scrcpy-win64-v1.24\n# WIN11 \u5728 scrcpy \u6587\u4ef6\u5939\u4e2d\u53f3\u952e\u300c\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00\u300d\uff0c\u5c06\u81ea\u52a8\u5b9a\u4f4d\u3002\n\u200b\n# b.\u5728\u624b\u673a\u7aef\u5f00\u542f\u300c\u5f00\u53d1\u8005\u9009\u9879\u300d\u53ca\u300cUSB \u8c03\u8bd5\u300d\uff0c\u7136\u540e\u4f7f\u7528\u6570\u636e\u7ebf\u5c06\u624b\u673a\u548c\u7535\u8111\u8fde\u63a5\u5e76\u5141\u8bb8 USB \u8c03\u8bd5\uff0c\u5f00\u542f\u624b\u673a\u7aef\u53e3\n# \u5982\u679c\u672c\u884c\u663e\u793a no device \u6216\u672a\u542f\u52a8 adb\uff0c\u9700\u68c0\u67e5\u300cUSB \u8c03\u8bd5\u300d\u662f\u5426\u5f00\u542f\uff0c\u6216\u66f4\u6362\u6570\u636e\u7ebf\u3002\n# \u6b64\u5916\uff0c\u4e00\u4e9b\u624b\u673a\u9700\u9009\u62e9\u300c\u6587\u4ef6\u4f20\u8f93\u300d\u6a21\u5f0f\u65b9\u80fd\u4f7f\u7528 adb\u3002\n.\\adb tcpip 5555\n\u200b\n# c.\u62d4\u51fa\u624b\u673a\u6570\u636e\u7ebf\uff0c\u5f00\u59cb\u65e0\u7ebf\u6295\u5c4f\u3002(192.168.2.15 \u4e3a\u624b\u673a\u7aef\u7684 WIFI \u5c40\u57df\u7f51 ip\uff0c\u9700\u66f4\u6539)\n.\\adb connect 192.168.2.15:5555\n\u200b\n# d.\u542f\u52a8 scrcpy.exe\n.\\scrcpy\n\n# \u5982\u6709\u62a5\u9519\u6216\u5ef6\u8fdf\u8f83\u5927\uff0c\u53ef\u542f\u52a8\u4f4e\u5206\u8fa8\u7387\u6295\u5c4f\n.\\scrcpy -m 1024\n# \u8fde\u63a5\u591a\u4e2a\u8bbe\u5907\uff0c\u62a5\u9519\u63d0\u793a`failed to get feature set: more than one device\/emulator`\uff0c\u5219\u6307\u5b9a\u8fde\u63a5 tcpip \u8bbe\u5907\n.\\scrcpy -e -m 1024\n# \u7b80\u5316\u64cd\u4f5c\uff1a\u5408\u5e76\u6b65\u9aa4 c \u548c d\uff0c\u4fdd\u6301\u5c4f\u5e55\u5e38\u4eae\uff0c\u4f7f\u7528 1024 \u5206\u8fa8\u7387\n.\\scrcpy --tcpip=192.168.2.15 -w -m 1024\n<\/code><\/pre>\n<p><img src=\"https:\/\/pic3.zhimg.com\/v2-c27cccd41c5370eaeba7c6d22b55f592_r.jpg\" alt=\"\" \/><\/p>\n<h2>\u5c4f\u5e55\u5f55\u5236<\/h2>\n<p>\u5982\u679c\u60f3\u5728\u6295\u5c4f\u7684\u540c\u65f6\uff0c\u5bf9\u624b\u673a\u5c4f\u5e55\u8fdb\u884c\u5f55\u5236\uff0c\u5219\u8f93\u5165\u6309\u4e0b\u65b9\u547d\u4ee4\u64cd\u4f5c\u3002<\/p>\n<pre><code># \u5c06\u4ee3\u7801\u76ee\u5f55\u5b9a\u4f4d\u5230 scrcpy \u6587\u4ef6\u5939\ncd D:\\Libraries\\Desktop\\scrcpy-win64-v1.24\n\u200b\n# \u5f00\u59cb\u5f55\u5236\uff0c\u5f55\u5c4f\u6587\u4ef6\u4f1a\u4ee5\u547d\u4ee4\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u81ea\u52a8\u4fdd\u5b58\u5728\u5f53\u524d\u6587\u4ef6\u5939\u5185\u3002\n.\\scrcpy -r filename.mp4\n\u200b\n# \u5173\u95ed\u6295\u5c4f\u7a97\u53e3\u540e\uff0c\u81ea\u52a8\u505c\u6b62\u5f55\u5c4f\u5e76\u5c06\u89c6\u9891\u4fdd\u5b58\u5728\u76f8\u5e94\u76ee\u5f55\n<\/code><\/pre>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<h3>\u9519\u8bef\u68c0\u67e5<\/h3>\n<p>\u9047\u5230\u62a5\u9519\u65f6\uff0c\u68c0\u67e5\u4e0b\u65b9\u4e09\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u89e3\u51b3 90% \u7684\u9519\u8bef\u3002<\/p>\n<ul>\n<li>\u66f4\u6362\u6570\u636e\u7ebf\uff1b<\/li>\n<li>\u68c0\u67e5\u624b\u673a\u7684\u300c\u672c\u673a IP\u300d\u662f\u5426\u6b63\u786e\uff1b<\/li>\n<li>\u6838\u5bf9\u6709\u7ebf\u8fde\u63a5\u6b65\u9aa4\uff0c<code>\u5f00\u542f USB \u8c03\u8bd5\uff0d\u8fde\u63a5\u624b\u673a\u4e0e\u7535\u8111\uff0d\u542f\u52a8 scrcpy<\/code>\u3002<\/li>\n<\/ul>\n<h3>ERROR: Exception on thread<\/h3>\n<p>\u62a5\u9519 <code>ERROR: Exception on thread Thread[main,5,main]<\/code>\uff0c\u591a\u4e3a\u624b\u673a\u4e0d\u517c\u5bb9 scrcpy \u9ed8\u8ba4\u5206\u8fa8\u7387\u8bbe\u7f6e\u3002\u89e3\u51b3\u65b9\u4f4d\u4e3a\uff0c\u6309\u4e0b\u65b9\u4fee\u6539 scrcpy \u542f\u52a8\u4ee3\u7801\uff0c\u4f7f\u7528\u8f83\u4f4e\u7684\u5206\u8fa8\u7387\u3002<\/p>\n<pre><code># \u4e09\u9879\u8bbe\u7f6e\uff0c\u4efb\u9009\u5176\u4e00\n.\\scrcpy -m 1920\n.\\scrcpy -m 1024\n.\\scrcpy -m 800<\/code><\/pre>\n<h3>\u6295\u5c4f\u6a21\u7cca<\/h3>\n<p>\u5982\u679c\u5c4f\u5e55\u8bbe\u7f6e\u4e86\u7f29\u653e\u6bd4\u4f8b\uff0c\u6295\u5c4f\u754c\u9762\u4f1a\u6a21\u7cca\u3002\u53f3\u952e <strong>scrcpy.exe<\/strong>\uff0c<code>\u5c5e\u6027 - \u517c\u5bb9\u6027 - \u66f4\u6539\u9ad8 DPI \u8bbe\u7f6e<\/code>\uff0c\u7136\u540e\u52fe\u9009\u300c\u66ff\u4ee3\u9ad8 DPI \u7f29\u653e\u884c\u4e3a\u300d\uff0c\u5e94\u7528\u540e\u6295\u5c4f\u6062\u590d\u6b63\u5e38\u3002<\/p>\n<p><img src=\"https:\/\/pic1.zhimg.com\/v2-72aa9f1b112fe964075bfa2c9cb1df14_r.jpg\" alt=\"\" \/><\/p>\n<p>\u66f4\u591a\u95ee\u9898\u62a5\u9519\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u67e5\u770b<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/Genymobile\/scrcpy\/blob\/master\/FAQ.md\">\u5b98\u65b9 FAQ<\/a>\u3002<\/p>\n<hr \/>\n<p>\u6700\u65b0\u7248\u6587\u7ae0\u94fe\u63a5\uff1a<\/p>\n<p><a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/newzone.top\/_posts\/2019-08-26-scrcpy_screen_projection.html\"><\/a><\/p>\n<p>\u672c\u6587\u8f6c\u81ea <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/80264357\">https:\/\/zhuanlan.zhihu.com\/p\/80264357<\/a>\uff0c\u5982\u6709\u4fb5\u6743\uff0c\u8bf7\u8054\u7cfb\u5220\u9664\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>scrcpy \u662f\u514d\u8d39\u5f00\u6e90\u7684\u6295\u5c4f\u8f6f\u4ef6\uff0c\u652f\u6301\u5c06\u5b89\u5353\u624b\u673a\u5c4f\u5e55\u6295\u653e\u5728 Windows\u3001macOS\u3001GNU\/Linux \u4e0a\uff0c\u5e76\u53ef\u76f4\u63a5\u501f\u52a9\u9f20\u6807\u5728\u6295\u5c4f   \u2026 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[86],"tags":[],"_links":{"self":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1258"}],"collection":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1258"}],"version-history":[{"count":1,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1258\/revisions"}],"predecessor-version":[{"id":1259,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1258\/revisions\/1259"}],"wp:attachment":[{"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}