scrcpy: ERROR: Could not open video stream
On Arch GNU/Linux, built scrcpy using the released .jar.
meson x --buildtype release --strip -Db_lto=true \
-Dprebuilt_server=/path/to/scrcpy-server.jar
cd x
ninja
sudo ninja install
I have a Samsung Galaxy Note II N7100 running Replicant 6.0 0003. The resulution should be 720x1280.
$ scrcpy -m 1280
/usr/local/share/scrcpy/scrcpy-server.jar: 1 file pushed. 1.9 MB/s (19038 bytes in 0.009s)
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
ERROR: Could not open video stream
ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:1901)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:69)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:21)
at com.genymobile.scrcpy.Server.main(Server.java:70)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:258)
INFO: Initial texture: 720x1280
Any ideas? I think Replicant may be the offender here.
Edit: installed android sdk aura -A android-sdk
and built my own .jar; same result.
Edit2: Does not affect Samsung S9 with Stock or LineageOS
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19
Commits related to this issue
- fix:Add Support For Meizu Phone Fix the error case by flyme nightMode. issue #1 — committed to NickStemerdink/scrcpy by olbb 5 years ago
- fix:Add Support For Meizu Phone Fix the error case by flyme nightMode. issue #1 — committed to NickStemerdink/scrcpy by olbb 5 years ago
- fix:Add Support For Meizu Phone Fix the error case by flyme nightMode. issue #1 — committed to NickStemerdink/scrcpy by olbb 5 years ago
- Expose socket interruption On Linux, socket functions are unblocked by shutdown(), but on Windows they are unblocked by closesocket(). Expose net_interrupt() and net_close() to abstract these differ... — committed to Genymobile/scrcpy by rom1v 3 years ago
- Expose socket interruption On Linux, socket functions are unblocked by shutdown(), but on Windows they are unblocked by closesocket(). Expose net_interrupt() and net_close() to abstract these differ... — committed to Genymobile/scrcpy by rom1v 3 years ago
- Fix socket close race condition The server needs to interrupt the sockets on stop, but it must not close them while other threads may attempt to read from or write to them. In particular, the video_... — committed to Genymobile/scrcpy by rom1v 2 years ago
@mikhoul Maybe you could increase the definition until it fails.
The command
scrcpy -b2M -m800
did get it working for me.I had this issue too, I have very little to do with this program until 5min ago, But seems like this error has been very briefly looked at before in Issue #73 Using the lower resolution/bitrate with the parameters,
scrcpy -b2M -m800
I can get
scrcpy -m 1650
to work but I fail atscrcpy -m 1700
Inserting-b2M
doesn’t effect the outcome. Even reducing to-b1M
doesn’t allow 1700.