Example of live re-broadcasting on DAB of many Internet radio stations
(→Multiplexing/modulation on one machine) |
(→Commands on modulation PC) |
(One intermediate revision by one user not shown) |
Latest revision as of 01:48, 30 December 2010
Contents |
[edit] General procedure
It is advised to use two linux PC, one attached to the USRP doing the OFDM modulation (CPU intensive); 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:
- Have CRC MMBtools installed from the CD, USRP attached to the USB
- 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:
- Have CRC MMBtools installed from the CD or download and compile CRC-DabMux multiplexer from the sources.
- 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.
It is possible to make both processes on the same machine if CPU is powerful enough.
[edit] Commands on modulation PC
Creation of FIFO:
mkfifo etistream.fifo
Listening on TCP port 1234:
netcat -l 1234 >etistream.fifo
OFDM Modulation (CRC-DabMod) and output to USRP on channel 12C (CRC-Dwap.py). See Band 3 Channels for frequencies:
CRC-DabMod etistream.fifo -f -g1 -r 3200000 |CRC-Dwap.py -r3200000 -f 227360000 -u
[edit] Commands on multiplexer PC
[edit] 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
[edit] 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 (in this example 192.168.10.10) 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 192.168.10.10 1234
[edit] Multiplexing/modulation on one machine
For having both processes on the same machine, it is the same but without netcat commands:
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 | \ CRC-DabMod -f -g1 -r 3200000 |\ CRC-Dwap.py -r3200000 -f 227360000 -u
[edit] 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