Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
106.43k stars 10.31k forks source link

[server] ERROR: Encoding error: java.lang.IllegalStateException: null #4754

Open AzuraChannel opened 4 months ago

AzuraChannel commented 4 months ago

[server] ERROR: Encoding error: java.lang.IllegalStateException: null [server] INFO: Retrying with -m1280... [server] INFO: Retrying... INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 NVIDIA 391.35 INFO: Trilinear filtering disabled WARN: Demuxer 'audio': stream explicitly disabled by the device INFO: Texture: 1600x720 [server] ERROR: Encoding error: java.lang.IllegalStateException: null [server] INFO: Retrying with -m1024... [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: null [server] INFO: Retrying with -m800... [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: null WARN: Device di[server] ERROR: Exception on thread Thread[video,5,main] java.lang.IllegalStateException at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2792) at com.genymobile.scrcpy.SurfaceEncoder.encode(SurfaceEncoder.java:157) at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:76) at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253) at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)s at java.lang.Thread.run(Thread.java:919)c onnected

Device: Realme C3(previously worked)

rom1v commented 4 months ago

Which scrcpy version?

AzuraChannel commented 4 months ago

Which scrcpy version?

2.4

rom1v commented 4 months ago

Try with another encoder.

AzuraChannel commented 4 months ago

Try with another encoder.

Still the same

AzuraChannel commented 4 months ago

Try with another encoder.

[server] ERROR: Exception on thread Thread[video,5,main] java.lang.IllegalStateException at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2792) at com.genymobile.scrcpy.SurfaceEncoder.encode(SurfaceEncoder.java:157) at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:76) at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253) at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4) at java.lang.Thread.run(Thread.java:919) INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 NVIDIA 391.35 INFO: Trilinear filtering disabled WARN: Demuxer 'audio': stream explicitly disabled by the device INFO: Texture: 720x1600 WARN: Device disconnected

rom1v commented 4 months ago

Encoder issue on the device.

Does it work with screenrecord?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4
AzuraChannel commented 4 months ago

Encoder issue on the device.

Does it work with screenrecord?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

redfin:/ $ adb shell screenrecord /sdcard/file.mp4 /system/bin/sh: adb: inaccessible or not found

rom1v commented 4 months ago

adb must be executed from the computer.

From the device, directly call screenrecord /sdcard/file.mp4 with shell rights.

AzuraChannel commented 4 months ago

adb must be executed from the computer.

From the device, directly call screenrecord /sdcard/file.mp4 with shell rights.

it work with screenrecord