Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
103.02k stars 10.01k forks source link

OBS unable capture scrcpy audio when --no-video option is used #4897

Closed 4nric closed 1 week ago

4nric commented 2 weeks ago

Environment

Describe the bug I'm using OBS's Application Audio Capture, scrcpy is not listed if there's no scrcpy window active. This behavior may be intended and actually is cleaner, just have the terminal and no additional window. But OBS can't capture audio this way for now. I tried providing width and height values but those are ignored if --no-video is used.

scrcpy --no-video --audio-source=mic --window-width=100 --window-height=100 --window-title=mic

rom1v commented 2 weeks ago

Please test this PR: https://github.com/Genymobile/scrcpy/pull/4868

rom1v commented 2 weeks ago

^ Basically, this version opens a window even when video playback is disabled. That way, you should be able to capture the window audio. Could you confirm, please?

4nric commented 1 week ago

I can confirm obs can now capture scrcpy audio this way. Would be great to have both options, hidden and visible. Thanks!

rom1v commented 1 week ago

I can confirm obs can now capture scrcpy audio this way. Would be great to have both options, hidden and visible. Thanks!

Thank you.

In this PR, by default a window will be open, but there is a new option --no-window to disable it.