Tweak ffmpeg Opus encoding optoins for more reliable audio #1299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes are pretty minor. Based on what I could determine, the audio from the doorbell was single channel, 24Khz sample rate, and a 24Kb bitrate, so this uses the same for the return audio. Also, disabled Opus variable bit rate, this seems to reduce the stuttering and overall robot sounding voice as well as works around the issues with recent werift versions.
The audio quality is still not as good as that from the Ring app, I'm not sure if this is due to Homekit audio, the transcoding itself (although I tried a lot of different options and this seemed to be the best), or if Ring is doing some type of audio filtering. The audio from Ring seems lower pitched and fuller, like they are filtering it through an equalizer or lowpass filter, which perhaps they are because the speakers in these devices don't do well with higher pitches.
I may play with this some, but for now, this seems better than the previous results, at least for the cameras I have access to.