GNOME Bugzilla – Bug 753737
opusenc: Bitrate limit is too low
Last modified: 2018-11-03 11:40:08 UTC
Created attachment 309431 [details] [review] opusenc: Raise bitrate limit The bitrate property has a limit of 650 kb/s. However the actual valid limit is around 255 kb/s per channel, and Opus supports up to 8 channels with defined mappings, and up to 255 channels with a user-defined mapping.
Comment on attachment 309431 [details] [review] opusenc: Raise bitrate limit Should we clamp the highest bitrate once we know how many channels are going to be used to the actual maximum?
That's up to you. The worst that'll happen if you don't is that libopus will clamp the per-channel value to 300000 bps.
300000bps or 255kb/s as you said above? But anyway, the clamping happens inside libopus in any case?
255 kbps is approximately the maximum useful value, in the sense that if you ask for more than this, libopus will either pad with zeros or use fewer bits (depending on other settings). But yes, it will clamp per-channel values inside libopus. I.e., the unclamped value is used to make allocations to each channel/stream, and then the per-stream values are clamped to 300000 kbps per channel, mostly to avoid problems with arithmetic overflow deeper inside the codec.
Minded to apply after freeze. We can just warn if someone sets a limit that doesn't make sense for the number of channels.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/212.