Difference between revisions of "Toolame-DAB"

From OpenDigitalRadio
Jump to navigationJump to search
m (ODR-PadEnc)
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''Toolame''' is an open source implementation of '''MPEG-1/2 Layer II audio coding'''.
+
'''Warning! Toolame-DAB is deprecated, now that [[FDK-AAC-DABplus]] can encode DAB too'''
 +
 
 +
Toolame is an open source implementation of MPEG-1/2 Layer II audio coding.
 +
Toolame-DAB is a modified version that supports the MPEG ZMQ output to [[ODR-DabMux]], improved PAD insertion compatible with [[ODR-PadEnc]] (for MOT Slideshow and DLS support) and JACK input.
 +
 
 +
The toolame-dab always uses DAB framing.
 +
 
 +
Its development is done on github:
 +
https://github.com/Opendigitalradio/toolame-dab
  
It also supports the necessary options to add a DAB PAD field on every frame.
 
  
 
===Basic Usage===
 
===Basic Usage===
  
 
  -s <kHz>: sampling rate in kHz
 
  -s <kHz>: sampling rate in kHz
  -D <bytes>: add x bytes to every MPEG frame for DAB support
+
  -p <bytes>: add x PAD bytes to every MPEG frame
 +
-P <padfifo>: take PAD data from the specified FIFO
 
  -b <bitrate>: output bitrate in kbit/s
 
  -b <bitrate>: output bitrate in kbit/s
 +
-j : enable JACK input
 +
 +
Call
 +
toolame -h
 +
for detailed information
 +
 +
Example with alsa input using sox:
 +
sox -t alsa $ALSASRC -b 16 -t raw - rate 48k channels 2 | \
 +
    ../toolame/toolame \
 +
    -s 48  -b $BITRATE /dev/stdin $DST
 +
where $DST is of the form
 +
tcp://<some host running odr-dabmux>:<port>
 +
Taken from [https://github.com/mpbraendli/mmbtools-aux/blob/master/encode-alsasrc-sox-mpeg.sh this script]
 +
 +
Example with stdout as output:
 +
 +
toolame -s 48 -b 128 /dev/stdin /dev/stdout
 +
 +
Reads linear stream from standard input, encode it at 128kbit/s, add 4bytes for DAB PAD and output stream to standard output (this command was typically used, "piped" with other commands for live encoding in a DAB transmission. Now it's better to use the newer ZMQ.)
 +
 +
Example with JACK input and output to ODR-DabMux ZMQ running on localhost
  
See [[toolame man page]] for detailed information
+
toolame -s 48 -b 128 -j dabenc tcp://localhost:9002
  
Example:
+
The encoder will create two JACK ports: dabenc:input0 and dabenc:input1
  
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===
 
===Source code===
  
http://sourceforge.net/projects/toolame/files/
+
Get '''toolame-dab''' from https://github.com/Opendigitalradio/toolame-dab
  
===Warning !===
+
git clone https://github.com/Opendigitalradio/toolame-dab.git
A more recent fork called twolame exists. Despite de 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.
+
cd toolame-dab
 +
make
 +
sudo cp toolame /usr/local/bin
  
== JACK version (BETA) ==
+
The installed executable is called ''toolame''
Matthias Brandli has modified the latest version of toolame (version 02l) to support JACK Audio Connection Kit input. It can be found here: [[Image:Toolame-02l-jack-1.tar.bz2]]
 
  
This version will compile to toolame-jack, and supports two additional options:
+
The original source for toolame-02l is
-j            Enable JACK input
+
http://sourceforge.net/projects/toolame/files/
-n <name>      Specify JACK name
 
  
All other options are unchanged.
+
===Warning !===
 
+
A fork of toolame 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-dab and not twolame for DAB tests.
The mercurial repository for the modifications is located at http://hg.mpb.li/toolame-02l-jack/
 

Latest revision as of 10:03, 7 February 2017

Warning! Toolame-DAB is deprecated, now that FDK-AAC-DABplus can encode DAB too

Toolame is an open source implementation of MPEG-1/2 Layer II audio coding. Toolame-DAB is a modified version that supports the MPEG ZMQ output to ODR-DabMux, improved PAD insertion compatible with ODR-PadEnc (for MOT Slideshow and DLS support) and JACK input.

The toolame-dab always uses DAB framing.

Its development is done on github: https://github.com/Opendigitalradio/toolame-dab


Basic Usage

-s <kHz>: sampling rate in kHz
-p <bytes>: add x PAD bytes to every MPEG frame
-P <padfifo>: take PAD data from the specified FIFO
-b <bitrate>: output bitrate in kbit/s
-j : enable JACK input

Call

toolame -h

for detailed information

Example with alsa input using sox:

sox -t alsa $ALSASRC -b 16 -t raw - rate 48k channels 2 | \
   ../toolame/toolame \
   -s 48  -b $BITRATE /dev/stdin $DST

where $DST is of the form

tcp://<some host running odr-dabmux>:<port>

Taken from this script

Example with stdout as output:

toolame -s 48 -b 128 /dev/stdin /dev/stdout

Reads linear stream from standard input, encode it at 128kbit/s, add 4bytes for DAB PAD and output stream to standard output (this command was typically used, "piped" with other commands for live encoding in a DAB transmission. Now it's better to use the newer ZMQ.)

Example with JACK input and output to ODR-DabMux ZMQ running on localhost

toolame -s 48 -b 128 -j dabenc tcp://localhost:9002

The encoder will create two JACK ports: dabenc:input0 and dabenc:input1


Source code

Get toolame-dab from https://github.com/Opendigitalradio/toolame-dab

git clone https://github.com/Opendigitalradio/toolame-dab.git
cd toolame-dab
make
sudo cp toolame /usr/local/bin

The installed executable is called toolame

The original source for toolame-02l is http://sourceforge.net/projects/toolame/files/

Warning !

A fork of toolame 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-dab and not twolame for DAB tests.