Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.15k stars 10.8k forks source link

Screen display issue - maybe only a library missing #5521

Closed vdel78 closed 3 days ago

vdel78 commented 3 days ago

Hi everyone,

I post a picture of my device screen while running scrcpy, does anybody have an idea? Maybe it is just a missing library? I install it by installing scrcpy github repository as it is recommanded (debian pre packed seems to be outaded). Thanks for any answer :-)

Capture du 2024-11-24 11-53-36

Here is the answer of the terminal:

cool@pop-os:~$ scrcpy
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  GS290CTM804530                  device  GS290
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 6.6 MB/s (71200 bytes in 0.010s)
[server] INFO: Device: [Gigaset] gigaset GS290 (Android 12)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.3-1pop1~1711635559~22.04~7a9f319
INFO: Trilinear filtering enabled
INFO: Texture: 1080x2336
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: Retrying with -m1920...
[server] INFO: Retrying...
INFO: Texture: 888x1920
rom1v commented 3 days ago

Try with another encoder (cf --list-encoders).

Also try the current development branch (here are recent binaries: https://github.com/Genymobile/scrcpy/pull/5515#issuecomment-2495589621).

vdel78 commented 3 days ago

Wow! What a full and quick answer! Thanks a lot!

cool@pop-os:~$ scrcpy --list-encoders
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  GS290CTM804530                  device  GS290
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 6.6 MB/s (71200 bytes in 0.010s)
[server] INFO: Device: [Gigaset] gigaset GS290 (Android 12)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder='OMX.MTK.VIDEO.ENCODER.AVC'
    --video-codec=h264 --video-encoder='c2.android.avc.encoder'
    --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
[server] INFO: List of audio encoders:
    --audio-codec=opus --audio-encoder='c2.android.opus.encoder'
    --audio-codec=aac --audio-encoder='c2.android.aac.encoder'
    --audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
    --audio-codec=flac --audio-encoder='c2.android.flac.encoder'
    --audio-codec=flac --audio-encoder='OMX.google.flac.encoder'

And it works with these two commands:

scrcpy --video-codec=h264 --video-encoder='c2.android.avc.encoder'
scrcpy --video-codec=h264 --video-encoder='OMX.google.h264.encoder'

Found on internet it can be H265 or AV1 to.

Issue solved thank's!