-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[Help Needed] scrcpy-server on Android hangs #2094
Comments
Now, you have to connect 2 sockets (1 for video, 1 for control in both directions): ec71a3f Refs #129 (comment) |
@rom1v Thanks so much for your response! Unfortunately I'm pretty illiterate in networking so I'm not sure what I should do to make it work after reading the links you provided... Would you mind offering some possible changes I can make to the code above in order to receive screenshots from scrcpy-server started on the phone? |
Hi! This is probably what you are looking for. Or you could use use the class provided by py-android-viewer directly if you don't want program the networking bit yourself |
OMG it works perfectly. Thank you so much!!! You just made my day 😁 |
Environment
Hi,
I'm trying to stream my phone screen into Python. I found this script https://gist.github.com/Allong12/a752decf49e6c789c2425e35028137a5 from way back in 2019 and tried to modify it. However, the server would freeze whenever I try to receive anything with
sock.recv
in Python.Things done in Bash (Not even sure if my arguments for scrcpy-server even make sense..):
The above would hang at
And I had to open another shell process to run
Now in Python:
It'll print
"Connected!"
as a dummy byte is received. However, any subsequent call tosock.recv
would hang in python:^ this hangs.
I'm wondering if anyone can help me understand what's going on / help me make it work... Thanks in advance!
The text was updated successfully, but these errors were encountered: