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

hey so my phone audio not working and it keeps crashing when i try to open it #3856

Closed
2 tasks
HHgshs opened this issue Mar 24, 2023 · 10 comments
Closed
2 tasks

Comments

@HHgshs
Copy link

HHgshs commented Mar 24, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [e.g. Debian, Windows, macOS...]
  • scrcpy version: [e.g. 1.12.1]
  • installation method: [e.g. manual build, apt, snap, brew, Windows release...]
  • device model:
  • Android version: [e.g. 10]

Describe the bug
A clear and concise description of what the bug is.

On errors, please provide the output of the console (and adb logcat if relevant).

Please paste terminal output in a code block.

Please do not post screenshots of your terminal, just post the content as text instead.

@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\aran\Downloads\scrapy\scrcpy-win64-v2.0\scrcpy-win64-v2.0>scrcpy --list
-encoders
scrcpy 2.0 https://github.com/Genymobile/scrcpy
C:\Users\aran\Downloads\scrapy\scrcpy-...ped. 27.0 MB/s (52867 bytes in 0.002s)
[server] INFO: List of video encoders:
--video-codec=h264 --video-encoder='c2.qti.avc.encoder'
--video-codec=h264 --video-encoder='OMX.qcom.video.encoder.avc'
--video-codec=h264 --video-encoder='c2.android.avc.encoder'
--video-codec=h264 --video-encoder='OMX.google.h264.encoder'
--video-codec=h265 --video-encoder='c2.qti.hevc.encoder'
--video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc'
--video-codec=h265 --video-encoder='c2.qti.hevc.encoder.cq'
--video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc.cq'
--video-codec=h265 --video-encoder='c2.android.hevc.encoder'
[server] INFO: List of audio encoders:
--audio-codec=opus --audio-encoder='c2.android.opus.encoder'
--audio-codec=aac --audio-encoder='c2.android.aac.encoder'
--audio-codec=aac --audio-encoder='OMX.google.aac.encoder'

C:\Users\aran\Downloads\scrapy\scrcpy-win64-v2.0\scrcpy-win64-v2.0>scrcpy --audi
o-codec=aac
scrcpy 2.0 https://github.com/Genymobile/scrcpy
C:\Users\aran\Downloads\scrapy\scrcpy-...ped. 30.4 MB/s (52867 bytes in 0.002s)
[server] INFO: Device: Xiaomi 21121210G (Android 13)
INFO: Renderer: direct3d
INFO: Initial texture: 1080x2400
ERROR: Could not open audio device: WASAPI can't initialize audio client: CoInit
ialize has not been called.
ERROR: Demuxer error
WARN: Killing the server...

@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

im on poco 4 gt android 13

@rom1v
Copy link
Collaborator

rom1v commented Mar 24, 2023

There was a WASAPI issue in SDL: libsdl-org/SDL#7478 (fixed for the future SDL released), see #3825.

Meanwhile, you can use another driver:

set SDL_AUDIODRIVER=directsound
scrcpy

Then, you will probably face another problem with directsound: it does not support low latency audio (#3793).

So you need this version: #3793 (comment)
and execute:

set SDL_AUDIODRIVER=directsound
scrcpy --audio-output-buffer=10

(or just disable audio: scrcpy --no-audio)

@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

hey thanks for the reply and the first option dose not work and the second i dont know why but it keeps giving me unknown option

@HHgshs HHgshs closed this as completed Mar 24, 2023
@HHgshs HHgshs reopened this Mar 24, 2023
@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

after trying it out stilll didnt work for me

@rom1v
Copy link
Collaborator

rom1v commented Mar 24, 2023

the second i dont know why but it keeps giving me unknown option

You need the build from this comment: #3793 (comment)

(EDIT: now, just use the latest version, currently v2.1)

after trying it out stilll didnt work for me

What did you execute (with which binary) and what is the console output?

@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

C:\Users\aran\Downloads\scrcpy-win64-v2.0>SDL_AUDIODRIVER=directsound
'SDL_AUDIODRIVER' is not recognized as an internal or external command,
operable program or batch file.

@rom1v
Copy link
Collaborator

rom1v commented Mar 24, 2023

You forgot set before SDL_AUDIODRIVER=directsound. Please re-read the previous comments carefully.

@HHgshs
Copy link
Author

HHgshs commented Mar 24, 2023

oh my bad and thanks worked very well thank you

@bhuvanesh15
Copy link

There was a WASAPI issue in SDL: libsdl-org/SDL#7478 (fixed for the future SDL released), see #3825.

Meanwhile, you can use another driver:

set SDL_AUDIODRIVER=directsound
scrcpy

Then, you will probably face another problem with directsound: it does not support low latency audio (#3793).

So you need this version: #3793 (comment) and execute:

set SDL_AUDIODRIVER=directsound
scrcpy --audio-output-buffer=10

(or just disable audio: scrcpy --no-audio)

this works for me

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