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

if QVH fails, the wda is not starting. possible to run wda in parallel to QVH #5

Open
krishtoautomate opened this issue Apr 21, 2021 · 12 comments

Comments

@krishtoautomate
Copy link

if QVH fails, the wda is not starting. possible to run wda in parallel to QVH.

@drauggres
Copy link
Collaborator

QVH resets usb connection on startup (and after stopping). We can start WDA only after QVH, that is why client waits for the first frame before requesting to start WDA.

@krishtoautomate
Copy link
Author

can you please point me where QVH start and
where WDA start after QVH.

@drauggres
Copy link
Collaborator

I'm working on integration ws-qvh to ws-scrcpy server. The current architecture soon will be obsolete.
I plan to implement like like this (see NetrisTV/ws-scrcpy#91):

As for the current state:

point me where QVH start

Client:

Server:

ws-qvh/client.go

Lines 163 to 164 in a9a487a

if udid != "" {
client.stream(udid)

where WDA start after QVH.

Client:

Server:

ws-qvh/client.go

Lines 75 to 77 in a9a487a

case "run-wda":
log.Info("command: \"run-wda\"")
c.runWda(m.UDID)

@krishtoautomate
Copy link
Author

QVH is not working if device screen is off. if WDA starts before QVH or parallel. WDA will allow to call iPhone Home button
{{DEVICE_URL}}/wda/homescreen

@drauggres
Copy link
Collaborator

You will need to start WDA again if you run it before QVH, because QVH will reset the USB connection.
I just keep screens of the connected devices always on, it is much easier.

P.S. Actually, QVH works with the screen off, it will start sending data if you turn on the screen physically.

@krishtoautomate
Copy link
Author

krishtoautomate commented Apr 23, 2021

Do we need QVH?
Webdriveragent can broadcast real time screen at port 9100.
RUN wda and open url http://${WDA_SERVER_URL}:9100

@drauggres
Copy link
Collaborator

Do we need QVH?

In theory, h264 stream produced by qvh should be more effective, but I didn't do the benchmarks.

Webdriveragent can broadcast real time screen at port 9100.
RUN wda and open url http://${WDA_SERVER_URL}:9100

We can add this as separate feature.

@krishtoautomate
Copy link
Author

i checked both video quality and i find that using wda video quality is better than QVH

@drauggres
Copy link
Collaborator

i checked both video quality and i find that using wda video quality is better than QVH

QVH produces stream with "adaptive" fps (it switches between 30 and 60 fps), but it the client it locked at 30 (src). That's why it may look choppy.
By "effective" I didn't mean only video quality. Probably "efficient" is more correct word, i.e. with same video quality h264 stream:

  • should require less computing power from device to encode stream
  • will produce less traffic
  • could be hardware decoded on a client

Also qvh sends audio stream, but at the moment I just drop it.

But I will look into mjpeg server later.

@krishtoautomate
Copy link
Author

Where do i change the fps of qvh to test different fps to avoid choppyness in video stream.

@drauggres
Copy link
Collaborator

Where do i change the fps of qvh to test different fps to avoid choppyness in video stream.

https://github.com/NetrisTV/ws-scrcpy/blob/67cc51c90861cadd1f977f14bc3efe8b5dfa56ca/src/app/player/MsePlayerForQVHack.ts#L11

@krishtoautomate
Copy link
Author

possible to run wda though qvh fails?

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