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

Feature request: Allow to rotate the camera. #4426

Open
hellishvictor opened this issue Nov 15, 2023 · 9 comments
Open

Feature request: Allow to rotate the camera. #4426

hellishvictor opened this issue Nov 15, 2023 · 9 comments

Comments

@hellishvictor
Copy link

  • OS: Win 7 x64 SP1
  • adb v34.0.4 (last version that works with Windows 7)
  • scrcpy version: 1.2.2
  • installation method: scrcpy-win64-v2.2.zip
  • device model: Samsung Galaxy
  • Android version: 12

Hi, I just updated ScrCpy to the latest version and tested the new camera features, which are awesome, but it only works on horizontal mode, with the top of the device to the left, so it don't rotate at all.
It would be great if were implemented an option to allow it to rotate along with the device, or just to switch it to vertical mode.

Cheers.

@rom1v
Copy link
Collaborator

rom1v commented Nov 15, 2023

--rotation rotates the content on the screen (but not the recording): https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#rotation

@hellishvictor
Copy link
Author

--rotation=3 did the trick -> Goodbye DroidCam!

@tommy8372
Copy link

this flag doesn't have an effect for video4linux with camera source and stream always start in horizontal mode

i'm using below for linux webcam
scrcpy --v4l2-sink=/dev/video10 --video-source=camera --camera-id=1 --no-audio --no-video-playback

--rotation=1 do the trick for me for video playback only, any idea how to solve this for camera?

@rom1v
Copy link
Collaborator

rom1v commented Nov 21, 2023

See #4441.

this flag doesn't have an effect for video4linux with camera source and stream always start in horizontal mode

#4441 (comment)

@ManuLinares
Copy link

Is there any new development on this?

@rom1v
Copy link
Collaborator

rom1v commented Feb 27, 2024

Is there any new development on this?

What do you try to achieve?

Camera orientation is supported for display and recording, but not for the video4linux feature.

https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#orientation

Cf highlights of v2.3 (but take the latest version, not v2.3).

@ManuLinares
Copy link

I need to be able to rotate the camera using v4l2loopback.

How to reproduce:

  1. Connect the phone via USB
  2. scrcpy --video-source=camera --camera-facing=back --v4l2-sink /dev/video1 --no-audio-playback --no-video-playback --camera-fps 30 --camera-size=1280x720
  3. Open a Meet, Teams, Jitsi, etc. My face is upside down.

I expect to be able to rotate the webcam sink.

@rom1v
Copy link
Collaborator

rom1v commented Mar 3, 2024

Rotate the phone to get the expected orientation 😄

More seriously, it will require to filter the capture on the server side (refs #4011 (comment)).

@rom1v
Copy link
Collaborator

rom1v commented Nov 15, 2024

Please test #5455.

rom1v added a commit that referenced this issue Nov 19, 2024
Apply crop and orientation to camera capture.

Fixes #4426 <#4426>
PR #5455 <#5455>
rom1v added a commit that referenced this issue Nov 19, 2024
Apply crop and orientation to camera capture.

Fixes #4426 <#4426>
PR #5455 <#5455>
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

4 participants