(→jack input: toolame with JACK)
m (→jack input)
Revision as of 22:46, 19 February 2011
DAB audio encoding with toolame
- toolame MPEG-Layer II encoder (DAB)
toolame can take a file or a raw PCM stream as input.
"mpg123" can be used to take Internet radio stream and convert them from mp3 to raw PCM samples. Be careful, it has been noticed that earlier version have a memory leak when resampling. We use version 1.4.3 to avoid the problem.
Example that decode an mp3 stream, resample it to 48kHz and output the raw samples to stdout:
mpg123 -b 1024 -r 48000 -s http://maxxima.mine.nu:8000
Toolame has been modified to support JACK, rendering the dirty workaround mentioned below unnecessary.
toolame -D 4 -b 128 -j -n toolame1 ./1.ff
Old workaround needed for JACKless toolame
Toolame doesn't support jack, we use arecord with ALSA emulation to get the raw PCM stream. It is a dirty workaround, it is foreseen to find a better way in the future for example by modifying toolame to support jack:
arecord -t raw -f S16_LE -c 2 -r 48000 -D jackplug |toolame -s 48 -D 4 -b 128 /dev/stdin ./1.ff
DAB+ audio encoding with crc-dabplus
- CRC-dabplus HE-AAC encoder (DAB+) from CRC (warning, it is not free/open source because of royalty)
crc-dabplus uses Gstreamer for input/output.
Example of jackplug input (ALSA emulation), encoding at 48kbps, output to a FIFO file:
crc-dabplus -i card://jackplug -g -c 2 -b 48 -o file://2.ff
Similar example but with DLS input from TCP on port 12000
crc-dabplus -i card://jackplug -g -c 2 -b 80 -d tcpserver://:12000 -p 28 -t dls -o file://4.ff