Closed bropines closed 1 year ago
Dis you follow the instructions specific to Android 11? https://github.com/Genymobile/scrcpy/blob/master/doc/audio.md
Do you follow the instructions specific to Android 11? https://github.com/Genymobile/scrcpy/blob/master/doc/audio.md
Yep. The screen is on, the developer settings do not block access to the sound. I also tried it with the --require-audio
parameter the result is zero. It just won't start.
For testing, could you please replace the server in the scrcpy 2.0 release folder:
scrcpy-server
SHA-256: 68f9c478177e543a180ee9460eb63b6969c0501ef22280fe00fe51d4310fe80f
It disables the workaround for Android 11:
Then, unlock your device, and execute:
adb shell am start -n com.android.shell/.HeapDumpActivity
It should open a popup. Keep it open and visible (your device must be kept unlocked and powered on).
Then run scrcpy
. Does audio capture work in this case?
For testing, could you please replace the server in the scrcpy 2.0 release folder:
scrcpy-server
SHA-256: 68f9c478177e543a180ee9460eb63b6969c0501ef22280fe00fe51d4310fe80f
It disables the workaround for Android 11:
diff Then, unlock your device, and execute:
adb shell am start -n com.android.shell/.HeapDumpActivity
It should open a popup. Keep it open and visible (your device must be kept unlocked and powered on).
Then run
scrcpy
. Does audio capture work in this case?
Yes. It works. Even if you press OK at the popup, the sound keeps streaming. And it only works the way you said it would.
This is the window that pops up (sorry for the Russian lang in system)
OK, so the culprit is probably the delay here:
Are you comfortable to build the app from sources? You could try to adjust the delay until you get a value which works for your device. I'm interested in that value :)
Are you comfortable to build the app from sources? You could try to adjust the delay until you get a value which works for your device. I'm interested in that value :)
It doesn't look hard, I'm going to try it now
OK, so the culprit is probably the delay here:
Are you comfortable to build the app from sources? You could try to adjust the delay until you get a value which works for your device. I'm interested in that value :)
I would like to clarify. Which way should I change the delay? Higher or lower?
It seems the delay is insufficient in your case, so you must use an higher delay.
It seems the delay is insufficient in your case, so you must use an higher delay.
I'm kind of dumb.
It seems the delay is insufficient in your case, so you must use an higher delay.
I'm kind of dumb.
That's the error thing because I was using kali -_-
After 5 hours of misunderstandings with Linux I finally installed it. Delay of 300 (units, seconds, whatever) is working
Thank you. Does it 100% work with 300ms? I will probably increase the current value to 300 then.
Thank you. Does it 100% work with 300ms? I will probably increase the current value to 300 then.
It worked at 200 every other time, I have not tested at 250. I can check later. But at 300 it definitely works.
Hi
I have an issue that seems related. For some reason audio works fine for me on Windows, but fails on Linux, with the same error:
[server] ERROR: Failed to start audio capture
[server] ERROR: On Android 11, it is only possible to capture in foreground, make sure that the device is unlocked when starting scrcpy.
I haven't tried changing that delay yet, but it seems a bit weird that the Linux version would require a different delay than the Windows version.
I haven't tried changing that delay yet
Could you please try? :heart:
Alright, with a delay of 250 it seems to work fine every time. I haven't tried any other values, though, but I might later.
EDIT: After a bunch of restarts I did manage to get it to fail. 300 might be better then.
I implemented 3 attempts with 100ms before each, so that on most devices, it will work within 100ms (so the popup is not visible for too long), but on others it will still work: bc82e340d751da8fd1903f93ee00b455a7e6a904
Here is a full build for win64:
scrcpy-win64.zip
SHA-256: scrcpy-win64-v2.0-21-g85c45c5f5.zip
Please tell me if it works for you.
I implemented 3 attempts with 100ms before each, so that on most devices, it will work within 100ms (so the popup is not visible for too long), but on others it will still work: bc82e34
Here is a full build for win64:
scrcpy-win64.zip
SHA-256: scrcpy-win64-v2.0-21-g85c45c5f5.zip
Please tell me if it works for you.
Yep. Working on my phone. Thanks. I think we'll wait for feedback from other users, and close this issue
It checked if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R)
twice.
Yes, I noticed that yesterday :+1: It will be fixed by https://github.com/Genymobile/scrcpy/commit/aa6846c989377cf6c77c57291f71b5cdda2e3026 (not merged yet).
Yes, I noticed that yesterday 👍 It will be fixed by aa6846c (not merged yet).
I just saw all these branches. What a horror)
:see_no_evil:
Locally:
$ git branch | wc -l
1062
I should probably do some cleanup. :smile:
However, I want to keep many of them somewhere, to be able to (manually) "bisect" across branches for debugging.
For example, if a bug is reported, and I observe that it works on audio.107
(102 commits) but not on audio.145
(119 commits), what changes has been made between the two patchsets?
git range-diff audio.107~102..audio.107 audio.145~119..audio.145
02f4ff7534649153d6f87b05a0757431a2d0ee5f and 3626d90004c9946320152564a375e56f9c5030f4 merged into dev
.
Environment
Describe the bug The sound just doesn't work. When you try to make it forcibly this happens