Difference between revisions of "ODR-DabMux"

From OpenDigitalRadio
Jump to navigationJump to search
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
CRC-DabMux is the free open source DAB Multiplexer developed by Communication Research Center (CRC) from Canada. It is used in command line.
+
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.
  
===More information===
+
The development is done publicly on [http://github.com/Opendigitalradio GitHub] with releases available as git tags. The git master branch always points to the latest release, the next branch is where development happens.
  
Description can be found on http://mmbtools.crc.ca/content/view/39/65/
+
The main communication channel is the [https://groups.google.com/forum/#!forum/crc-mmbtools CRC-mmbTools Google Group mailing list]
  
[http://mmbtools.crc.ca/component/option,com_docman/task,doc_download/gid,25/ Source code is now released] (since September 2008).
 
  
===Build information===
 
  
When building from the source code, be careful to disable debugging, otherwise there will be lot of wasted CPU usage:
 
./configure --with-debug-malloc=no --disable-debug
 
  
CRC-DabMux depend on [http://www.ka9q.net/code/fec/ libfec from Phil Karn]. From recent versions of Ubuntu (10.04) or 64bits, libfec has a compilation error (" fec.h:267: Error: bad register name `%dil' ").
+
==Build information for ODR-DabMux==
  
Pascal Charest, from CRC, has written a workaround for it that you can find on libfec section of [http://mmbtools.crc.ca/content/view/39/65/ CRC-DABMUX page].
+
Install the required dependencies according to the information in [https://github.com/Opendigitalradio/ODR-DabMux/blob/master/INSTALL.md INSTALL.md] file.
 +
 
 +
Each time you update from the git repository (either git checkout or git pull) you should do
 +
./bootstrap.sh
 +
to re-generate the autotools scripts and generate the ./configure script
 +
 
 +
 
 +
==Usage==
 +
 
 +
Please follow the steps in the [http://opendigitalradio.github.io/mmbtools-doc/mmbtools.pdf guide] to get up and running.
 +
 
 +
 
 +
===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/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. The [https://github.com/Opendigitalradio/ODR-DabMux/blob/master/doc/advanced.mux advanced.mux] presents more options.
 +
 
 +
To run odr-dabmux with a configuration file, run
 +
odr-dabmux my_config.mux
 +
 
 +
==Information from the ODR Archives==
 +
 
 +
Documentation and descriptions on CRC-DabMux can be found on http://mmbtools.crc.ca/content/view/39/65/
 +
 
 +
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.
  
Here's a workaround detail, on line 267 from fec.h:
 
Replace
 
__asm__ __volatile__ ("test %1,%1;setpo %0" : "=g"(x) : "r" (x));
 
by
 
__asm__ __volatile__ ("test %1,%1;setpo %0" : "=q"(x) : "q" (x));
 
  
 
===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 44: Line 60:
 
       ReleaseSemaphore(data->semBuffer, 1, NULL);
 
       ReleaseSemaphore(data->semBuffer, 1, NULL);
 
   #else
 
   #else
 
===CRC-DabMux Man page===
 
 
NAME
 
  CRC-DabMux - A software DAB multiplexer
 
 
SYNOPSYS
 
  CRC-DabMux [ensemble] [subchannel1 subchannel2 ...] [service1 component1 [component2 ...] service2 ...] [output1 ...] [-h] [-m mode] [-n nbFrames] [-o] [-V] [-z]
 
 
  Where ensemble = [-i ensembleId] [-L label] [-l sLabel]
 
 
  Where subchannel = -(A | B | D | E | F | M | P | T) inputName [-b bitrate] [-i subchannelId] [-k] [-p protection]
 
 
  Where service = -S [-g language] [-i serviceId] [-L label] [-l sLabel] [-y PTy]
 
 
  Where component = -C [-a address] [-d] [-f figType] [-i subchannelId] [-L label] [-l sLabel] [-t type]
 
 
DESCRIPTION
 
  CRC-DabMux  is  a  software  multiplexer  that generates an ETI stream from
 
  audio and data streams. Because of  its  software  based  architecture,
 
  many  typical DAB services can be generated and multiplexed on a single
 
  PC platform with live or pre-recorded sources.
 
 
  A DAB multiplex configuration is composed of one ensemble. An  ensemble
 
  is  the entity that receivers tune to and process. An ensemble contains
 
  several services. A service is  the  listener-selectable  output.  Each
 
  service  contains  one mandatory service component which is called pri-
 
  mary component. An audio primary component  define  a  program  service
 
  while  a data primary component define a data service. Service can con-
 
  tain additional components which are called secondary components. Maxi-
 
  mum  total  number  of components is 12 for program services and 11 for
 
  data services. A service component is a link to one subchannel (of Fast
 
  Information  Data  Channel).  A  subchannel  is the physical space used
 
  within the common interleaved frame.
 
 
  __________________________________________________
 
  |                  CRC-Ensemble                  |  ENSEMBLE
 
  |__________________________________________________|
 
          |                |                |
 
          |                |                |
 
  _______V______    _______V______    _______V______
 
  | CRC-Service1 |  | CRC-Service2 |  | CRC-Service3 |  SERVICES
 
  |______________|  |______________|  |______________|
 
    |        |        |        | |______        |
 
    |        |        |        |        |        |
 
  __V__    __V__    __V__    __V__    __V__    __V__
 
  | SC1 |  | SC2 |  | SC3 |  | SC4 |  | SC5 |  | SC6 |  SERVICE
 
  |_____|  |_____|  |_____|  |_____|  |_____|  |_____|  COMPONENTS
 
    |        |  _____|        |        |    ____|
 
    |        |  |              |        |  |
 
  __V________V__V______________V________V___V_______  COMMON
 
  | SubCh1 | SubCh9 |  ...  | SubCh3 | SubCh60 | ... |  INTERLEAVED
 
  |________|________|_______|________|_________|_____|  FRAME
 
  Figure 1: An example of a DAB multiplex configuration
 
 
GENERAL OPTIONS
 
  -h                  : get this help
 
  -m                  : DAB mode (default: 2)
 
  -n nbFrames          : number of frames to produce
 
  -o                  : turn on TCP log on port 12222
 
  -V                  : print version information and exit
 
  -z                  : write SCCA field for Factum ETI analyzer
 
 
INPUT OPTIONS
 
  -A                  : set audio service
 
  -A                  : set CRC-Bridge data service
 
  -D                  : set data service
 
  -E                  : set enhanced packet service
 
  -F                  : set DAB+ service
 
  -M                  : set DMB service
 
  -P                  : set packet service
 
  -T                  : set test service
 
  inputName<n>        : name of file for audio and packet service and Udp input address for data service ([address]:port)
 
  -a                  : packet address (default: 0x200 (512))
 
  -b bitrate<n>        : bitrate (in kbits/s) of the subchannel (default: audio 1st frame, data 384, packet 32)
 
  -d                  : turn on datagroups in packet mode
 
  -f figType          : user application type in FIG 0/13 for packet mode
 
  -g language          : Primary service component language: english=9, french=15
 
  -i id<n>            : service|subchannel|serviceComponent id <n> (default: <n>)
 
  -k                  : set non-blocking file input (audio and packet only)
 
  -L label<n>          : label of service <n> (default: CRC-Audio<n>)
 
  -l sLabel<n>        : short label flag of service <n> (default: 0xf040)
 
  -p protection<n>    : protection level (default: 3)
 
  -t type              : audio/data service component type (default: 0)
 
                        audio: foreground=0, background=1, multi-channel=2
 
                        data: unspecified=0, TMC=1, EWS=2, ITTS=3, paging=4, TDC=5, IP=59, MOT=60, proprietary=61
 
  -y PTy              : Primary service component program type international code
 
 
OUTPUT OPTIONS
 
  -O output            : name of the output in format scheme://[address][:port][/name]
 
                        where scheme is (raw|udp|tcp|file|fifo|simul)
 
  
  
 +
See the manpage for more info:
 
*[[CRC-DabMux man page]]
 
*[[CRC-DabMux man page]]

Latest revision as of 09:27, 23 April 2019

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 as git tags. The git master branch always points to the latest release, the next branch is where development happens.

The main communication channel is the CRC-mmbTools Google Group mailing list



Build information for ODR-DabMux

Install the required dependencies according to the information in INSTALL.md file.

Each time you update from the git repository (either git checkout or git pull) you should do

./bootstrap.sh

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


Usage

Please follow the steps in the guide to get up and running.


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. The advanced.mux presents more options.

To run odr-dabmux with a configuration file, run

odr-dabmux my_config.mux

Information from the ODR Archives

Documentation and descriptions on CRC-DabMux 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.


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: