I have this message and then nothing happens.
I'm running v1.7 both 32 and 64 bits.
I'm using Android 8.1
scrcpy-server.jar: 1 file pushed. 2.7 MB/s (19346 bytes in 0.007s)
ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:1956)
at android.media.MediaCodec.configure(MediaCodec.java:1885)
at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:158)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:28)
at com.genymobile.scrcpy.Server.main(Server.java:110)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:316)
Exit due to uncaughtException in main thread:
ERROR: Could not open video stream
INFO: Initial texture: 1080x2336
WARN: Cannot terminate server
Press any key to continue...
OK, Solved, don't worry.
Just went in the CMD to the folder where scrcpy is unziped, then use this:
scrcpy -m 1080
and it works!!!
very good!it works
Thanks much you saved on me. It works perfect.
Why it happened?
@jimmyalvarezcalderon https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#i-get-an-error-could-not-open-video-stream
Thanks to @DamianWalkerStrauss 's answer, I was able to make this last error of a series of errors go away.
IMHO this issue should not be closed just based on the readme note, since when we google we end up here.
The server error is not clear.
% scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (24773 bytes in 0.037s)
INFO: Initial texture: 1080x2160
[server] ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e
at android.media.MediaCodec.native_configure(Native Method)
WARN: Device disconnected
This doesn't give much clues and we end up googling the error and reading the answer here.
Maybe a simple message like:
% scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (24773 bytes in 0.037s)
INFO: Initial texture: 1080x2160
INFO: If this screen don't work, try with '-m 1080' or another lower resolution
[server] ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e
at android.media.MediaCodec.native_configure(Native Method)
WARN: Device disconnected
Just that would prevent a lot of frustration.
Thanks for this great software. Really enjoy it now after days of builds and apts and snaps and deb packages until I got it working.
This doesn't give much clues and we end up googling the error and reading the answer here.
Maybe a simple message like:
…
This is already what scrcpy does: https://github.com/Genymobile/scrcpy/commit/8a694a97855333849976bea5e558eaa45add0168
This problem is that the error code can only be read since API 23 (Android 6), and I guess your device is API 21 (Android 5), so it can't know which exact error it is.
Most helpful comment
OK, Solved, don't worry.
Just went in the CMD to the folder where scrcpy is unziped, then use this:
scrcpy -m 1080
and it works!!!