-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
ERROR: Could not open video stream #1
Comments
Yes, probably it does not include something required to encode to H.264 in hardware. |
Hi, From Gentoo, i've got an error
package installed media-video/ffmpeg-3.3.6:0/55.57.57::gentoo :-( |
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:
installed is the original android (5.1 - rooted and free from preinstalled spyware) |
while searching for the "Invalid return value 0 for stream protocol" crash, I found this mpv issue: |
@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.
|
@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. |
Windows 10 / Java 8 have the same problem with wireless. Just have this hint:
environment
|
@gam2046 I'm not sure, but your error log seems to have something with #5 to do. Maybe try updating your adb / android tools. |
@Necklaces emmmm , I'm using It already contains the latest version of ADB
The same device, I try to connect through USB is working properly, but failed through the network. |
@gam2046 Please try on |
@rom1v I tried compiling this project myself and connecting devices through the network ADB again. But still failed
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. |
Same problem here using Windows 10 and scrcpy-win64-v1.2.zip
|
I had this issue too, I have very little to do with this program until 5min ago, scrcpy -b2M -m800 |
Same issue with Nexus 7 on Android 6.0.1 |
The command |
@Gmanzee commented on 4 juil. 2018 à 04:11 UTC−4:
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 |
@mikhoul Maybe you could increase the definition until it fails.
|
I can get |
Fix the error case by flyme nightMode. issue Genymobile#1
Fix the error case by flyme nightMode. issue Genymobile#1
Fix the error case by flyme nightMode. issue Genymobile#1
Worked for me too. I used an Ulefone Armor 3WT |
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 differences: - net_interrupt() calls shutdown() on Linux and closesocket() on Windows (if not already called); - net_close() calls close() on Linux and closesocket() on Windows (if not already called). This simplifies the server code, and prevents a data race on close (reported by TSAN) on Linux (but does not fix it on Windows): WARNING: ThreadSanitizer: data race (pid=836124) Write of size 8 at 0x7ba0000000d0 by main thread: #0 close ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1690 (libtsan.so.0+0x359d8) #1 net_close ../app/src/util/net.c:211 (scrcpy+0x1c76b) #2 close_socket ../app/src/server.c:330 (scrcpy+0x19442) #3 server_stop ../app/src/server.c:522 (scrcpy+0x19e33) #4 scrcpy ../app/src/scrcpy.c:532 (scrcpy+0x156fc) #5 main ../app/src/main.c:92 (scrcpy+0x622a) Previous read of size 8 at 0x7ba0000000d0 by thread T6: #0 recv ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:6603 (libtsan.so.0+0x4f4a6) #1 net_recv ../app/src/util/net.c:167 (scrcpy+0x1c5a7) #2 run_receiver ../app/src/receiver.c:76 (scrcpy+0x12819) #3 <null> <null> (libSDL2-2.0.so.0+0x84f40)
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 differences: - net_interrupt() calls shutdown() on Linux and closesocket() on Windows (if not already called); - net_close() calls close() on Linux and closesocket() on Windows (if not already called). This simplifies the server code, and prevents a data race on close (reported by TSAN) on Linux (but does not fix it on Windows): WARNING: ThreadSanitizer: data race (pid=836124) Write of size 8 at 0x7ba0000000d0 by main thread: #0 close ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1690 (libtsan.so.0+0x359d8) #1 net_close ../app/src/util/net.c:211 (scrcpy+0x1c76b) #2 close_socket ../app/src/server.c:330 (scrcpy+0x19442) #3 server_stop ../app/src/server.c:522 (scrcpy+0x19e33) #4 scrcpy ../app/src/scrcpy.c:532 (scrcpy+0x156fc) #5 main ../app/src/main.c:92 (scrcpy+0x622a) Previous read of size 8 at 0x7ba0000000d0 by thread T6: #0 recv ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:6603 (libtsan.so.0+0x4f4a6) #1 net_recv ../app/src/util/net.c:167 (scrcpy+0x1c5a7) #2 run_receiver ../app/src/receiver.c:76 (scrcpy+0x12819) #3 <null> <null> (libSDL2-2.0.so.0+0x84f40)
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_socket is read by the stream thread, and the control_socket is written by the controller and read by receiver. Therefore, close the socket only on sc_server_destroy(), which is called after all other threads are joined. Reported by TSAN on close: WARNING: ThreadSanitizer: data race (pid=3287612) Write of size 8 at 0x7ba000000080 by thread T1: #0 close ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1690 (libtsan.so.0+0x359d8) #1 net_close ../app/src/util/net.c:280 (scrcpy+0x23643) #2 run_server ../app/src/server.c:772 (scrcpy+0x20047) #3 <null> <null> (libSDL2-2.0.so.0+0x905a0) Previous read of size 8 at 0x7ba000000080 by thread T16: #0 recv ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:6603 (libtsan.so.0+0x4f4a6) #1 net_recv_all ../app/src/util/net.c:228 (scrcpy+0x234a9) #2 stream_recv_packet ../app/src/stream.c:33 (scrcpy+0x2045c) #3 run_stream ../app/src/stream.c:228 (scrcpy+0x21169) #4 <null> <null> (libSDL2-2.0.so.0+0x905a0) Refs ddb9396
On Arch GNU/Linux, built scrcpy using the released .jar.
I have a Samsung Galaxy Note II N7100 running Replicant 6.0 0003.
The resulution should be 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
The text was updated successfully, but these errors were encountered: