I know a lot of you are eagerly waiting audio in the live streams, but unfortunately it's not going to be as easy as I originally thought. Ring only appears to support PCMU, while HomeKit only supports Opus, AAC-ELD, AMR and AMR-WB. This means that we need to convert every audio packet from Ring to one of the supported HomeKit codecs, and then convert the other way if we want 2-way audio. While this is definitely possible, it's going to take a lot of research into existing encoders/decoders and finding a way to do it efficiently so that it will work on Raspberry pis (since that's what most homebridge setups run on). This is not a challenge that I'm currently looking to take on myself since live video was my main goal (and a huge challenge in itself). I would love some help from the community on this one, especially if anyone out there is familiar with audio codecs and RTP.
If anyone starts actively working on this, please comment below to avoid duplicate work. For those of you who really want this feature but are unable to help on the code side, please throw a 馃憤 or 鉂わ笍 on the issue, rather than blowing up this thread with +1 comments 馃槃.
I think the easiest approach would be to just use ffmpeg, any manual encoding/decoding will be a nightmare
Just wanted to give an update on audio & streaming. Over the weekend I got ffmpeg pulled into the SIP client and used it to do audio transcoding for HomeKit. It works 馃殌 馃帀! I still have a fair amount of cleanup and testing to do before I will be ready to release the changes, but I should have a functioning version of HomeKit audio later this week. The initial version will just be 1-way audio (haven't tried to do 2-way yet), and I can't promise that the quality will be amazing. Big thanks to @bourdakos1 for pushing me in the right direction with your streaming code!
@dgreif Awesome news!
Ok, thanks for everyone's patience on audio! v5.6.1 is out and 1-way audio is working! Now, there are some caveats that I need to cover...
Has there been any progress on 2-way audio? Is it even possible?
@ifeign someone else just asked about this in #237. I'll post any updates for 2-way audio in that issue.
Most helpful comment
Just wanted to give an update on audio & streaming. Over the weekend I got ffmpeg pulled into the SIP client and used it to do audio transcoding for HomeKit. It works 馃殌 馃帀! I still have a fair amount of cleanup and testing to do before I will be ready to release the changes, but I should have a functioning version of HomeKit audio later this week. The initial version will just be 1-way audio (haven't tried to do 2-way yet), and I can't promise that the quality will be amazing. Big thanks to @bourdakos1 for pushing me in the right direction with your streaming code!