Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state #5502

Open
zhjyz2 opened this issue Nov 19, 2024 · 1 comment

Comments

@zhjyz2
Copy link

zhjyz2 commented Nov 19, 2024

Environment

  • OS: Windows
  • Scrcpy version: 2.7
  • Installation method: Windows release
  • **Device model:**Oneplus Ace 3v
  • Android version: 14

Describe the bug

When running scrcpy for a random time(several minutes to hours), the mirror get stuck, shut down and give error logs like this, I've used the command scrcpy --turn-screen-off --stay-awake --no-audio -m2768 --print-fps --display-buffer=50 --video-codec=h265 --video-encoder="c2.qti.hevc.encoder"

[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying...
INFO: 63 fps
INFO: 51 fps (+3 frames skipped)
INFO: 64 fps
INFO: 59 fps
INFO: 58 fps (+7 frames skipped)
INFO: 52 fps (+1 frames skipped)
INFO: 61 fps (+1 frames skipped)
INFO: 57 fps
INFO: 64 fps
INFO: 58 fps
INFO: 57 fps (+1 frames skipped)
INFO: 50 fps
ERROR: [FFmpeg] Could not find ref with POC 396
ERROR: [FFmpeg] Invalid number of merging MVP candidates: 6.
WARN: [FFmpeg] Error parsing NAL unit #1.
ERROR: Decoder 'video': could not send video packet: -1094995529
ERROR: Demuxer error

I've also tried the default encoder with the command scrcpy --turn-screen-off --stay-awake --no-audio -m2768 --print-fps --display-buffer=50 , it gets stuck as the same, but it can resume after several retries with the logs like:

[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying...
INFO: 72 fps
INFO: 64 fps
INFO: 76 fps
INFO: 77 fps
INFO: 76 fps
INFO: 76 fps
INFO: 75 fps
INFO: 80 fps
INFO: 75 fps
INFO: 71 fps
INFO: 79 fps
INFO: 75 fps
INFO: 77 fps
ERROR: [FFmpeg] Could not find ref with POC 503
INFO: 42 fps
INFO: 60 fps (+16 frames skipped)
INFO: 77 fps (+5 frames skipped)
INFO: 58 fps
[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

IN[server] INFO: Retrying...
FO: 61 fps
INFO: 52 fps (+6 frames skipped)
INFO: 52 fps
INFO: 54 fps
INFO: 62 fps
INFO: 66 fps
INFO: 59 fps
ERROR: [FFmpeg] Could not find ref with POC 87
INFO: 47 fps
INFO: 23 fps (+2 frames skipped)
INFO: 90 fps (+17 frames skipped)
INFO: 62 fps
INFO: 105 fps (+4 frames skipped)
INFO: 158 fps (+10 frames skipped)
INFO: 77 fps (+67 frames skipped)
INFO: 77 fps (+93 frames skipped)
INFO: 166 fps (+4 frames skipped)
INFO: 140 fps (+4 frames skipped)
ERROR: [FFmpeg] Could not find ref with POC 562
INFO: 85 fps (+15 frames skipped)
INFO: 179 fps (+5 frames skipped)
INFO: 140 fps (+2 frames skipped)
INFO: 171 fps
INFO: 152 fps
INFO: 152 fps
INFO: 168 fps
INFO: 168 fps
INFO: 133 fps
INFO: 103 fps (+2 frames skipped)
INFO: 67 fps (+33 frames skipped)
INFO: 78 fps (+12 frames skipped)
INFO: 76 fps (+11 frames skipped)
INFO: 173 fps
INFO: 183 fps
INFO: 78 fps
INFO: 60 fps (+1 frames skipped)
INFO: 94 fps
INFO: 35 fps
INFO: 14 fps
INFO: 35 fps
@rom1v
Copy link
Collaborator

rom1v commented Nov 19, 2024

Looks like a bug in the encoder on your device :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants