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

Is it possible to add an SBC encoder so we can play anything to the A2DP stream? #455

Open
ftab opened this issue Mar 27, 2024 · 1 comment

Comments

@ftab
Copy link

ftab commented Mar 27, 2024

The A2DP source example supports sending pre-encoded SBC packets. We're building an automated test system for a Bluetooth sound system we're making, and part of that is to send audio and make sure the audio comes out properly. I'd love to be able to play any file such as a .wav or .mp3 without having to manually transcode it to SBC format first. That would require at least an SBC encoder, plus whatever decoder is required to turn the source file into PCM audio (which almost certainly already exists for the common formats, such as https://github.com/pylon/streamp3 )

Maybe there's some way to involve https://github.com/google/libsbc - run esbc as a subprocess and take the stdout as the packet source?

@barbibulle
Copy link
Collaborator

One of the options for this would be to use PyAV, which uses ffmpeg's libav under the hood. It is available for most platforms as a precompiled package, and should support SBC encoding and decoding.
I can take a crack at it soonish to see how well that would work.

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

2 participants