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

Anyway to manually rotate scrcpy view on PC without changing orientation on phone ? #218

Closed
jayachar88 opened this issue Aug 3, 2018 · 13 comments

Comments

@jayachar88
Copy link

From this other issue report (#2), I learnt that some Camera apps don't reinitialize (and thus scrcpy I presume doesn't detect orientation change), when shooting in landscape mode (when phone was initially in portrait orientation).

Is there some possibility to manually force only the view on PC to rotate (to landscape orientation), without impacting the device orientation ?

This will allow scrcpy view for camera (default camera app on stock Android) to show correct orientation. If camera app is closed and another app is started, I believe scrcpy can detect the right orientation to display, over-riding the previous manual view (not device) orientation change.

@vctls
Copy link

vctls commented Dec 15, 2019

I used the desktop orientation as a workaround. It's not exactly practical, especially since it seems there aren't any keyboard shortcut to do that on my PC, but hey, it works.

@diyism
Copy link

diyism commented Dec 17, 2019

Upvote this Feature Request, because:
Some video game is played in landscape mode without rotating my phone screen.
ie. I roated my phone body before play the game but without show me the animation of rotating the game window, i think it's a better experience for game players.
But when I scrcpy my phone screen onto my PC(ubuntu), the game window is in portrait mode.

So I wish to rotate the scrcpy output screen on my PC,
for example, we can add "--output-orientation" or abbr "--oo" to scrcpy command:
scrcpy --oo 0 //default orientation
scrcpy --oo 1 //rotate 90 degrees
scrcpy --oo 2 //rotate 180 degrees
scrcpy --oo 3 //rotate 270 degrees

@dre-z17
Copy link

dre-z17 commented Feb 16, 2020

I used the desktop orientation as a workaround. It's not exactly practical, especially since it seems there aren't any keyboard shortcut to do that on my PC, but hey, it works.

Thank you for the idea. Since I use dual monitors your idea is a fast workable workaround for the meantime for recording and seeing landscaped videos properly as they are recording.

Another option for me when I need to record landscaped videos is to use Open Camera. The image is displayed correctly on screen but unfortunately records in portrait mode, regardless of phone orientation. But post-recording editing flips the videos back into landscape layout. Is an extra step but better than not being able to see recorded landscaped videos in proper layout while recording if all a person has is a single monitor.

Scrcpy has not run into rotation issues on my phone in any other type of app so far. Only camera apps. Looking forward to this forced rotation of the PC window without affecting the cellphone itself.

@Stamoulohta
Copy link
Contributor

Created a pull request #1151 for the orientation (client) feature.

Cheers :)

@rom1v
Copy link
Collaborator

rom1v commented Feb 27, 2020

A new option --lock-video-orientation has been implemented on dev branch, by #1151. 🎉

@rom1v rom1v closed this as completed Feb 27, 2020
rom1v added a commit that referenced this issue Apr 7, 2020
Add Ctrl+Left and Ctrl+Right to rotate the scrcpy window.

Contrary to --lock-video-orientation, the rotation has no impact on
recording, and can be changed dynamically (and immediately).

Fixes #218 <#218>
@rom1v
Copy link
Collaborator

rom1v commented Apr 7, 2020

Please review #1274, which adds Ctrl+ and Ctrl+ shortcuts to rotate the scrcpy window.

rom1v added a commit that referenced this issue Apr 8, 2020
Add Ctrl+Left and Ctrl+Right shortcuts to rotate the display (the
content of the scrcpy window).

Contrary to --lock-video-orientation, the rotation has no impact on
recording, and can be changed dynamically (and immediately).

Fixes #218 <#218>
@rom1v
Copy link
Collaborator

rom1v commented Apr 29, 2020

Released in v1.13.

@diyism
Copy link

diyism commented Apr 30, 2020

wget https://github.com/Genymobile/scrcpy/archive/v1.13.tar.gz
wget https://github.com/Genymobile/scrcpy/releases/download/v1.13/scrcpy-server-v1.13
tar -xzpf v1.13.tar.gz
cd scrcpy-1.13
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=../scrcpy-server-v1.13
ninja -Cx
sudo ninja -Cx install
adb connect 192.168.0.122   #my cellphone ip
scrcpy
ctrl+→

The screen orientation on my computer is OK now.

Great thanks to @Stamoulohta for this client-only rotation feature.

@rom1v
Copy link
Collaborator

rom1v commented Apr 30, 2020

The screen orientation on my computer is OK now.

@diyism Glad that your problem is solved :)

Great thanks to @Stamoulohta for this client-only rotation feature.

@Stamoulohta did a great work on mirroring orientation (#1151 --lock-video-orientation, that you could use instead if you want to record your game in the correct orientation), but I did the client-only rotation feature (#1274 --rotation, Ctrl+← and Ctrl+→) 😉

@diyism
Copy link

diyism commented Apr 30, 2020

Haha, thank you for your fantastic work! @rom1v

@shehzadaliqadri
Copy link

shehzadaliqadri commented Jan 7, 2023

Upvote this Feature Request, for version scrcpy 1.24 (07.01.2023)

if you wish to rotate the scrcpy output screen on PC,
for example, we can add "--lock-video-orientation=1" command:

scrcpy --lock-video-orientation=0 //default orientation
scrcpy --lock-video-orientation=1 //rotate 90 degrees
scrcpy --lock-video-orientation=2 //rotate 180 degrees
scrcpy --lock-video-orientation=3 //rotate 270 degrees

scrcpy --lock-video-orientation=1
for most of the users

@perrette
Copy link

perrette commented Jan 22, 2024

If it a desktop setting of mine, or was it updated to ALT + LEFT and ALT + RIGHT ? (scrcpy 2.3.1 ; Ubuntu 22.04)

@rom1v
Copy link
Collaborator

rom1v commented Jan 22, 2024

@perrette Yes, the default shortcuts modifier was changed a long time ago (in v1.15 by #1598).

https://github.com/Genymobile/scrcpy/blob/master/doc/shortcuts.md

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

No branches or pull requests

8 participants