Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
105.42k stars 10.24k forks source link

adb.exe: error: more than one device/emulator connecting to NSpanel pro. #4180

Open bertheto opened 11 months ago

bertheto commented 11 months ago

Environment

Hello, I have tried many times to connect to my device, but without success. adb succed to connect but not scrcpy... I have read all the articles and issues related to this problem and tried all the solutions, but without success...

My powershell session :

`PS C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1> .\adb devices

PS C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1> .\adb connect 192.168.86.13 connected to 192.168.86.13:5555 PS C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1> .\adb devices List of devices attached 192.168.86.13:5555 device

PS C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1> ./scrcpy scrcpy 2.1.1 https://github.com/Genymobile/scrcpy INFO: ADB device found: INFO: --> (tcpip) 192.168.86.13:5555 device px30_evb C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1\scrcp...1 file pushed, 0 skipped. 2.5 MB/s (56995 bytes in 0.022s) adb.exe: error: more than one device/emulator ERROR: "adb reverse" returned with value 1 WARN: 'adb reverse' failed, fallback to 'adb forward' [server] INFO: Device: [rockchip] rockchip px30_evb (Android 8.1.0) [server] WARN: Audio disabled: it is not supported before Android 11 INFO: Renderer: direct3d WARN: Demuxer 'audio': stream explicitly disabled by the device INFO: Texture: 480x480 ERROR: [FFmpeg] non-existing PPS 0 referenced ERROR: [FFmpeg] decode_slice_header error ERROR: [FFmpeg] no frame! ERROR: Decoder 'video': could not send video packet: -1094995529 ERROR: Demuxer error PS C:\NSPanel Pro HA\platform-tools\scrcpy-win64-v2.1.1>`

Thanks in advance

amondit commented 6 months ago

Hello, It may be an old issue but I got the same one here, and if anyone has the same this is how I managed to resolve it. Issue comes from the fact that the device (SONOFF NSPanel Pro) has an issue with the default video encoder, and you have to manually select the correct one in the scrcpy options for the video to work.

For example, this is the result of the scrcpy -e --list-encoders:

[server] INFO: Device: [rockchip] rockchip px30_evb (Android 8.1.0)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder='OMX.rk.video_encoder.avc'
    --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
[server] INFO: List of audio encoders:
    --audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
    --audio-codec=flac --audio-encoder='OMX.google.flac.encoder'

For me, I had to explicitely select the --video-encoder='OMX.google.h264.encoder' encoder because the rk.video_encoder_avc one did not work with scrcpy.

Working command (for me): scrcpy -e --video-codec=h264 --video-encoder='OMX.google.h264.encoder'

xiaotiannet commented 3 months ago

Hello, It may be an old issue but I got the same one here, and if anyone has the same this is how I managed to resolve it. Issue comes from the fact that the device (SONOFF NSPanel Pro) has an issue with the default video encoder, and you have to manually select the correct one in the scrcpy options for the video to work.

For example, this is the result of the scrcpy -e --list-encoders:

[server] INFO: Device: [rockchip] rockchip px30_evb (Android 8.1.0)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder='OMX.rk.video_encoder.avc'
    --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
[server] INFO: List of audio encoders:
    --audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
    --audio-codec=flac --audio-encoder='OMX.google.flac.encoder'

For me, I had to explicitely select the --video-encoder='OMX.google.h264.encoder' encoder because the rk.video_encoder_avc one did not work with scrcpy.

Working command (for me): scrcpy -e --video-codec=h264 --video-encoder='OMX.google.h264.encoder'

Thank you very much, this method works for me