-
Notifications
You must be signed in to change notification settings - Fork 79
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
Feature Request: Publishing Audio from Multicast #378
Comments
Hi @s-hamdananwar! We're absolutely in support of adding more ways to publish media, and we'd be glad to have your help in implementing this. It looks like a reasonable set of codecs for this use-case, but I'd defer to @dennwc You can find some prior art related to the |
Hi @rektdeckard, thanks for your response! I am super excited for this contribution. I was thinking of adding it part of the
|
To question 1: in my mind we wouldn't be spawning a daemon or background process to handle the restreaming. The CLI process would simply block as it already does with To question 2: if you're streaming audio from multiple sources/hosts using this method and want to be able to clean them all up from a single point, it should be as simple as calling |
@rektdeckard Thanks so much for your detailed response! Considering your recommendation, SIGINT, SIGTERM, SIGQUIT will be handling terminating the blocked publish process. Before I do a PR, I have one final question. I have implemented and tested multicast audio publishing using G711, PCM and Opus codecs and they work as expected when running locally (I am testing the CLI locally in a non-conventional way by creating go.mod inside the |
Considering the need for CGo, maybe this project could live in @rektdeckard What do you think? |
Agree I don't love the idea of adding features with system dependencies here, and that maybe a separate project is a good place to trial this. But if pure software support is doable for just Opus, we can definitely add it. |
Thanks @rektdeckard and @dennwc for your suggestions! I have submitted a PR that would let user publish opus audio without the need for any dependencies. If you would like to test the feature, you can run a separate simple program that acts as a multicast sender. It should subscribe to the audio of a different participant other than the bot created by the CLI and send their audio as multicast packets to the same endpoint. Here is a simple example:
Please let me know what you guys think! I would be happy to clear out any questions or make any fixes based on your concerns and/or suggestions. |
Hi LiveKit CLI dev team!
What do you guys think about adding a new source of audio publishing option by listening to incoming multicast audio packets and then publishing it to a room? I think we could support G711, PCM and Opus codec packets and let the CLI transcode them to Opus if needed. Since listening to multicast packets require a socket
connectionrunning asynchronously, we might also need to give the options for users create, delete and list multicast listeners that is being operated by the CLI.Use Case
Multicast is actively used in the radio and VoIP sectors, and having this feature would allow developers to send audio to a LiveKit room by running a CLI command from any one of their already existing servers instead of creating a new bridge server/incorporating LiveKit server SDK into their existing servers.
I would love to hear your thoughts and suggestions. According to the discussion, I would be happy to submit a PR for this feature!
The text was updated successfully, but these errors were encountered: