| **Opus** | [Ogg](https://www.xiph.org/ogg/doc/framing.html) | ✅ | ❌ | `float32` | ✅ | Adjustable encoding bitrate.<br/>Decoding/encoding by [libopus](https://github.com/xiph/opus) via [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus).<br/>Linked Ogg streams of different channel count are not supported. |
| **Vorbis** | [Ogg](https://www.xiph.org/ogg/doc/framing.html) | ✅ | ❌ | `float32` | ✅ | Decoding/encoding by [libvorbis](https://github.com/xiph/vorbis) via [go-vorbis](https://git.gammaspectra.live/S.O.N.G/go-vorbis).<br/>If [go-vorbis](https://git.gammaspectra.live/S.O.N.G/go-vorbis) is disabled, [jfreymuth/vorbis](https://github.com/jfreymuth/vorbis) via [jfreymuth/oggvorbis](https://github.com/jfreymuth/oggvorbis) decoder will be used.<br/>Linked Ogg streams of different channel count are not supported. |
| **AAC** | [ADTS](https://wiki.multimedia.cx/index.php/ADTS), ADIF*, MP4** | ✅ | ❌ | `int16` | ✅ | Adjustable encoding bitrate and mode (LC, HEv1, HEv2).<br/>Decoding/encoding by [FDK-AAC](https://github.com/mstorsjo/fdk-aac) via [go-fdkaac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac).<br/>If [go-fdkaac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac) codec is disabled, [VisualOn AAC encoder](https://github.com/gen2brain/aac-go) will be used for limited encoding support.<br/>*ADIF only supported on encoding.<br/>**MP4 only supported on encoding, and fragmented MP4 currently. |
| **ALAC** | MP4* | ✅ | ✅ | `int32` | ✅ | Decoding/encoding by [libalac](https://git.gammaspectra.live/S.O.N.G/alac) via [go-alac](https://git.gammaspectra.live/S.O.N.G/go-alac).<br/>Disabled by default.<br/>*MP4 encoding only supported on fragmented MP4 currently. |
| **MP3** | ✅ | ✅ | ✅ | ✅ | Uses [sssgun/mp3](https://github.com/sssgun/mp3) as a frame parser. |
| **Ogg** | ✅ | ✅ | ✅* | ✅ | Uses custom Kirika packetizer.<br/>*Sample numbers (absolute granule position in Ogg) depend on underlying codec implementing it.<br/>Has been tested as working for Opus, FLAC |
### [libopus](https://gitlab.xiph.org/xiph/opus) and [libopusfile](https://gitlab.xiph.org/xiph/opusfile) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus))
This tag disables CGO support, and disables any formats/codecs that require it. Some other features will degrade or be less performant, or alternative decoders be used.
Additionally, libebur128 (used for normalization) will be disabled.
This tag disables support for the specified format/codec. This does not affect packetizers.
Current implemented [format]: `aac, alac, flac, mp3, opus, tta, vorbis`. Disabling `flac` will break tests.
### disable_codec_libfdk-aac
This tag disables the [libfdk-aac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac) support for decoding/encoding AAC. This is available for specific problems with the FDK license that conflicts with your needs or policy.
If this tag is enabled, yet `aac` support remains enabled, an AAC encoder (but not decoder) will be built with the [VisualOn AAC encoder](https://github.com/gen2brain/aac-go) bindings, which are vastly worse.
This tag disables the [libvorbis](https://gitlab.xiph.org/xiph/vorbis) support for decoding/encoding Vorbis.
If this tag is enabled, yet `vorbis` support remains enabled, [jfreymuth/vorbis](https://github.com/jfreymuth/vorbis) via [jfreymuth/oggvorbis](https://github.com/jfreymuth/oggvorbis) Vorbis decoder will be used.
This tag disables the [LAME](https://github.com/viert/go-lame) support for encoding MP3. This is available for specific problems with the LGPL v2 license that conflicts with your needs or policy.
MP3 decoding is not affected by this tag.
### disable_codec_tta
This tag disables the [TTA](https://git.gammaspectra.live/S.O.N.G/go-tta) support for decoding/encoding TTA. This is available for specific problems with the LGPL v3 license that conflicts with your needs or policy.
Copyright (c) 2022 Kirika Contributors All rights reserved.
Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| [S.O.N.G/go-alac](https://git.gammaspectra.live/S.O.N.G/go-alac) | Go | [BSD 2-Clause](https://git.gammaspectra.live/S.O.N.G/go-alac/src/branch/master/LICENSE) | |
| [S.O.N.G/alac](https://git.gammaspectra.live/S.O.N.G/alac) | C++/C | [Apache 2.0](https://git.gammaspectra.live/S.O.N.G/alac/src/branch/master/LICENSE) | Can be linked by cgo as a shared library. |
| [S.O.N.G/go-ebur128](https://git.gammaspectra.live/S.O.N.G/go-ebur128) | Go | [BSD 2-Clause](https://git.gammaspectra.live/S.O.N.G/go-ebur128/src/branch/master/LICENSE) | |
| [jiixyj/libebur128](https://github.com/jiixyj/libebur128) | C | [MIT](https://github.com/jiixyj/libebur128/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [mstorsjo/fdk-aac](https://github.com/mstorsjo/fdk-aac) | C++/C | [FDK License, BSD-like](https://github.com/mstorsjo/fdk-aac/blob/master/NOTICE) | Does not include patent grants.<br/>Considered free by [Red hat](https://bugzilla.redhat.com/show_bug.cgi?id=1501522), [Fedora](https://fedoraproject.org/wiki/Licensing/FDK-AAC), [GNU](https://www.gnu.org/licenses/license-list.html#fdk), [FSF](https://www.fsf.org/blogs/licensing/recent-licensing-updates#:~:text=maintain%20free%20versions.-,The%20Fraunhofer%20FDK%20AAC%20license,-We%20recently%20added); and non-free by [Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694257).<br/>Can be linked by cgo as a shared library. |
| [S.O.N.G/go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus) | Go | [MIT](https://git.gammaspectra.live/S.O.N.G/go-pus/src/branch/v2/LICENSE) | |
| [xiph/opus](https://gitlab.xiph.org/xiph/opus) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/opus/-/blob/master/COPYING) | Read extra license details on the [official site](https://opus-codec.org/license/).<br/>Can be linked by cgo as a shared library. |
| [xiph/opusfile](https://gitlab.xiph.org/xiph/opusfile) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/opusfile/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [xiph/ogg](https://gitlab.xiph.org/xiph/ogg) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/ogg/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [xiph/libopusenc](https://gitlab.xiph.org/xiph/libopusenc) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/libopusenc/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [S.O.N.G/go-vorbis](https://git.gammaspectra.live/S.O.N.G/go-vorbis) | Go | [BSD 2-Clause](https://git.gammaspectra.live/S.O.N.G/go-vorbis/src/branch/v2/LICENSE) | |
| [xiph/vorbis](https://gitlab.xiph.org/xiph/vorbis) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/vorbis/-/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [S.O.N.G/go-tta](https://git.gammaspectra.live/S.O.N.G/go-tta) | Go | [LGPL v3](https://git.gammaspectra.live/S.O.N.G/go-tta/src/branch/master/LICENSE) | |
| [S.O.N.G/goflac](https://git.gammaspectra.live/S.O.N.G/goflac) | Go | [BSD 3-Clause](https://git.gammaspectra.live/S.O.N.G/goflac/src/branch/master/LICENSE) | |
| [xiph/flac](https://gitlab.xiph.org/xiph/flac) | C | [BSD 3-Clause](https://gitlab.xiph.org/xiph/flac/-/blob/master/COPYING.Xiph) | Read extra license details on the [official site](https://xiph.org/flac/license.html).<br/>Can be linked by cgo as a shared library. |
| [dh1tw/gosamplerate](https://github.com/dh1tw/gosamplerate) | Go | [BSD 2-Clause](https://github.com/dh1tw/gosamplerate/blob/master/LICENSE) | |
| [libsndfile/libsamplerate](https://github.com/libsndfile/libsamplerate) | C | [BSD 2-Clause](https://github.com/libsndfile/libsamplerate/blob/master/COPYING) | Can be linked by cgo as a shared library. |
| [S.O.N.G/voaac-go](https://git.gammaspectra.live/S.O.N.G/voaac-go) | Go | [Apache 2.0](https://git.gammaspectra.live/S.O.N.G/voaac-go/src/branch/master/COPYING) | |
| [mstorsjo/vo-aacenc](https://github.com/mstorsjo/vo-aacenc) | C | [Apache 2.0](https://github.com/mstorsjo/vo-aacenc/blob/master/COPYING) | Subdependency and included as part of _S.O.N.G/voaac-go_. |
| [S.O.N.G/minimp3](https://git.gammaspectra.live/S.O.N.G/minimp3) | Go | [MIT](https://git.gammaspectra.live/S.O.N.G/minimp3/src/branch/master/LICENSE.txt) | |
| [lieff/minimp3](https://github.com/lieff/minimp3) | C | [CC0 1.0](https://github.com/lieff/minimp3/blob/master/LICENSE) | Subdependency and included as part of _S.O.N.G/minimp3_. |
| _[icza/bitio](https://github.com/icza/bitio)_ | Go | [Apache 2.0](https://github.com/icza/bitio/blob/master/LICENSE-APACHE) or [LGPL v2.1](https://github.com/icza/bitio/blob/master/LICENSE-LGPL-v2.1) | Subdependency of _S.O.N.G/flacgo_. |
| [sssgun/mp3](https://github.com/sssgun/mp3) | Go | [MIT](https://github.com/sssgun/mp3/blob/master/LICENSE) | |
| [viert/go-lame](https://github.com/viert/go-lame) | Go | [MIT](https://github.com/viert/go-lame/blob/master/LICENSE) | |
| [LAME](https://lame.sourceforge.io/) | C | [LGPL v2](https://sourceforge.net/p/lame/svn/HEAD/tree/trunk/lame/COPYING) | Can be linked by cgo as a shared library. |