Skip to content
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

--audio-dup exception on Android 15 #5781

Open
kmizmal opened this issue Jan 21, 2025 · 10 comments
Open

--audio-dup exception on Android 15 #5781

kmizmal opened this issue Jan 21, 2025 · 10 comments

Comments

@kmizmal
Copy link

kmizmal commented Jan 21, 2025

Environment

  • OS: Win11
  • Scrcpy version: 3.1
  • Installation method: Windows release
  • Device model: Oneplus 12R
  • Android version: 15

Describe the bug

--audio-source=playback --audio-dup can only make the audio continue to play on the Android device on Android 15, but scrcpy cannot capture the audio normally

E:\study\bash\adb\scrcpy-win64-v3.1>scrcpy.exe --pause-on-exit=if-error --no-control --video-codec=h265

scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.100.12:6666             device  PJE110
E:\study\bash\adb\scrcpy-win64-v3.1\scrcpy-server: 1 file pushed, 0 skipped. 100.0 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [OnePlus] OnePlus PJE110 (Android 15)
INFO: Renderer: direct3d
INFO: Texture: 2776x1264

E:\study\bash\adb\scrcpy-win64-v3.1>scrcpy.exe --pause-on-exit=if-error --no-control --video-codec=h265 --require-audio
scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.100.12:6666             device  PJE110
E:\study\bash\adb\scrcpy-win64-v3.1\scrcpy-server: 1 file pushed, 0 skipped. 78.6 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [OnePlus] OnePlus PJE110 (Android 15)
INFO: Renderer: direct3d
INFO: Texture: 2776x1264

E:\study\bash\adb\scrcpy-win64-v3.1>scrcpy.exe --pause-on-exit=if-error --no-control --video-codec=h265 --audio-dup --require-audio
scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
INFO: Audio duplication enabled: audio source switched to "playback"
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.100.12:6666             device  PJE110
E:\study\bash\adb\scrcpy-win64-v3.1\scrcpy-server: 1 file pushed, 0 skipped. 97.4 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [OnePlus] OnePlus PJE110 (Android 15)
INFO: Renderer: direct3d
INFO: Texture: 2776x1264
INFO: Texture: 1264x2776
WARN: Device disconnected
Press Enter to continue...
@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2025

--audio-dup exception on Android 15

Where's the exception?

@kmizmal
Copy link
Author

kmizmal commented Jan 21, 2025

--audio-dup exception on Android 15Android 15 上的 --audio-dup 异常

Where's the exception?  例外在哪里?

i am sorry ,it like
[this] (#5693)

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2025

but scrcpy cannot capture the audio normally

For all Android apps, or only some apps? For example, does it work if you play a video with VLC for Android?

@kmizmal
Copy link
Author

kmizmal commented Jan 21, 2025

but scrcpy cannot capture the audio normally但是 scrcpy 无法正常捕获音频

For all Android apps, or only some apps? For example, does it work if you play a video with VLC for Android?针对所有 Android 应用程序,还是仅针对某些应用程序?例如,如果您使用 VLC for Android 播放视频,它是否有效?

i just test in Honor of king ,Please allow me to do more testing later

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2025

https://github.com/Genymobile/scrcpy/blob/master/doc/audio.md#duplication

This audio source supports keeping the audio playing on the device while mirroring, with --audio-dup.

However, […] Android apps can opt-out (so they are not captured).

@kmizmal
Copy link
Author

kmizmal commented Jan 21, 2025

https://github.com/Genymobile/scrcpy/blob/master/doc/audio.md#duplication

This audio source supports keeping the audio playing on the device while mirroring, with --audio-dup.此音频源支持在镜像时保持音频在设备上播放,使用 --audio-dup
However, […] Android apps can opt-out (so they are not captured).然而,[...]Android 应用程序可以选择退出(因此不会被捕获)。

It is worth noting that if my phone is connected to a Bluetooth headset, the Bluetooth headset can play sound and scrcpy can also get the audio.

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2025

Yes, sure. But the "audio playback capture" API cannot capture apps that opt out.

@kmizmal
Copy link
Author

kmizmal commented Jan 21, 2025

Yes, sure. But the "audio playback capture" API cannot capture apps that opt out.当然。但是,“音频播放捕获”API 无法捕获选择退出的应用程序。

i mean if i connect Bluetooth headset,the issue will be closed.i don't know whether it is useful.It’s still in Honor of Kings, the only difference is that I connected an additional Bluetooth headset

@guihuashaoxiang
Copy link

I upgraded Android 15 dup today and there is no sound

@guihuashaoxiang
Copy link

I upgraded Android 15 dup today and there is no sound
I'm in King of Glory, too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants