Code Monkey home page Code Monkey logo

Comments (19)

rom1v avatar rom1v commented on May 22, 2024 12

@mikhoul Maybe you could increase the definition until it fails.

scrcpy -m 1024
scrcpy -m 1280
…

from scrcpy.

Gmanzee avatar Gmanzee commented on May 22, 2024 9

The command scrcpy -b2M -m800 did get it working for me.

from scrcpy.

lilith645 avatar lilith645 commented on May 22, 2024 3

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.

Gmanzee avatar Gmanzee commented on May 22, 2024 2

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.

rom1v avatar rom1v commented on May 22, 2024

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.

yesi avatar yesi commented on May 22, 2024

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.

frostworx avatar frostworx commented on May 22, 2024

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.

frostworx avatar frostworx commented on May 22, 2024

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.

arnoldlaishram avatar arnoldlaishram commented on May 22, 2024

@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.

Necklaces avatar Necklaces commented on May 22, 2024

@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.

Lua12138 avatar Lua12138 commented on May 22, 2024

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.

Necklaces avatar Necklaces commented on May 22, 2024

@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.

Lua12138 avatar Lua12138 commented on May 22, 2024

@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.

rom1v avatar rom1v commented on May 22, 2024

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.

Lua12138 avatar Lua12138 commented on May 22, 2024

@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.

Gmanzee avatar Gmanzee commented on May 22, 2024

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.

alfeg avatar alfeg commented on May 22, 2024

Same issue with Nexus 7 on Android 6.0.1

from scrcpy.

mikhoul avatar mikhoul commented on May 22, 2024

@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 :octocat:

Thanks for this fix

from scrcpy.

RogerioDoCarmo avatar RogerioDoCarmo commented on May 22, 2024

scrcpy -b2M -m800

Worked for me too. I used an Ulefone Armor 3WT

from scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.