Difference between revisions of "ODR-DabMux"

From OpenDigitalRadio
Jump to navigationJump to search
m (Hb9egm moved page CRC-DabMux to ODR-DabMux)
Line 1: Line 1:
CRC-DabMux is the free open source [[DAB multiplexing|DAB Multiplexer]] developed by Communication Research Center (CRC) from Canada. It is a command line tool.
+
ODR-DabMux is a free open source [[DAB multiplexing|DAB Multiplexer]] initially developed by Communication Research Center (CRC) from Canada, and subsequently
 +
forked by opendigitalradio. It is a command line tool.
  
CRC have stopped releasing new versions, and it has been forked by Opendigitalradio, and this page will be updated in the next few days to reflect this change.
+
The development is done publicly on [http://github.com/Opendigitalradio GitHub] with releases available ad interim on http://mpb.li
The development now continues on [http://github.com/Opendigitalradio GitHub] with releases available ad interim on http://mpb.li
 
  
This page describes how to compile and use crc-dabmux.
+
This page describes how to compile and use odr-dabmux.
  
 
==More information==
 
==More information==
Line 12: Line 12:
 
The last version published by CRC is [http://mmbtools.crc.ca/component/option,com_docman/task,doc_download/gid,33/ version 0.3.0.4], on which the latest developments are based.
 
The last version published by CRC is [http://mmbtools.crc.ca/component/option,com_docman/task,doc_download/gid,33/ version 0.3.0.4], on which the latest developments are based.
  
==Build information for CRC-DABMUX-0.3.0.4-mpb==
+
==Build information for ODR-DabMux==
 
 
  
  
Line 36: Line 35:
 
(alternatively, you can git clone https://github.com/zeromq/cppzmq.git)
 
(alternatively, you can git clone https://github.com/zeromq/cppzmq.git)
  
CRC-DabMux also depends on [http://www.ka9q.net/code/fec/ libfec from Phil Karn]. On 64-bit machines, the original libfec doesn't compile (" fec.h:267: Error: bad register name `%dil' "). A patched version that compiles on x86_64 (and even on ARM) is available [https://github.com/Opendigitalradio/ka9q-fec/archive/master.zip on GitHub (.zip)]
+
ODR-DabMux also depends on [http://www.ka9q.net/code/fec/ libfec from Phil Karn]. On 64-bit machines, the original libfec doesn't compile (" fec.h:267: Error: bad register name `%dil' "). A patched version that compiles on x86_64 (and even on ARM) is available [https://github.com/Opendigitalradio/ka9q-fec/archive/master.zip on GitHub (.zip)]
  
  
Line 52: Line 51:
  
 
then you can execute, as a test
 
then you can execute, as a test
  crc-dabmux -h
+
  odr-dabmux -h
  
 
When building, be careful to disable debugging, otherwise there will be lot of wasted CPU usage.
 
When building, be careful to disable debugging, otherwise there will be lot of wasted CPU usage.
Line 66: Line 65:
 
==Usage==
 
==Usage==
  
There are two ways to use CRC-DabMux: with command line arguments or with a configuration file.
+
There are two ways to use ODR-DabMux: with command line arguments or with a configuration file.
  
 
===Command line interface===
 
===Command line interface===
There are quite many arguments and options, and the best is to read the manpage (man crc-dabmux) first, and then to look at some examples (e.g. [https://github.com/mpbraendli/mmbtools-aux/blob/master/mux-throttled.sh mux-throttled.sh])
+
There are quite many arguments and options, and the best is to read the manpage (man odr-dabmux) first, and then to look at some examples (e.g. [https://github.com/mpbraendli/mmbtools-aux/blob/master/mux-throttled.sh mux-throttled.sh])
  
 
===Configuration file===
 
===Configuration file===
 
The full configuration can also be specified in a configuration file.
 
The full configuration can also be specified in a configuration file.
  
The example configuration file that is included in doc ([https://github.com/mpbraendli/CRC-mmbtools-dabmux/blob/master/doc/example.mux example.mux]) contains an example with a multiplex consisting of two services. The example file is commented, and is a good example to build your own.
+
The example configuration file that is included in doc ([https://github.com/Opendigitalradio/ODR-DabMux/blob/master/doc/example.mux example.mux]) contains an example with a multiplex consisting of two services. The example file is commented, and is a good example to build your own.
  
To run crc-dabmux with a configuration file, run
+
To run odr-dabmux with a configuration file, run
  crc-dabmux -e my_config.mux
+
  odr-dabmux -e my_config.mux
  
 
==Additional information==
 
==Additional information==
  
 
===Patch to increase page size===
 
===Patch to increase page size===
Some glitches have been noticed on some machines. They are due to underruns in the FIFO. This patch increases the buffer sizes in the mux. wrning, this patch will also increase the delay. To apply it use, the patch command. (for CRC-DabMux <=0.3.0.4)
+
Some glitches have been noticed on some machines. They are due to underruns in the FIFO. This patch increases the buffer sizes in the mux. wrning, this patch will also increase the delay. To apply it use, the patch command. (for CRC-DabMux <= 0.3.0.4)
  
 
  --- src/dabInputFifo.cpp.org 2011-09-27 10:08:35.202323204 -0400
 
  --- src/dabInputFifo.cpp.org 2011-09-27 10:08:35.202323204 -0400
Line 107: Line 106:
 
See the manpage for more info:
 
See the manpage for more info:
 
*[[CRC-DabMux man page]]
 
*[[CRC-DabMux man page]]
 +
* or, of course, man odr-dabmux

Revision as of 15:19, 10 February 2014

ODR-DabMux is a free open source DAB Multiplexer initially developed by Communication Research Center (CRC) from Canada, and subsequently forked by opendigitalradio. It is a command line tool.

The development is done publicly on GitHub with releases available ad interim on http://mpb.li

This page describes how to compile and use odr-dabmux.

More information

Description can be found on http://mmbtools.crc.ca/content/view/39/65/

The last version published by CRC is version 0.3.0.4, on which the latest developments are based.

Build information for ODR-DabMux

Prerequisites

You will need boost at least version 1.42. The one from your distribution is probably fine, and if you have installed GNURadio or UHD, you will already have it.

If you want to use the zeromq inputs or outputs, you need a recent (4.0.3 is best) version of ZeroMQ. It is probably preferred to install it from source:

wget http://download.zeromq.org/zeromq-4.0.3.tar.gz
cd zeromq-4.0.3
./configure
make
sudo make install

This will install it into /usr/local

Then, get the zmq C++ bindings:

wget https://raw2.github.com/zeromq/cppzmq/master/zmq.hpp
sudo cp zmq.hpp /usr/local/include

(alternatively, you can git clone https://github.com/zeromq/cppzmq.git)

ODR-DabMux also depends on libfec from Phil Karn. On 64-bit machines, the original libfec doesn't compile (" fec.h:267: Error: bad register name `%dil' "). A patched version that compiles on x86_64 (and even on ARM) is available on GitHub (.zip)


Compilation

Once the prerequisites are installed, do

./configure --with-debug-malloc=no --disable-debug --enable-input-zeromq --enable-output-zeromq
make
sudo make install


or, if you don't have zeromq:

./configure --with-debug-malloc=no --disable-debug
make
sudo make install

then you can execute, as a test

odr-dabmux -h

When building, be careful to disable debugging, otherwise there will be lot of wasted CPU usage.


Compilation from the git repository

If you cloned the git repository, you might need to call

./bootstrap.sh

to re-generate the autotools scripts and generate the ./configure script

After that, it's the same as above

Usage

There are two ways to use ODR-DabMux: with command line arguments or with a configuration file.

Command line interface

There are quite many arguments and options, and the best is to read the manpage (man odr-dabmux) first, and then to look at some examples (e.g. mux-throttled.sh)

Configuration file

The full configuration can also be specified in a configuration file.

The example configuration file that is included in doc (example.mux) contains an example with a multiplex consisting of two services. The example file is commented, and is a good example to build your own.

To run odr-dabmux with a configuration file, run

odr-dabmux -e my_config.mux

Additional information

Patch to increase page size

Some glitches have been noticed on some machines. They are due to underruns in the FIFO. This patch increases the buffer sizes in the mux. wrning, this patch will also increase the delay. To apply it use, the patch command. (for CRC-DabMux <= 0.3.0.4)

--- src/dabInputFifo.cpp.org	2011-09-27 10:08:35.202323204 -0400
+++ src/dabInputFifo.cpp	2011-09-27 10:13:57.638315966 -0400
@@ -169,11 +169,12 @@
     if (data->buffer != NULL) {
         delete data->buffer;
     }
-    if (size == 0) {
-        size = 1024;
-    }
-    data->buffer = new unsigned char[size * 16];
     data->maxSize = size * 16;
+    int minSize = 2*getpagesize();
+    while (data->maxSize < minSize) {
+        data->maxSize += size;
+    }
+    data->buffer = new unsigned char[data->maxSize];
 #ifdef _WIN32
     ReleaseSemaphore(data->semBuffer, 1, NULL);
 #else


See the manpage for more info: