opus_codec_linux 3.0.5
opus_codec_linux: ^3.0.5 copied to clipboard
Linux implementation of the opus_codec plugin.
opus_codec_linux #
The Linux implementation of opus_codec.
Usage #
This package is endorsed, so it is automatically included when you depend on opus_codec in your Flutter application. No additional setup is required.
How opus is loaded #
The plugin uses a two-tier loading strategy:
-
Bundled library (preferred): A prebuilt
libopusshared object is shipped as a Flutter asset (libopus_x86_64.so.bloborlibopus_aarch64.so.blob). On first use it is copied to the system temporary directory and opened withDynamicLibrary.open. The copied file is reused on subsequent calls. -
System fallback: If the bundled library cannot be loaded (missing asset, unsupported architecture, corrupted file, etc.), the plugin falls back to
DynamicLibrary.open('libopus.so.0'), which loads the system-installed version.
If neither option succeeds an ArgumentError is thrown with installation instructions.
Supported architectures #
| Architecture | Bundled asset |
|---|---|
| x86_64 | libopus_x86_64.so.blob |
| aarch64 | libopus_aarch64.so.blob |
Installing the system library (fallback) #
If the bundled binary does not work on your distribution you can install libopus from your package manager:
Debian/Ubuntu:
sudo apt install libopus0
Fedora:
sudo dnf install opus
Arch Linux:
sudo pacman -S opus