-
-
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
Add server options to send raw H.264 without using the client #2971
Conversation
cf627b7
to
93ac6a3
Compare
For convenience, this new option forces the 3 following options: - send_device_meta=false - send_frame_meta=false - send_dummy_byte=false This allows to send a raw H.264 stream on the video socket. Concretely: adb push scrcpy-server /data/local/tmp/scrcpy-server.jar adb forward tcp:1234 localabstract:scrcpy adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar \ app_process / com.genymobile.scrcpy.Server 1.21 \ raw_video_stream=true tunnel_forward=true control=false As soon as a client connects via TCP to localhost:1234, it will receive the raw H.264 stream. Refs #1419 comment <#1419 (comment)> PR #2971 <#2971>
Can windows support this? |
Yes, it's platform-independent. |
But VLC didn't respond when I used it on windows. |
It cannot be played due to the firewall. It has been solved now. But how to set the frame rate and code rate of the original H.264 video stream? |
The H.264 has no fixed framerate: a new frame is produced whenever the device screen surface "changes". To play it with VLC, see https://code.videolan.org/rom1v/vlc/-/merge_requests/20 |
@rom1v thank u for this, but I'm trying to get the server.jar file, I think I have to update the gradle file to build a jar file, I tried but I couldn't find the right way to do it? I'm new to gradle, do you have any idea how I can get the server.jar file by building the source code? |
You put an extra space between You can also add |
Thanks, this is really a low mistake due to my oversight. That's why I deleted my reply. Thank you very much for your reply. |
after running the last command on adb it returns "Aborted" after about 2 seconds my scrcpy-server is the one from the current scrcpy-win64-v2.1.zip |
ah, ok i broke it by accidently deleting the forward slash between app_process and com.genymobile... |
@rom1v , I tried the commandlines , on my side i couldnt get the adb commandline to work, this gives me : |
This is useful to use the
scrcpy-server
alone (without the client) just to get the raw H.264 stream:As soon as a client connects via TCP to localhost:1234, it will receive the raw H.264 stream.
For example, it can be played with VLC (but with a lot of delay due to buffering):
Refs #1419 (comment)