Skip to content
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

Can I get a video stream from a project #1016

Open
huangli44 opened this issue Dec 16, 2019 · 6 comments
Open

Can I get a video stream from a project #1016

huangli44 opened this issue Dec 16, 2019 · 6 comments

Comments

@huangli44
Copy link

Can I get a video stream from a project

@rom1v
Copy link
Collaborator

rom1v commented Dec 17, 2019

See #613 #129

@huangli44
Copy link
Author

I use #129 way to test,then find executing adb shell "CLASSPATH=/data/local/tmp/scrcpy-server app_process / com.genymobile.scrcpy.Server 1.12 8000000 10 10 true 1080:1920:0:0 true true ",the teminal block,and the adb log print "10059 __system_property_read(key=ro.build.version.sdk, value=25)
"

@huangli44
Copy link
Author

I use "adb forward",and listen the localhost port 8080,but i get nothing.The scrcpy is running

@huangli44
Copy link
Author

Am i wrong to use it like this

@rom1v
Copy link
Collaborator

rom1v commented Dec 17, 2019

I use "adb forward",and listen the localhost port 8080,but i get nothing.The scrcpy is running

#613 (comment)

To receive the video stream, you basically have to read the client code (which may and will change in the future), and do the same on your side. In particular, read server.c.

To receive a raw H.264 stream, you need to disable frame meta, by passing "false" here:

"true", // always send frame meta (packet boundaries + timestamp)

You will still receive the initial header (that you need to consume):

if (!device_read_info(server.video_socket, device_name, &frame_size)) {

Unfortunately, I have no time to help step by step.

@huangli44
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants