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

Enabling scrcpy after changing the screen resolution with adb will result in a significant drop in the cast frame rate #4810

Open
matou314 opened this issue Apr 2, 2024 · 3 comments

Comments

@matou314
Copy link

matou314 commented Apr 2, 2024

  • [✔️] I have read the FAQ.
  • [✔️] I have searched in existing issues.

Environment

  • OS: [Windows11]
  • scrcpy version: [2.4]
  • installation method: [e.g. manual build]
  • device model: ASUS_AI2205_A
  • Android version: [14]

Describe the bug
When I use adb first to change the screen resolution ("adb shell wm size 1080x1920")
launch scrcpy and the frame rate of projection on the computer will be reduced, and the latency will increase significantly
But when I start scrcpy first, and then use adb to change the screen resolution, the frame rate does not decrease. But the mouse click will be offset on the phone screen

On errors, please provide the output of the console (and adb logcat if relevant).

Here are the output logs:

1. The resolution has not been changed
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.31.152:5555             device  ASUS_AI2205_A
server-server: 1 file pushed, 0 skipped. 126.9 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [asus] asus ASUS_AI2205_A (Android 14)
INFO: Renderer: direct3d
INFO: Texture: 2448x1080
INFO: FPS counter started
INFO: 164 fps (+5 frames skipped)
INFO: 166 fps
INFO: 165 fps
INFO: 166 fps
INFO: 165 fps
INFO: 166 fps

2. Start scrcpy first, then use adb to change the screen resolution
INFO:     --> (tcpip)  192.168.31.152:5555             device  ASUS_AI2205_A
server-server: 1 file pushed, 0 skipped. 103.2 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [asus] asus ASUS_AI2205_A (Android 14)
INFO: Renderer: direct3d
INFO: Texture: 2448x1080
INFO: FPS counter started
INFO: 159 fps
INFO: 158 fps
INFO: 154 fps
INFO: 166 fps
INFO: 165 fps
INFO: 166 fps
INFO: 166 fps

3. After changing the resolution
INFO:     --> (tcpip)   192.168.31.152:5555            device  ASUS_AI2205_A
[server] INFO: Device: [asus] asus ASUS_AI2205_A (Android 14)
INFO: Renderer: direct3d
INFO: Texture: 1920x1080
INFO: FPS counter started
INFO: 101 fps (+7 frames skipped)
INFO: 108 fps
INFO: 109 fps
INFO: 108 fps
INFO: 108 fps
INFO: 108 fps
@matou314
Copy link
Author

matou314 commented Apr 2, 2024

1.mp4
2.mp4
3.mp4

@rom1v
Copy link
Collaborator

rom1v commented Apr 2, 2024

When I use adb first to change the screen resolution ("adb shell wm size 1080x1920")
launch scrcpy and the frame rate of projection on the computer will be reduced, and the latency will increase significantly

I don't know why, but my hypothesis is that if the size is not the native resolution, the system probably performs an intermediate filter which reduce performances.

But when I start scrcpy first, and then use adb to change the screen resolution, the frame rate does not decrease. But the mouse click will be offset on the phone screen

Probably because the resolution change is not detected: #4469

@matou314
Copy link
Author

matou314 commented Apr 3, 2024

When I use adb first to change the screen resolution ("adb shell wm size 1080x1920")当我使用adb首先改变屏幕分辨率(“adb shell wm size 1080x1920”)
launch scrcpy and the frame rate of projection on the computer will be reduced, and the latency will increase significantly

I don't know why, but my hypothesis is that if the size is not the native resolution, the system probably performs an intermediate filter which reduce performances.

So is there any way to fix the problem of frame rate dropping after changing the resolution? Thank you very much!

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