scrcpy
scrcpy copied to clipboard
Latency only when including audio.
Environment
- OS: Windows
- scrcpy version: 2.3.1
- Installation method: Windows Release
- Device model: Pixel 6 Pro
- Android version: 14 February Update (UQ1A.240205.002, Feb 2024)
Describing the bug
I seem to be having latency issues when screen mirroring my device with audio being forwarded. I tried an older version of scrcpy without that functionality and it ran flawlessly with no frame drops. I am running this using Wireless ADB as I always have, I have updated graphics drivers just today incase it might have been a situation with this but it wasn't. I also did have this functioning on a Windows 11 installation just fine previously, I downgraded back to 10 and I have not been able to get it to work properly since.
Below is my FPS when playing back a video on the phone, for this I just used TikTok.
INFO: ADB device found:
INFO: --> (tcpip) 192.168.0.48:5555 device Pixel_6_Pro
file pushed, 0 skipped. 107.5 MB/s (66411 bytes in 0.001s)
[server] INFO: Device: [Google] google Pixel 6 Pro (Android 14)
INFO: Renderer: direct3d
INFO: Texture: 1440x3120
INFO: FPS counter started
INFO: 34 fps
INFO: 34 fps
INFO: 28 fps
INFO: 36 fps
INFO: 36 fps
INFO: 31 fps
INFO: 35 fps
INFO: 26 fps
INFO: 36 fps
INFO: 34 fps
INFO: 36 fps
INFO: 34 fps
INFO: 30 fps
INFO: 32 fps
INFO: 33 fps
INFO: 34 fps
INFO: 31 fps
INFO: 34 fps
INFO: 31 fps
INFO: 37 fps
These frame skips happen very quickly and constantly with no real clear lag free space between.
I tried also recording a video to see how that would go, I played back the video and there was no audio to it? Just video and it was a perfect framerate with no jumps or skips, I have no idea why the audio didn't get included as I used "scrcpy --record=file.mp4" correctly making sure the command includes both as mentioned in documentation.
I tried an older version of scrcpy without that functionality and it ran flawlessly with no frame drops.
These frame skips happen very quickly and constantly with no real clear lag free space between.
I see no frame skip in your logs. I guess it's just your network (wifi packets are lost and retransmitted, causing some lag). Try over USB.
I have no idea why the audio didn't get included as I used "scrcpy --record=file.mp4" correctly making sure the command includes both as mentioned in documentation.
By default, the audio codec is opus, maybe your media player does not support it. Try with VLC or even Firefox.