Repository navigation
Releases
v1.3.2
Decoder performance
The int16 and float decoders now copy the decoded PCM directly into the returned bytes. This removes per-sample Python conversions from the standard, multistream, and Projection decoders. The public API and output format are unchanged.
Benchmarks
The GitHub Actions benchmark used 20 ms stereo frames at 48 kHz on Ubuntu with libopus 1.6.1. The table shows median decode time per frame before and after, using PyPI 1.3.1 as the baseline. Performance run
| Python | int16 decode (µs/frame) | float decode (µs/frame) |
|---|---|---|
| 3.10 | 105.58 → 44.32 (−58%) | 92.25 → 33.94 (−63%) |
| 3.11 | 87.62 → 35.51 (−59%) | 75.31 → 27.17 (−64%) |
| 3.12 | 99.79 → 36.41 (−64%) | 92.42 → 27.90 (−70%) |
| 3.13 | 172.61 → 45.83 (−73%) | 151.21 → 35.36 (−77%) |
| 3.14 | 137.13 → 35.58 (−74%) | 104.58 → 27.68 (−74%) |
Encoding time varied by less than 1% across the matrix. In a separate macOS arm64 benchmark with Python 3.11 and libopus 1.6.1, six-channel multistream decode time decreased by 52–55% and four-channel Projection decode time decreased by 48–49%.
Benchmark tooling
Version comparisons now run in isolated Python processes and record the installed package version and import path in the results.
v1.3.0
This release adds multistream and projection support on top of the existing Opus encoder/decoder APIs.
Added
- Low-level multistream encoder/decoder bindings.
- High-level
MultiStreamEncoderandMultiStreamDecoderclasses. - Low-level projection encoder/decoder bindings.
- High-level
ProjectionEncoderandProjectionDecoderclasses. - Roundtrip tests for multistream and projection encode/decode paths.
- CI checks that verify the GitHub runner's
libopusexposes the required multistream and projection APIs.
Compatibility
Existing Encoder and Decoder APIs are unchanged. The new APIs are additive.
v1.2.0
This release adds multistream support to opuslib-next.
Added
- Low-level multistream encoder/decoder bindings.
- High-level
MultiStreamEncoderandMultiStreamDecoderclasses. - Multistream encode/decode roundtrip tests for integer and float PCM paths.
- Tests for multistream state creation, reset, size queries, and basic CTL properties.
Compatibility
Existing Encoder and Decoder APIs are unchanged. The new multistream APIs are additive.
v1.1.7
Fixed
- Fixed
Encoder.inband_fecassignment raising aTypeError.- The setter was not forwarding the assigned value to
encoder_ctl. encoder.inband_fec = 1now works as expected.
- The setter was not forwarding the assigned value to
Tests
- Added a regression test for the high-level
Encoder.inband_fecproperty setter.
Upgrade
Using pip:
pip install -U opuslib-nextUsing uv:
uv add --upgrade opuslib-nextInstall This Exact Version
Using pip:
pip install opuslib-next==1.1.7Using uv:
uv add opuslib-next==1.1.7