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-encoder #47

Closed
lzgzhyf opened this issue Nov 29, 2023 · 1 comment
Closed

支持自定义audio-encoder #47

lzgzhyf opened this issue Nov 29, 2023 · 1 comment

Comments

@lzgzhyf
Copy link

lzgzhyf commented Nov 29, 2023

环境是redroid11,宿主机Ubuntu 22.04
客户端是iPhone 13,iOS 17.1
开启音频转发后,没有声音,日志有报错:

[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
	at android.media.MediaCodec.native_setup(Native Method)
	at android.media.MediaCodec.<init>(MediaCodec.java:1912)
	at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1875)
	at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
	at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
	at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)

根据 Genymobile/scrcpy#3791
在Ubuntu上尝试scrcpy --audio-encoder=aac有声音

所以是否可以加上自定义audio-encoder的功能?

@lzgzhyf
Copy link
Author

lzgzhyf commented Nov 29, 2023

发现项目是支持通过URL Scheme的方式添加更多参数的,在URL Scheme中加上&audio-codec=aac即可

@lzgzhyf lzgzhyf closed this as completed Nov 29, 2023
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

1 participant