Toolame-DAB
Toolame is an open source implementation of MPEG-1/2 Layer II audio coding. Toolame-dab is a slightly modified version that supports the MPEG ZMQ input from ODR-DabMux.
It also supports the necessary options to add a DAB PAD field on every frame.
Contents |
Basic Usage
-s <kHz>: sampling rate in kHz -D <bytes>: add x bytes to every MPEG frame for DAB support -b <bitrate>: output bitrate in kbit/s
See toolame man page for detailed information
Example with alsa input using sox: https://github.com/mpbraendli/mmbtools-aux/blob/master/encode-alsasrc-sox-mpeg.sh
Example with stdout as output:
toolame -s 48 -D 4 -b 128 /dev/stdin /dev/stdout
Get linear stream from standard input, encode it at 128kbit/s, add 4bytes for DAB PAD and output stream to standard output (this command is typically used, "piped" with other commands for live encoding in a DAB transmission)
Source code
To get zmq output, get toolame-dab from https://github.com/Opendigitalradio/toolame-dab
git clone https://github.com/Opendigitalradio/toolame-dab.git cd toolame-dab make sudo make install
The installed executable is called toolame
The original source for toolame-02l is http://sourceforge.net/projects/toolame/files/
Warning !
A more recent fork called twolame exists. Despite the fact that the code has been cleaned, twolame has lost DAB support that was present in toolame. So be careful to install toolame and not twolame for DAB tests.
JACK version (BETA)
Matthias Brändli has modified the latest version of toolame (version 02l) to support JACK Audio Connection Kit input. It can be found here: File:Toolame-02l-jack-2.tar.bz2 This version is unstable, not maintained because of lack of interest, and cannot be used for 24/7 operation. Interested developers are welcome to send patches !
Notes on compilation: There are some flags in the Makefile that have to be defined before compiling. An appropriate architecture must be specified, which depends on whether your system is 32bit or 64bit. You can use -march=pentium for the former (All 32-bit Intel and AMD processor), and -march=core2 for 64bit intel processors (core2 and newer, maybe also works for AMD processors)
This version will compile to an executable called toolame-jack, which supports two additional options:
-j Enable JACK input -n <name> Specify JACK name
All other options are unchanged. Example:
toolame-jack -j -n toolame-1 examplefile.mp2
The mercurial repository for the modifications is located at http://hg.mpb.li/toolame-02l-jack/