aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/advanced.mux127
-rw-r--r--doc/example.mux118
-rwxr-xr-xdoc/show_dabmux_stats.py16
3 files changed, 153 insertions, 108 deletions
diff --git a/doc/advanced.mux b/doc/advanced.mux
index fb67b82..fba94ad 100644
--- a/doc/advanced.mux
+++ b/doc/advanced.mux
@@ -162,9 +162,6 @@ services {
subchannels {
sub-fu {
type audio
- ; example file input
- inputfile "funk.mp2"
- nonblock false
bitrate 128
id 10
@@ -181,29 +178,36 @@ subchannels {
; on the protection profile:
; UEP profile: 1 to 5; EEP profiles: 1 to 4
protection 4
+
+ ; example file input
+ inputproto file
+ inputuri "funk.mp2"
+ nonblock false
}
sub-lu {
type dabplus
+ bitrate 96
+ id 3
+ protection 3
; EXPERIMENTAL!
; Receive STI-D(LI) carried in STI(PI, X) inside RTP using UDP.
; This is intended to be compatible with AVT audio encoders.
; EXPERIMENTAL!
- inputfile "sti-rtp://127.0.0.1:32010"
- bitrate 96
- id 3
- protection 3
+ inputproto sti
+ inputuri "rtp://127.0.0.1:32010"
}
sub-ri {
type dabplus
- ; example file input
- ;inputfile "rick.dabp"
- ; example zmq input:
- ; Accepts connections to port 9000 from any interface.
- ; Use ODR-AudioEnc as encoder
- inputfile "tcp://*:9000"
bitrate 96
id 1
protection 1
+ ; example file input
+ ;inputuri "rick.dabp"
+
+ ; example zmq input:
+ ; Accepts connections to port 9000 from any interface.
+ inputproto zmq
+ inputuri "tcp://*:9000"
; ZMQ specific options, mandatory:
@@ -251,38 +255,23 @@ subchannels {
; key pairs can be generated using the zmqinput-keygen tool.
}
- sub-ri2 {
- type audio
- ; for audio types, you can use the ZeroMQ input (if compiled in)
- ; with the following configuration in combination with
- ; Toolame-DAB
- inputfile "tcp://*:9001"
- bitrate 96
- id 1
- protection 1
-
- ; The options are the same as for dabplus
- zmq-buffer 40
- zmq-prebuffering 20
- }
-
; 'prbs' will generate a pseudorandom bit sequence according to
; ETS 300 799 Clause G.2.1. This is useful for testing purposes and
; measurement of bit error rate.
sub-prbs {
type data
+ bitrate 16
+ id 5
+ protection 3
; Use the default PRBS polynomial.
- inputfile "prbs://"
+ inputproto prbs
+ inputuri "prbs://"
; To use another polynomial, set it in the url as hexadecimal
; The default polynomial is G(x) = x^20 + x^17 + 1, represented as
; (1 << 20) + (1 << 17) + (1 << 0) = 0x120001
;inputuri "prbs://:0x120001
-
- bitrate 16
- id 5
- protection 3
}
}
@@ -348,25 +337,10 @@ components {
}
}
-; A list of outputs, in the format
-; unique-id "uri"
outputs {
; The unique-id can be used by the remote control or the statistics server
; to identify the output
- ;supported output types for file and fifo outputs are
- ; raw, framed and streamed
- ;
- ; Please see doc/dab_output_formats.txt
- stdout "fifo:///dev/stdout?type=raw"
-
- ; Legacy format for ZeroMQ output example. See example.mux
- ; for newer format.
- ;zmq "zmq+tcp://*:9100"
-
- ; Throttle output to real-time (one ETI frame every 24ms)
- ;throttle "simul://"
-
; Important! For real-time operation, you need to have exactly one
; output that applies back-pressure to ODR-DabMux, otherwise it will run
; at the highest possible rate on your system!
@@ -376,10 +350,16 @@ outputs {
;
; If you use the zmq or EDI outputs, you must also enable a simul:// output!
- ; The edi output has a different syntax
+ ;supported output types for file and fifo outputs are
+ ; raw, framed and streamed
+ ;
+ ; Please see doc/dab_output_formats.txt
+ ;stdout "fifo:///dev/stdout?type=raw"
+
+ ; Throttle output to real-time (one ETI frame every 24ms)
+ throttle "simul://"
+
edi {
- ; EDI uses the UDP protocol. This implementation of EDI does not support
- ; EDI Packet Resend.
; If TIST is enabled, requires leap-second information (see example.mux)
destinations {
; The names you give to the destinations have no meaning,
@@ -423,12 +403,16 @@ outputs {
; The destination port cannot be set independently for
; different outputs because it is encoded in the transport
; header of the PFT layer.
+ ; Necessary when using UDP, optional when only using TCP.
port 12000
; Enable the PFT subsystem. If false, AFPackets are sent.
- enable_pft true
+ ; PFT is not necessary when using TCP.
+ enable_pft false
- ; How many lost fragments can be recovered by Reed-Solomon
+ ; How many lost fragments can be recovered by Reed-Solomon.
+ ; Requires enable_pft true.
+ ;
; If set to 0, the PFT subsystem will only do Fragmentation and
; Transport, but no Reed Solomon.
; See ETSI TS 102 821, Clause 7 "PFT Layer", Figure 10. ODR-DabMux
@@ -443,11 +427,11 @@ outputs {
; to nearest multiple of 24ms. Set to 0 to disable the interleaver.
interleave 0
- ; Length of a RS chunk, can be overriden
+ ; Length of a RS chunk, can be overridden
;default=207
;chunk_len 207
- ; Save the packets sent over ethernet to the file ./edi.debug
+ ; Save the packets sent over Ethernet to the file ./edi.debug
dump false
; show more debugging info
@@ -461,8 +445,36 @@ outputs {
}
; Other outputs:
- ; TCP listen on port
- ;net "tcp://host:port"
+
+ ; ZeroMQ output example, new configuration format. Several
+ ; zeromq blocks can be added here.
+ ; This output does not back-pressure the multiplexer.
+ ;zeromq {
+ ; Listen on all interfaces, on port 9100
+ ;endpoint "tcp://*:9100"
+
+ ; Transmit backward compatible metadata containing
+ ; EDI time and UTC offset when TIST is enabled.
+ ;
+ ; If TIST is enabled, requires leap-second information (see example.mux)
+ ;
+ ; WARNING! requires ODR-DabMux to be compiled with
+ ; cURL support, and this will enable leap second download
+ ; as for the EDI output!
+ ;allowmetadata true
+ ;}
+
+ ; Legacy format for ZeroMQ output example. See example.mux
+ ; for newer format.
+ ;zmq "zmq+tcp://*:9100"
+
+ ; Output ETI-over-TCP. This is like piping a RAW ETI NI data stream
+ ; into a TCP socket, except that the output can handle simultaneous
+ ; connections. Not suitable for SFN use because timestamps are incomplete.
+ ; 0.0.0.0 means "listen on all interfaces"
+ ; This output does not back-pressure the multiplexer.
+ ;tcp "tcp://0.0.0.0:9200"
+
; UDP send to host:port, simple example for unicast
;net_udp "udp://host:port"
; example with source and TTL specification for multicast
@@ -477,5 +489,4 @@ outputs {
; external clock frequency in Hz.
; Example:
;farsync "raw://sync0?clocking=master&extsyncclock=10000000"
-
}
diff --git a/doc/example.mux b/doc/example.mux
index 6c2bc18..cf02467 100644
--- a/doc/example.mux
+++ b/doc/example.mux
@@ -5,7 +5,7 @@
;
; It contains two services, one DAB and one DAB+, and also shows
; both the file input useful for offline processing, and the
-; ZeroMQ input useful in a 24/7 scenario.
+; EDI input useful in a 24/7 scenario.
; More information about the usage of the tools is available
; in the guide, which can be found on the
@@ -65,6 +65,12 @@ general {
; If the port is zero, or the line commented, the server
; is not started.
managementport 12720
+
+ ; At startup, run the command and abort if is it not returning 0.
+ ; This may be a script. Useful for checking if the NTP client on your
+ ; system has had time to setup the clock.
+ ;startupcheck "chronyc waitsync 10 0.01"
+ ;startupcheck "ntp-wait -fv"
}
remotecontrol {
@@ -161,40 +167,71 @@ subchannels {
sub-fu {
; This is our DAB programme, using a file input
type audio
- inputfile "funk.mp2"
bitrate 128
id 10
protection 3
+
+ inputfile "funk.mp2"
}
- sub-ri {
- ; This is our DAB+ programme, using a ZeroMQ
- type dabplus
- ; Accepts connections to port 9000 from any interface.
- ; Use ODR-AudioEnc as encoder
- inputfile "tcp://*:9000"
+ sub-bla {
+ type audio
bitrate 96
id 1
- protection 3
-
- ; ZMQ specific options, mandatory:
+ protection 1
- ; Maximum size of input buffer, in AAC frames (24ms)
- ; when this buffer size is reached, some frames will be
- ; discarded to get the size again below this value.
- ; As the present implementation discards entire AAC superframes,
- ; (5 frames = 120ms) the effect will clearly be audible.
- zmq-buffer 40
+ ; for audio and dabplus, EDI input is available. It supports TCP server and UDP
+ inputproto edi
+ ; Accepts connection to port 9001 from any interface
+ inputuri "tcp://0.0.0.0:9001"
- ; At startup or after an underrun, the buffer is filled to this
- ; amount of AAC frames before streaming starts.
- zmq-prebuffering 20
+ ; Two buffer-management types are available: prebuffering and timestamped.
+ ; prebuffering will accumulate a few frames before it starts streaming, and each
+ ; time there is a buffer underrun (similar to how the ZMQ input works)
+ ;
+ ; timestamped takes into account the TIST inside EDI and inserts the encoded
+ ; audio frame into the ETI frame with the same timestamp
+ buffer-management prebuffering
; In an ideal scenario, where the input rate exactly corresponds
; to the rate at which the frames are consumed by dabmux, you
- ; see the buffer level staying around the zmq-prebuffering value.
+ ; see the buffer level staying around the prebuffering value.
; Network latency jitter can make it temporarily go lower or higher.
; Encoder clock drift will make the buffer either slowly fill or
; empty, which will create intermittent glitches.
+
+ ; Maximum size of input buffer, in frames (24ms)
+ ; when this buffer size is reached, some frames will be
+ ; discarded to get the size again below this value.
+ buffer 40
+
+ ; At startup or after an underrun, the buffer is filled to this
+ ; amount of frames before streaming starts.
+ prebuffering 20
+ }
+ sub-ri {
+ ; This is our DAB+ programme, using a ZeroMQ input
+ type dabplus
+ bitrate 96
+ id 1
+ protection 3
+
+ ; Accepts connections to port 9000 from any interface.
+ ; Use ODR-AudioEnc as encoder, accepts only connection
+ ; from the local machine.
+ inputproto edi
+ inputuri "tcp://127.0.0.1:9000"
+
+ buffer-management timestamped
+
+ ; When using timestamped, the prebuffering is without effect.
+ ; The buffer setting however still dictates the maximum buffer size, to
+ ; avoid runaway memory usage in case of issues.
+ buffer 500
+ ; 500 * 24ms = 12 seconds
+
+ ; Specify the additional delay in milliseconds to add to the TIST. Positive values
+ ; mean the content will be inserted later.
+ tist-delay 10
}
}
@@ -223,33 +260,19 @@ outputs {
; Output RAW ETI NI to standard output
stdout "fifo:///dev/stdout?type=raw"
- ; ZeroMQ output example, new configuration format. Several
- ; zeromq blocks can be added here.
- ; This output does not back-pressure the multiplexer.
- zeromq {
- ; Listen on all interfaces, on port 9100
- endpoint "tcp://*:9100"
-
- ; Transmit backward compatible metadata containing
- ; EDI time and UTC offset when TIST is enabled.
- ;
- ; If TIST is enabled, requires leap-second information (see example.mux)
- ;
- ; WARNING! requires ODR-DabMux to be compiled with
- ; cURL support, and this will enable leap second download
- ; as for the EDI output!
- allowmetadata true
+ edi {
+ ; Example EDI-over-TCP output
+ ; If TIST is enabled, requires leap-second information
+ destinations {
+ example_tcp {
+ protocol tcp
+ listenport 13000
+ }
+ }
}
- ; Output ETI-over-TCP. This is like piping a RAW ETI NI data stream
- ; into a TCP socket, except that the output can handle simultaneous
- ; connections.
- ; 0.0.0.0 means "listen on all interfaces"
- ; This output does not back-pressure the multiplexer.
- ;tcp "tcp://0.0.0.0:9200"
-
; Throttle output to real-time (one ETI frame every 24ms)
- ;throttle "simul://"
+ throttle "simul://"
; Important! For real-time operation, you need to have exactly one
; output that applies back-pressure to ODR-DabMux, otherwise it will run
@@ -258,7 +281,8 @@ outputs {
; For an output to a pipe, the data consumer at the other end of the pipe
; will dictate the multiplexing rate to ODR-DabMux.
;
- ; If you use the zmq+tcp:// or the tcp:// output,
- ; you must also enable a simul:// output!
+ ; If you use the EDI output, you must also enable a simul:// output!
+
+ ; More options are given in doc/advanced.mux
}
diff --git a/doc/show_dabmux_stats.py b/doc/show_dabmux_stats.py
index d226208..a451ef2 100755
--- a/doc/show_dabmux_stats.py
+++ b/doc/show_dabmux_stats.py
@@ -46,7 +46,7 @@ if len(sys.argv) == 1:
data = sock.recv()
values = json.loads(data)['values']
- tmpl = "{ident:20}{maxfill:>8}{minfill:>8}{under:>8}{over:>8}{audioleft:>8}{audioright:>8}{peakleft:>8}{peakright:>8}{state:>16}"
+ tmpl = "{ident:20}{maxfill:>8}{minfill:>8}{under:>8}{over:>8}{audioleft:>8}{audioright:>8}{peakleft:>8}{peakright:>8}{state:>16}{version:>48}{uptime:>8}"
print(tmpl.format(
ident="id",
maxfill="max",
@@ -57,7 +57,9 @@ if len(sys.argv) == 1:
audioright="audio R",
peakleft="peak L",
peakright="peak R",
- state="state"))
+ state="state",
+ version="version",
+ uptime="uptime"))
for ident in values:
v = values[ident]['inputstat']
@@ -65,6 +67,12 @@ if len(sys.argv) == 1:
if 'state' not in v:
v['state'] = None
+ if 'version' not in v:
+ v['version'] = "Unknown"
+
+ if 'uptime' not in v:
+ v['uptime'] = "?"
+
print(tmpl.format(
ident=ident,
maxfill=v['max_fill'],
@@ -75,7 +83,9 @@ if len(sys.argv) == 1:
audioright=v['peak_right'],
peakleft=v['peak_left_slow'],
peakright=v['peak_right_slow'],
- state=v['state']))
+ state=v['state'],
+ version=v['version'],
+ uptime=v['uptime']))
elif len(sys.argv) == 2 and sys.argv[1] == "config":