ODR-DabMux

From Opendigitalradio
(Difference between revisions)
Jump to: navigation, search
(Patch to increase page size)
m (added link)

Revision as of 10:00, 24 February 2012

CRC-DabMux is the free open source DAB Multiplexer developed by Communication Research Center (CRC) from Canada. It is used in command line.

Contents

More information

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

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 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' ").

Pascal Charest, from CRC, has written a workaround for it that you can find on libfec section of CRC-DABMUX page.

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

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

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)


Personal tools