Example of live re-broadcasting on DAB of many Internet radio stations
Contents |
General procedure
It is advised to use two linux PC, one attached to the USRP doing the OFDM modulation; the second receiving the streams from Internet, encoding them, making the DAB multiplex and sending the multiplex stream to the first PC.
On the modulation PC:
- Make a FIFO for the ETI stream
- Start a netcat listening on a free TCP port and redirect it to the FIFO
- Start the modulator process with the FIFO as input
On the multiplexer PC:
- Create a FIFO for each station
- For each station: Receive stream using mpg123, encode it live in MPEG Layer II using toolame and send it to the FIFO
- Start MUX process with every FIFO as input and use a pipe into a Netcat process sending to the TCP port you defined on the modulation PC.
- That's it (if everything configured properly), program can be received on any DAB receiver.
Commands on modulation PC
Creation of FIFO:
mkfifo etistream.fifo
Listening on TCP port 1234:
netcat -l -p 1234 >etistream.fifo
OFDM Modulation (CRC-DabMod) and output to USRP on channel 12C (CRC-Dwap.py):
CRC-DabMod etistream.fifo -f -g1 -r 3200000 |CRC-Dwap.py -r3200000 -f 227360000 -u
Commands on multiplexer PC
For each station
Creation of FIFO
mkfifo maxxima.fifo
Internet stream reception using mpg123, resampling at 48kHz and encoding in MPEG Layer II at 128kbps with 4 bytes of PAD using toolame, output to the FIFO
mpg123 -r 48000 -s http://maxxima.mine.nu:8000 |toolame -s 48 -D 4 -b 128 /dev/stdin ./maxxima.fifo
Creation of the multiplex
Multiplexing (CRC-DabMux) Declaration of each subchannel (-A) and ID (-i) and protection mode (-p); then description of each service, label (-L) and corresponding service component (-C) attached to a specific ID (-i); output of the mux to target modulator PC IP using TCP
CRC-DabMux -A ./maxxima.fifo -b 128 -i 1 -p 3 \ -A ./lemixx.fifo -b 128 -i 2 -p 3 \ -A ./banane.fifo -b 128 -i 3 -p 3 \ -A ./meyrin.fifo -b 128 -i 4 -p 3 \ -A ./rom.fifo -i 5 -p 3 \ -S -L "Maxxima" -C -i1 \ -S -L "LeMixx" -C -i2 \ -S -L "Banane" -C -i3 \ -S -L "MeyrinFM" -C -i4 \ -S -L "RomRadio" -C -i5 \ -O fifo:///dev/stdout |netcat 10.73.140.78 1234
Notes
- Modulation is the most CPU intensive, nothing else should be made on modulation PC
- Multiplexer can handle the loss of a station (for example if FIFO is broken), however it will keep the station on air and mute the audio waiting for it to return