-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
insert delay for audio forwarding #5114
Comments
No, this delay is unknown. The prerequisite is to unlock the phone before starting scrcpy for Android 11.
This parameter is not really necessary (it just makes scrcpy fail if audio capture fails).
This must be known on start (the parameter is passed to the server on start, the recording feature depends on whether audio is enabled or not, etc.). |
I don't really know how it works, I was speculating that audio forwarding could be activated afterward
but if I don't use it, the sound is always heard from the cell phone speakers.
I understand, though, if the audio forwarding is not enabled, it's not even interesting to do the recording in the end (I'm assuming that you're only referring to the audio recording and that the video recording is not affected, but my guess is again speculation). |
No, this is unrelated: the sound is forwarded is capture works (typically when your phone is unlocked and the workaround for Android 11 works), it is kept on the device if capture does not work. The option
When you record with |
OK, I must have misunderstood the behavior of --require-audio
I understand, and I also understand that conceptually it's less problematic to do this than to go and create exception after exception. |
Start it once once your phone is unlocked. |
I'm in a special situation, I use the phone connected to 20 feet of cable in another room. let's say I use scrcpy just so I can use the phone remotely |
till now this is the only things I'm capable to do: |
OK, I understand this can be an issue. However, supporting Android 11 for audio is already a dirty hack (supporting only Android 12 would have be cleaner), I don't want to add more hacks/configuration to the hack. For your use case, you can delay audio capture by adding a call to scrcpy/server/src/main/java/com/genymobile/scrcpy/AudioCapture.java Lines 123 to 128 in cc8e613
|
ok many thanks, I will try as soon as I understand how to compile the packages for android :D |
Is your feature request related to a problem? Please describe.
Well, I read about the problem with android 11. So to get the audio forwarding to work I open scrcpy, unlock the phone, close scrcpy and restart it with the --require-audio parameter. It's a little bit inconvenient.
Describe the solution you'd like
insert a delay to the sound forwarding request so that you don't have to unlock the phone and restart scrcpy with the --require-audio parameter while the screen remains on.
Describe alternatives you've considered
add a shortcut to turn sound forwarding on and off while scrcpy is running
Additional context
Thanks a lot, scrcpy is fantastic.
The text was updated successfully, but these errors were encountered: