scrcpy
scrcpy copied to clipboard
xfinity streaming IllegalStateException
- [X ] I have read the FAQ.
- [X ] I have searched in existing issues.
Note: while I have searched existing issues and some are similar, I'm not so familiar with the program to know if they are duplicates.
Environment
- OS: Ubuntu 20.04
- scrcpy version: 1.24
- installation method: snap
- device model: Computer is a recent HP laptop. Phone is motorola moto g power (2021) (Android 11)
- Android version: 11
Describe the bug Connect android phone. Run scrcpy. It works fine. It displays the screen, and also youtube videos.
Then run a program called xfinity streaming on the android, which is a video application provided by the internet provider (comcast & xfinity). When this runs, the display is fine on the android. However, scrcpy crashes.
I tried other encoders. The first one crashed. The other two showed a black screen instead of the video.
Any ideas?
$ scrcpy
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (41159 bytes in 0.069s)
[server] INFO: Device: motorola moto g power (2021) (Android 11)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 20.0.8
INFO: Trilinear filtering enabled
INFO: Initial texture: 1600x720
../src/intel/isl/isl.c:1988: FINISHME: ../src/intel/isl/isl.c:isl_surf_get_ccs_surf: CCS for 8BPP textures with 3+ miplevels is disabled, but support for more levels is possible.
INFO: New texture: 720x1600
INFO: New texture: 1600x720
INFO: New texture: 720x1600
INFO: New texture: 1600x720
INFO: New texture: 720x1600
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
WARN: Device disconnected
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3452)
at com.genymobile.scrcpy.ScreenEncoder.encode(ScreenEncoder.java:152)
at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:102)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:74)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:101)
at com.genymobile.scrcpy.Server.main(Server.java:335)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
WARN: Killing the server...
sam@HP-Pavilion-Laptop-2:~$
The other two showed a black screen instead of the video.
It's expected that you could not capture video for some streaming app (i.e. netflix), often due to DRM.
The first one crashed
What is the name of the first encoder? The stacktrace is the same as #3051.
I had a similar experience with my Redmi Note 10 Pro Max (sweetin
) running MIUI 12.5 (A11) — which doesn't have the issue introduced in MIUI13 (A12).
I noticed that scrcpy
has no issues in operation until I play a DRM protected video in a learning app on my device. It only crashes if I play the video, but otherwise works fine with the said app and has the same stacktrace as #3051.
I'm not sure if this started after an update but just the day before I first encountered this, scrcpy
was working fine even with the videos (with flag_secure
turned off) or at least it would display a black filler.
Hello,
This is happening for me too when running apps using DRM (for example Disney+), on a Pixel 2 XL (Android 11). I'm using the encoder OMX.google.h264.encoder, which is working fine otherwise. Please note that because it is Android 11, I can say that it is happening on an app with Widevine level 1 for me (Disney+), as Widevine level 3 are displaying the video, and that I have a frozen black video. This is the normal behaviour, but I'm still crashing sometimes when launching the video, which tells me something is going wrong when we have a DRM Widevine level 1 on the screen.
Hello, I'm doing a little comment again for this problem. Is there anything we could provide when this error is happening to help on the debug ?