A general purpose lossless audio-format tailored to be a replacement for the most popular format WAVE or AIFF. This is a reference implementation of the audio-format written in Python 3x, supports all the features denoted in the specification.
Python >=3.5 interpreter is required for executing the tools (make sure that it’s in the path). Note that, installation methods might differ as of environment (eg. on a Debian based system one might run apt-get install python3 python3-pip
, pacman -S python-pip
on a ArchLinux based system).
Make sure that python
and pip
are both in PATH, otherwise it will fail (eg. where python pip
shouldn't return blank lines, replace where
with which
if Windows NT).
Main code exists in the tools/
folder, you’ve to install it manually as there’s no PyPI package yet for this tool. Switch the current directory to there and execute pip -r requirements.txt
(replace pip
with pip3
if doesn’t work).
Python files of tools/
must be in the PATH variable too to call the script from anywhere in the filesystem. On Windows associate Python files with the interpreter (TODO: fix this issue on NT based systems with a non-bash shell).
An imaginary file is choosen for the input for demonstration purposes. The name is reekapeeka.raw
which is a raw PCM data (bitdepth = 24, channels = 2, bytedepth = 3, samplerate = 48000, sampleformat = float, endianness = little, channellayout = interleaved).
Extension convention for Reekpie files is either
.rkp
or.rkpi
.
Encapsulate PCM data with no compression at all. Note that the details about input must be given in advance because there’s no other way it can detect. (1)
$ rkpienc 'reekapeeka.raw' -bytedepth 3 -samplerate 48000 -channels 2 'reekapeeka.rkp'
Encapsulate PCM data with 'brotli' compression. Yes, it does have compression but supports only some, either 'zstd' or 'brotli' or 'lzma'. (2)
$ rkpienc 'reekapeeka.raw' -bytedetpth 3 -samplerate 48000 -channels 2 -compression brotli 'reekapeeka.rkpi'
Decapsulate PCM data from the Reekpie file we’ve just encoded (from the second example shown). It should spit out some data on the console like this.
$ rkpidec 'reekapeeka.rkpi' 'reekapeeka.raw'
Sampleformat: signed
Compression: brotli
Bytedepth: 3
Samplerate: 48000
Channellayout: interleaved
Endianness: little
Channels: 2
^ This information is required to reconstruct the audio, ignore 'Compression' as it’s informal only.
- Compression: 'brotli' or 'zstd' or 'lzma' or no compression at all.
- Bytedepth: 1, 2, 3, 4, 8 (5, 6, 7 are allowed but not used often so excluded).
- Samplerate: 0 to 4294967295 (eg. 44100, 48000 are used more often).
- Channels: 0 to 63 (eg. 1, 2, 6 are used more often).
- Sampleformats: 'unsigned' or 'signed' or 'float' or 'adpcm' or 'a-law' or 'mu-law'.
Contribution can be done either making the reference implementation better or enriching the specification. If you want a change then fork this project and do a pull-request describing the change and how does it benefit the thing.