Replies: 5 comments 6 replies
-
Because you can at least decoding several frames, I don't think there is any major issue with your stream parsing code. If you are using ADB to communicate with scrcpy, then maybe you accidentally blocked the stream: ADB is a very delicate multiplex protocol, depending on the exact method you use (and their internal buffers), not reading all outputs from all sockets, or sometime even reading in wrong order, will completely hang all the streams. For example I have: ya-webadb/libraries/scrcpy/src/connection.ts Lines 115 to 118 in 4d0f1a1 You can verify this by logging incoming data, and checking whether it stops. |
Beta Was this translation helpful? Give feedback.
-
My scrcpy client implementation is in libraries/scrcpy/src folder.
Scrcpy 1.22 introduced 2 new hidden options affecting stream format (#374). They are not available unless you directly start scrcpy server (not using scrcpy client). If you don't care about them, you can go back to 42c7da9, the code is much simpler without branches for those options. |
Beta Was this translation helpful? Give feedback.
-
good. Thank you so much. I think it will take me some time to understand... According to the official documentation of scrcpy, when the rotation direction of the device changes, a new data stream will be generated. What is the data differentiation logic here (that is, how can the rotation direction be changed through the buffer data)? |
Beta Was this translation helpful? Give feedback.
-
thanks. Another question, sending the get clipboard content command. Is the data here returning the clipboard content from the control connection? Still mixed with the video data stream. Please try to verify, the implementation section was not found in the code. |
Beta Was this translation helpful? Give feedback.
-
Can scrcpy dynamically set instructions for stream-related parameters (such as modifying bit rate, video size) after the stream has been sent? |
Beta Was this translation helpful? Give feedback.
-
I try to parse scrcpy raw data stream in web.
But it's always not perfect and can only parse a few frames. Can you share your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions