Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.55k stars 10.76k forks source link

Disable audio instead of aborting #5371

Open dilyanpalauzov opened 1 month ago

dilyanpalauzov commented 1 month ago

When I execute scrcpy, it prints

scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
INFO: ADB device found:
INFO:     -->   (usb)  ZY22GCTXNV                      device  motorola_edge_30
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 58.4 MB/s (71200 bytes in 0.001s)
[server] INFO: Device: [motorola] motorola motorola edge 30 (Android 14)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.1.7
INFO: Trilinear filtering enabled
INFO: Texture: 1080x2400
ERROR: Could not open audio device: ALSA: Couldn't open audio device: Host is down
ERROR: Demuxer error

but if I instead call scrcpy --no-audio then it works.

When audio does not work, as above, scrpcy should either suggest to use --no-audio, or even better it should assume that --no-audio was provided and go forward.

rom1v commented 1 month ago

See https://github.com/Genymobile/scrcpy/issues/4800#issuecomment-2028754860