opus
opus copied to clipboard
Add Support for Constant Bitrate (CBR) in Opus Encoder
Feature: Add support for Constant Bitrate (CBR) control
This PR adds the ability to configure whether the Opus encoder uses constant bitrate (CBR) or variable bitrate (VBR), which was previously unavailable in this Go binding.
Changes
- Introduced
SetCBR(cbr bool)to switch between CBR and VBR. - Introduced
IsCBR() (bool, error)to query current setting. - Added C bridge functions:
bridge_encoder_set_vbrandbridge_encoder_get_vbr.
Reason
Exposing this option allows developers to better control encoding behavior in constrained bitrate environments, particularly for VoIP or streaming use-cases.
Notes
This is a non-breaking change and fully backward compatible.
Thanks for your work on this project!
@hraban Hi, would you mind taking a look when you get a chance? Thanks!
Can I ask why you named it SetCBR instead of SetVBR?