scrcpy 运行错误 夜神手机模拟器

win10
scrcpy版本: scrcpy-win64-v1.14.zip
夜神模拟器:安卓:5.1
已通过adb连接设备
错误代码:
C:\Users\huanh>scrcpy -s 127.0.0.1:62001
INFO: scrcpy 1.14 https://github.com/Genymobile/scrcpy
C:\Android\scrcpy-win64-v1.14\scrcpy-server: 1 f…ed, 0 skipped. 33.9 MB/s (33142 bytes in 0.001s)
[server] INFO: Device: samsung SM-N960F (Android 5.1.1)
[server] ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0x80001001
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:577)
at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:205)
at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:55)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:76)
at com.genymobile.scrcpy.Server.main(Server.java:225)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:264)
INFO: Created renderer: direct3d
INFO: Renderer: direct3d
INFO: Initial texture: 896x1600
WARN: Device disconnected
Press any key to continue…

尝试一下wifi模式呢

Scrcpy uses adb to communicate with the device, and adb can connect to a device over TCP/IP:

1. Connect the device to the same Wi-Fi as your computer.
2. Get your device IP address (in Settings → About phone → Status).
3. Enable adb over TCP/IP on your device:  `adb tcpip 5555` .
4. Unplug your device.
5. Connect to your device:  `adb connect DEVICE_IP:5555`   *(replace  `DEVICE_IP` )* .
6. Run  `scrcpy`  as usual.

尝试一下限制大小看看

Reduce size
Sometimes, it is useful to mirror an Android device at a lower definition to increase performance.
To limit both the width and height to some value (e.g. 1024):

      scrcpy --max-size 1024
      scrcpy -m 1024  # short version

The other dimension is computed to that the device aspect ratio is preserved. That way, a device in 1920×1080 will be mirrored at 1024×576.

adb devices检查下设备是否正常连接

我给的错误信息第四行表示它找到设备了,而且限制size也报同样的错误

检查下数据线连接是否稳定,或者更换数据线试试

我用的是手机模拟器,本地电脑 的IP 是192.168的网段,模拟器通过adb shell 查看netcfg 的几个IP是172.17的网段,模拟器不能脱离电脑直接去连电脑相同的wifi啊

正常连接的

不好意思,我没写是模拟器

装个mumu试试呢,夜神模拟器很少用,一步一步排查,确认下是不是模拟器的问题

google下不就解决了, 说是color format不支持,修改下就行了。

没有找到可以修改的位置,那还是先用其它模拟器吧