remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
3.87k stars 283 forks source link

when I run scrcpy, all I see is a green window. why? #393

Open tianyi725 opened 1 year ago

tianyi725 commented 1 year ago

I successfully ran redroid using docker. Installing the apk was also successful.

[oo@oo-pc ~]$ adb install 600.apk
Performing Streamed Install
Success

But when I run scrcpy, all I see is a green window. I don't understand. Why?

I didn't find any answers Can you help me? thank you

my system: arch linux for orangepi 5 plus

[oo@oo-pc ~]$ scrcpy
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 102.1 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: redroid redroid11_arm64 (Android 11)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
    at android.media.MediaCodec.native_setup(Native Method)
    at android.media.MediaCodec.<init>(MediaCodec.java:1912)
    at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1875)
    at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
    at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
    at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
    at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
    at java.lang.Thread.run(Thread.java:923)
INFO: Renderer: opengl
INFO: OpenGL version: 3.0 Mesa 23.0.0-devel (git-120202c675)
INFO: Trilinear filtering enabled
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Initial texture: 1080x1920
INFO: [FFmpeg] Decoder noticed an info change (1080x1920), format=0
INFO: [FFmpeg] Decoder is set to use MppBuffer with NV12.
INFO: [FFmpeg] Decoder noticed an info change (1080x1920), format=0
INFO: [FFmpeg] Decoder is set to use MppBuffer with NV12.
zhouziyang commented 1 year ago

Can you provide the full debug logs?

canoziia commented 11 months ago

try flags: --video-codec=h265 --video-encoder='c2.rk.hevc.encoder', these solved the green window issue for me (my device is nanopc-t6). I find that the green window will disappear gradually after screen content change.