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

When casting Oculus Quest Pro to Windows, the screen content is rotated approximately 30 degrees. #4135

Open
2 tasks done
zhang-1999 opened this issue Jul 3, 2023 · 12 comments

Comments

@zhang-1999
Copy link

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Windows 11
  • scrcpy version: 2.1
  • installation method: Window Release from GitHub Release
  • device model:
  • Android version: Android 12 ( Oculus Quest Pro )

Describe the bug
When casting Oculus Quest Pro to Windows, the screen content is rotated approximately 30 degrees.

BTW,Oculus Quest 2 works well.

scrcpy --no-audio --crop 1730:974:1934:450

img_v2_7d326f7b-9854-4896-8c0e-e21117c896fg

@rom1v
Copy link
Collaborator

rom1v commented Jul 3, 2023

This is how the content is rendered on Android.

@zhang-1999
Copy link
Author

Sorry, I didn't quite understand what you meant. Did you meant that the content is rendered on Oculus Quest Pro is correctly ? If yes,you saying that scrcpy cannot solve this problem?

Did scrcpy provide a cli arg to rotate the video stream ?

@rom1v
Copy link
Collaborator

rom1v commented Jul 3, 2023

Scrcpy captures what is rendered on the "surface". How the screen content is "transformed" by the Oculus device to display correctly for each eye is out of control of scrcpy. In theory, it could be possible to apply the same "warp" transformation, but it must be known (estimated), and scrcpy does not support such a feature anyway.

It can only rotate by multiples of 90°: https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#rotation

@zhang-1999
Copy link
Author

zhang-1999 commented Jul 3, 2023

Thanks for you reply . Could you provide a more granular cli argument about "rotation",for example :

scrcpy --lock-video-orientation=0  --video-rotation=30

@zhang-1999
Copy link
Author

If you think this feature should not be added to scrcpy , I wanto to know did the proposal is feasible in techonology ? I can try to fork this project to make custom changes if possible

@rom1v
Copy link
Collaborator

rom1v commented Jul 3, 2023

I wanto to know did the proposal is feasible in techonology ?

Oh, actually SDL_RenderCopyEx() accepts an arbitrary angle, so you can play with that:

scrcpy/app/src/display.c

Lines 275 to 276 in 625934f

int ret = SDL_RenderCopyEx(renderer, texture, NULL, dstrect, angle,
NULL, 0);

@zhang-1999
Copy link
Author

thanks, I will try it

@nnnpa31
Copy link

nnnpa31 commented Jul 4, 2023

Sorry, I didn't quite understand what you meant.

(just a speculation, I do not have any evidence)
I think the Oculus Quest Pro's display is physically rotated by 30 degrees (or 45 degrees) to the point where the display needs to be reversed by a certain angle to properly display the binoculars.

@Mar2ck
Copy link

Mar2ck commented Jul 5, 2023

It's a trick to prevent the screen door effect. The screens for each eye in the Quest Pro are rotated 30 degrees in opposite directions which means the pixel grid for each eye no longer lines up and therefore isn't as visible.

@rolandwellinger
Copy link

@zhang-1999 Do you got any success rotating the image for Quest Pro / Quest 3?

@polyzium
Copy link

I have a Quest 3 and Meta did the exact same trick with the panels. I wonder if this is possible to do via SDL_gfx or OpenGL, or possibly a homegrown transformation algorithm. Possibly could learn something from OBS since it has transforms as essential functionality.

@rolandwellinger
Copy link

Hi All. Thank you so much for addressing this issue. When is this comming to release? I like to use scrcpy and hopefully later on SideQuest to Stream Again from the HMD.

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

6 participants