# [![](resources/kirikas.png)](resources/kirika.png) Kirika Collection of audio utilities for decoding/encoding files and streams. * Not based on ffmpeg/libav/libavcodec/libavformat and alike * Channel-based audio consumption/filter chain * Raw sample analyzer channels * AnalyzerChannel channels / mergers / splitters / trimmers * Audio resampler * Audio downmixing to stereo/mono * Multi-codec decoder and encoder * Multi-format packetizers * ReplayGain 2.0 track/album calculator ## Codecs supported | Codec | Containers | Decoder | Analyzer | Encoder | Notes | |:----------:|:----------:|:-------:|:--------:|:-------:|:------------------------------------------------------------------------------------------------------------------------------------------------------| | **FLAC** | FLAC, Ogg | ✅ | ✅ | ✅ | Adjustable encoding compression level and block size. | | **TTA** | TTA | ✅ | ✅ | ✅ | Only 16bit encoding | | **MP3** | MP3 | ✅ | - | ✅ | Adjustable encoding bitrate and mode. Decoding via [minimp3](https://github.com/kvark128/minimp3), encoding via [LAME](https://lame.sourceforge.io/). | | **Opus** | Ogg | ✅ | - | ✅ | Adjustable encoding bitrate. | | **Vorbis** | Ogg | ✅ | - | ❌ | | | **AAC** | ADTS | ❌ | - | ✅ | Adjustable encoding bitrate and mode (LC, HEv2). | ## Container packetizers supported | Container | Packetizer | Keep Mode | Sample Number | |:---------:|:----------:|:---------:|:-------------:| | **FLAC** | ✅ | ✅ | ✅ | | **TTA** | ❌ | - | - | | **MP3** | ✅ | ✅ | ✅ | | **Ogg** | ✅ | ✅ | ✅* | | **ADTS** | ✅ | ✅ | ✅ | *Sample number (absolute granule position) of Ogg depends on underlying codec implementing it. ## Dependencies ### Go >= 1.18 ### [libFLAC](https://github.com/xiph/flac) (required by [goflac](https://github.com/cocoonlife/goflac)) ```shell sudo apt install libflac-dev ``` ### [libopus](https://github.com/xiph/opus) and [libopusfile](https://github.com/xiph/opusfile) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus)) ```shell sudo apt install libopus-dev libopusfile-dev ``` ### [libopusenc](https://github.com/xiph/libopusenc) (required by [go-pus](https://git.gammaspectra.live/S.O.N.G/go-pus)) ```shell git clone --depth 1 https://github.com/xiph/libopusenc.git cd libopusenc ./autogen.sh ./configure --prefix /usr make sudo make install ``` ### [FDK AAC Codec Library](https://github.com/mstorsjo/fdk-aac) (required by [go-fdkaac](https://git.gammaspectra.live/S.O.N.G/go-fdkaac)) ```shell git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git cd fdk-aac ./autogen.sh ./configure --prefix /usr make -j$(nproc) sudo make install ``` ### [LAME](https://lame.sourceforge.io/) (required by [go-lame](https://github.com/viert/go-lame)) ```shell sudo apt install libmp3lame-dev ``` ### [libsamplerate](https://github.com/libsndfile/libsamplerate) (required by [gosamplerate](https://github.com/dh1tw/gosamplerate)) ```shell sudo apt install libsamplerate0-dev ``` ### [libebur128](https://github.com/jiixyj/libebur128) (required by [go-ebur128](https://git.gammaspectra.live/S.O.N.G/go-ebur128)) ```shell sudo apt install libebur128-dev ```