Kirika/README.md

6 KiB

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.
Decoding/encoding by libFLAC via goflac.
TTA TTA Decoding/encoding via go-tta.
MP3 MP3 - Adjustable encoding bitrate and mode.
Decoding via minimp3, encoding by LAME via go-lame.
Opus Ogg - Adjustable encoding bitrate.
Decoding/encoding by libopus via go-pus.
Vorbis Ogg - Decoding by jfreymuth/vorbis via jfreymuth/oggvorbis.
AAC ADTS - Adjustable encoding bitrate and mode (LC, HEv2).
Decoding/encoding by FDK-AAC via go-fdkaac.

Container packetizers supported

Container Packetizer Keep Mode Sample Numbers Notes
FLAC Uses mewkiz/flac for parsing streams.
TTA - -
MP3 Uses sssgun/mp3 as a frame parser.
Ogg * *Sample numbers (absolute granule position in Ogg) depend on underlying codec implementing it.
Has been tested as working for Opus
ADTS Uses edgeware/mp4ff for its ADTS frame parser.

Dependencies

Go >= 1.18

libFLAC (required by goflac)

sudo apt install libflac-dev

libopus and libopusfile (required by go-pus)

sudo apt install libopus-dev libopusfile-dev

libopusenc (required by go-pus)

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 (required by go-fdkaac)

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 (required by go-lame)

sudo apt install libmp3lame-dev

libsamplerate (required by gosamplerate)

sudo apt install libsamplerate0-dev

libebur128 (required by go-ebur128)

sudo apt install libebur128-dev