this post was submitted on 26 Nov 2024
92 points (96.9% liked)

Android

28046 readers
523 users here now

DROID DOES

Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


We are Android girls*,

In our Lemmy.world.

The back is plastic,

It's fantastic.

*Well, not just girls: people of all gender identities are welcomed here.


Our Partner Communities:

[email protected]


founded 1 year ago
MODERATORS
 

scrcpy v3.0

Changes since v2.7:

  • Add virtual display feature (#5370, #5506, #1887, #4528, #5137)
  • Launch Android app on start (#5370)
  • Add OpenGL filters (#5455)
  • Add --capture-orientation to replace --lock-video-orientation (which was broken on Android 14) (#4011, #4426, #5455)
  • Fix --crop on Android 14 (#4162, #5387, #5455)
  • Handle virtual display rotation (#5428, #5455)
  • Add --angle to apply a custom rotation (#4135, #4345, #4658, #5455)
  • Add --screen-off-timeout (#5447)
  • Adapt "turn screen off" for Android 15 (#3927, #5418)
  • Add shortcut Ctrl+Shift+click-and-move for horizontal tilt (#5317)
  • Add shortcut MOD+Shift+r to reset video capture/encoding (#5432)
  • Forward Alt and Super with SDK Keyboard (#5318, #5322)
  • Add more details to --list-encoders output (#5416)
  • Add option to disable virtual display system decorations (#5494)
  • Fix --time-limit overflow on Windows (#5355)
  • Fix "does not match caller's uid 2000" error (#4639, #5476)
  • Accept filenames containing ':' when recording (#5487, #5499)
  • Disable mouse by default if no video playback (#5410)
  • Rename --display-buffer to --video-buffer (#5403, #5420)
  • Listen to display changed events (#5415, #161, #1918, #4152, #5362)
  • Adapt server debugging for Android >= 11 (#5346, #5466)
  • Upgrade FFmpeg to 7.1 (#5332)
  • Upgrade SDL to 2.30.9
  • Upgrade platform-tools (adb) to 35.0.2
  • Build releases via GitHub Actions (#5306, #4490)
  • Release static builds for Linux and macOS (#5515, #1733, #3235, #4489, #5327)
  • Various technical fixes

Highlights

Virtual display

By default, scrcpy mirrors the device screen.

With this new feature (#5370), it is now possible to mirror a new virtual display, with a custom size:

scrcpy --new-display=1920x1080
scrcpy --new-display=1920x1080/420  # force 420 dpi
scrcpy --new-display         # use the main display size and density
scrcpy --new-display=/240    # use the main display size and 240 dpi

On some devices, a launcher is available in the virtual display.

When no launcher is available, the virtual display is empty. In that case, you must start an Android app.

For example:

scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc

To list the Android apps installed on the device:

scrcpy --list-apps

For convenience, you can also select an app by its name using a ? prefix:

scrcpy --start-app=?firefox

However, retrieving app names may take some time (sometimes several seconds), so passing the package name is recommended.

On-device OpenGL filters

Scrcpy can now transform the captured video stream before encoding by applying OpenGL filters directly on the device. This has made it possible to fix several issues and implement new features, as described below (more details in #5455).

Crop

The --crop option was broken for devices running Android >= 14 (#4162). It has been reimplemented using OpenGL filters internally.

Its usage remains the same:

scrcpy --crop=800:600:100:100

It now also works for camera and virtual displays.

Capture orientation

The --lock-video-orientation option was broken for devices running Android >= 14 (#4011).

It has been replaced by a more general option --capture-orientation, implemented using OpenGL filters:

scrcpy --capture-orientation=0
scrcpy --capture-orientation=90       # 90° clockwise
scrcpy --capture-orientation=180      # 180°
scrcpy --capture-orientation=270      # 270° clockwise
scrcpy --capture-orientation=flip0    # hflip
scrcpy --capture-orientation=flip90   # hflip + 90° clockwise
scrcpy --capture-orientation=flip180  # hflip + 180°
scrcpy --capture-orientation=flip270  # hflip + 270° clockwise

The capture orientation can be locked by using a @ prefix, so that a physical device rotation does not change the captured video orientation:

scrcpy --capture-orientation=@         # locked to the initial orientation
scrcpy --capture-orientation=@0        # locked to 0°
scrcpy --capture-orientation=@90       # locked to 90° clockwise
scrcpy --capture-orientation=@180      # locked to 180°
scrcpy --capture-orientation=@270      # locked to 270° clockwise
scrcpy --capture-orientation=@flip0    # locked to hflip
scrcpy --capture-orientation=@flip90   # locked to hflip + 90° clockwise
scrcpy --capture-orientation=@flip180  # locked to hflip + 180°
scrcpy --capture-orientation=@flip270  # locked to hflip + 270° clockwise

Now, it also works for camera (fixing #4426) and virtual displays.

Custom rotation

A new option --angle allows to rotate the content by a custom angle. Combined with --crop, this is especially useful for mirroring the Meta Quest 3 (#4135, #4345, #4658).

Virtual display rotation

The new virtual display feature initially could not rotate. The rotation has been implemented using OpenGL filters.

(That is what triggered the development of OpenGL filters.)

Like previously, the current app can be rotated by MOD+r (shortcuts).

Screen off timeout

The existing option --stay-awake only keeps the device awake *while it is plugged in, meaning it typically does not work over TCP/IP.

A new option, --screen-off-timeout, modifies the screen-off timeout setting while scrcpy is running and restores it on exit:

scrcpy --screen-off-timeout=300  # 300 seconds (5 minutes)

Static builds

For convenience, static builds are now provided for Linux and macOS (#5515).

More targets might be added in the future.

This is still experimental for now, so if you encounter problems, please report them.

Features you might have missed

If you haven't tried scrcpy in a while, here are some features introduced in the 2.x versions that you might have missed (check the release notes to each version for more details):


top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 2 days ago

Genymobile is goated

[–] dyc3 9 points 3 days ago

I love scrcpy. I don't need to use it often, but when I do, I sure am glad it exists.

[–] Horsey 6 points 3 days ago

Holy lord Jesus. This is fucking awesome.

[–] essteeyou 4 points 3 days ago (1 children)

scrcpy v3.0

Changes since v2.7:

  • Add virtual display feature (#5370, #5506, #1887, #4528, #5137)
  • Launch Android app on start (#5370)
  • Add OpenGL filters (#5455)
  • Add --capture-orientation to replace --lock-video-orientation    (which was broken on Android 14) (#4011, #4426, #5455)
  • Fix --crop on Android 14 (#4162, #5387, #5455)
  • Handle virtual display rotation (#5428, #5455)
  • Add --angle to apply a custom rotation (#4135, #4345, #4658, #5455)
  • Add --screen-off-timeout (#5447)
  • Adapt "turn screen off" for Android 15 (#3927, #5418)
  • Add shortcut Ctrl+Shift+click-and-move for horizontal tilt (#5317)
  • Add shortcut MOD+Shift+r to reset video capture/encoding (#5432)
  • Forward Alt and Super with SDK Keyboard (#5318, #5322)
  • Add more details to --list-encoders output (#5416)
  • Add option to disable virtual display system decorations (#5494)
  • Fix --time-limit overflow on Windows (#5355)
  • Fix "does not match caller's uid 2000" error (#4639, #5476)
  • Accept filenames containing ':' when recording (#5487, #5499)
  • Disable mouse by default if no video playback (#5410)
  • Rename --display-buffer to --video-buffer (#5403, #5420)
  • Listen to display changed events (#5415, #161, #1918, #4152, #5362)
  • Adapt server debugging for Android >= 11 (#5346, #5466)
  • Upgrade FFmpeg to 7.1 (#5332)
  • Upgrade SDL to 2.30.9
  • Upgrade platform-tools (adb) to 35.0.2
  • Build releases via GitHub Actions (#5306, #4490)
  • Release static builds for Linux and macOS (#5515, #1733, #3235, #4489, #5327)
  • Various technical fixes

Just adding some formatting.

[–] [email protected] 1 points 3 days ago (1 children)

What I posted is already formatted. It's the exact same markup as the upstream release note in fact.

[–] essteeyou 3 points 3 days ago* (last edited 3 days ago) (1 children)

Well, it's not formatted properly in my client (Sync). I wouldn't have gone to the effort if it was.

[–] [email protected] 1 points 2 days ago (1 children)

It's formatted correctly on lemmy web and Github. I think the problem is on your end.

Dashes are valid list item markup in Markdown but some implementations require a paragraph above the first list item, no matter which marker. Reddit used to do that IIRC.

Sync used to be a Reddit app right? This might be a relic of that time.

[–] essteeyou 2 points 2 days ago (1 children)

Perhaps. I'm not trying to diagnose it, just making it readable for people like me.

[–] [email protected] 1 points 2 days ago (1 children)

Well, it'd be best if that wasn't required and it simply worked with the formatting that works everywhere else.

[–] essteeyou 1 points 2 days ago

I agree, but that's not reality, so I added some formatting.