Comments (19)
@mikhoul Maybe you could increase the definition until it fails.
scrcpy -m 1024
scrcpy -m 1280
…
from scrcpy.
The command scrcpy -b2M -m800
did get it working for me.
from scrcpy.
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
from scrcpy.
I can get scrcpy -m 1650
to work but I fail at scrcpy -m 1700
Inserting -b2M
doesn't effect the outcome. Even reducing to -b1M
doesn't allow 1700.
from scrcpy.
I think Replicant may be the offender here.
Yes, probably it does not include something required to encode to H.264 in hardware.
from scrcpy.
Hi,
From Gentoo, i've got an error
/usr/local/share/scrcpy/scrcpy-server.jar: 1 file pushed. 1.8 MB/s (19038 bytes in 0.010s)
CRITICAL: Could not create renderer: Couldn't find matching render driver
ERROR: Could not open video stream
package installed media-video/ffmpeg-3.3.6:0/55.57.57::gentoo
but i can't install media-video/libav-11.8:0/11::gentoo
:-(
from scrcpy.
hi, I'm also on arch and try to use my chuwi hi12 both with precompiled scrcpy-server.jar and with self rolled current dev branch. both works very fine for some seconds and then crash with:
INFO: Initial texture: 2160x1440
Invalid return value 0 for stream protocol
ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at ERROR: Exception on thread Thread[Thread-10,5,main]
android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:628)
at java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at com.genymobile.scrcpy.wrappers.InputManager.injectInputEvent(InputManager.java:31)
at com.genymobile.scrcpy.Device.injectInputEvent(Device.java:97)
at com.genymobile.scrcpy.EventController.injectEvent(EventController.java:163)
at com.genymobile.scrcpy.EventController.injectMouse(EventController.java:133)
at com.genymobile.scrcpy.EventController.handleEvent(EventController.java:79)
at com.genymobile.scrcpy.EventController.control(EventController.java:65)
at com.genymobile.scrcpy.Server$1.run(Server.java:34)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.genymobile.scrcpy.wrappers.InputManager.injectInputEvent(InputManager.java:29)
installed is the original android (5.1 - rooted and free from preinstalled spyware)
any hints would be nice!
great project btw, thank you very much! found it today via cnx-software
from scrcpy.
while searching for the "Invalid return value 0 for stream protocol" crash, I found this mpv issue:
mpv-player/mpv#5118. no idea if it is triggered by the same problem, but looks like it is caused by a "wrong backported ffmpeg", so it might be arch related. after many gentoo years I switched to arch for my main system just a few months ago, so I don't have too old ffmpeg versions in my pacman cache which could work. downgrading to ffmpeg-1:3.4.1-1 (and its dependencies of course) didn't help anything.
from scrcpy.
@Necklaces Did you find any solution to the error
Works well for my android device but not for the emulator. Heres the error i got.
➜ ~ scrcpy
/usr/local/share/scrcpy/scrcpy-server.jar: ...le pushed. 1.3 MB/s (19038 bytes in 0.014s)
2018-03-13 12:20:57.823 scrcpy[6894:419807] INFO: Initial texture: 540x960
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:251)
2018-03-13 12:20:58.428 scrcpy[6894:419909] ERROR: Could not open video stream
from scrcpy.
@arnoldlaishram No I could unfortunately not find any solution, I tried compiling using webm instead of video/avc but that didn't work either and gave the same error, it seems replicant doesn't have a lot of the video encoders.
from scrcpy.
Windows 10 / Java 8 have the same problem with wireless. Just have this hint:
$ ./scrcpy.exe -b2M
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
INFO: Initial texture: 1920x1200
ERROR: Could not open video stream
environment
$java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
$ver
Microsoft Windows [Version 10.0.14393]
from scrcpy.
@gam2046 I'm not sure, but your error log seems to have something with #5 to do. Maybe try updating your adb / android tools.
from scrcpy.
@Necklaces emmmm , I'm using scrcpy-windows-with-deps-v1.1.zip
.
It already contains the latest version of ADB
$ ./adb version
Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
The same device, I try to connect through USB is working properly, but failed through the network.
from scrcpy.
The same device, I try to connect through USB is working properly, but failed through the network.
@gam2046 Please try on master
branch (there was a fix for this since the last release).
from scrcpy.
@rom1v I tried compiling this project myself and connecting devices through the network ADB again. But still failed
$ scrcpy
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
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
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
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
INFO: Initial texture: 1200x1920
Maybe it has something to do with Android version, so I tried two devices. One Android 7.0 device is all right, and the other Android 5.1.1 shows the above prompt.
from scrcpy.
Same problem here using Windows 10 and scrcpy-win64-v1.2.zip
Works on an HTC M8S Android V6.0.1
Gives this on an Acer Iconia B3-A40FHD Android V7.0 and exits.
PS D:\ScrCpy\scrcpy-win64> ./adb devices
List of devices attached
730009486815 device
PS D:\ScrCpy\scrcpy-win64> ./adb shell
acer_asgardfhd:/ $ exit
PS D:\ScrCpy\scrcpy-win64> .\scrcpy.exe
scrcpy-server.jar: 1 file pushed.
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:2018)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:69)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:22)
at com.genymobile.scrcpy.Server.main(Server.java:78)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:294)
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
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
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
INFO: Initial texture: 1920x1200
PS D:\ScrCpy\scrcpy-win64>
from scrcpy.
Same issue with Nexus 7 on Android 6.0.1
from scrcpy.
@Gmanzee commented on 4 juil. 2018 à 04:11 UTC−4:
The command
scrcpy -b2M -m800
did get it working for me.
Same here it worked for me, it's a little bit blurry but at least it work 👍👍👍
I've made a batch file so when I encounter a device that don't work "normally" I use the batch file to start SCRCPY .
Regards
Thanks for this fix
from scrcpy.
scrcpy -b2M -m800
Worked for me too. I used an Ulefone Armor 3WT
from scrcpy.
Related Issues (20)
- Mic
- ERROR: REGISTER_HID: libusb error: Pipe error WARN: Register HID keyboard failed on MacOS HOT 1
- Mouse click not working but Keyboard works perfectly HOT 3
- [Feature request] Digital zoom hotkeys for camera mode HOT 1
- Can't use it HOT 2
- Stream audio from PC to phone
- Can audio be played at the same time? PC and Phone. HOT 1
- encoder cant be found (before c2.avc used to work) HOT 2
- NoSuchMethodException: android.view.SurfaceControl.createDisplay (Google Pixel 6 Pro Android 15 Beta 1) HOT 2
- i cant control my phone from pc HOT 2
- How can capture screen when scrcpy window is working HOT 1
- Audio forwarding can still work when open mic on Gaming (Pubg mobile) HOT 1
- Connected to phone but disconnects all network locations HOT 5
- Performance Optimization Needed for Modified scrcpy Project HOT 1
- USB Debugging HOT 5
- Password
- ERROR: Could not find any ADB device...ERROR: Server connection failed HOT 1
- Samsung mobile phone screen mirroring cannot zoom in when opening the camera
- Switch control shortcut option for pc to android or android to pc HOT 5
- server version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrcpy.