Replies: 1 comment 1 reply
-
I'm not an Android developer, but since Scrcpy uses MediaCodec API to encode PCM audio into opus, I think it's also possible to do the opposite. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on modifying the Tango project to capture media from the browser, stream it to the scrcpy-server, and inject the audio using Android's AudioTrack. I’m referring to the sample implementation provided by @yume-chan
https://github.com/Genymobile/scrcpy/issues/3880#issuecomment-1595722119.
The audio format received from browsers varies; for example, Chrome provides audio in the audio/webm; codecs=opus format, while the Android AudioTrack expects PCM. Could someone suggest a library or sample that can extract Opus audio from the WebM container and convert it to PCM for use with Android's AudioTrack? Is it possible to use MediaCodec in Android to decode and feed the audio to AudioTrack?
Beta Was this translation helpful? Give feedback.
All reactions