ODR-PadEnc
The mot-encoder encodes Program Associated Data (PAD) which gets embedded into MP2/AAC audio frames. It supports the transmission of DLS texts and MOT Slideshow slides. The mot-encoder is contained in the FDK-AAC-DABplus package and was contributed by CSP [1]; further improvements were made by the OpenDigitalradio team.
It can be used with both Toolame-DAB and FDK-AAC-DABplus.
Contents |
Installation
Please see FDK-AAC-DABplus#Installation.
Usage
Please call mot-encoder without parameters to see all available options.
The communication between mot-encoder and the audio encoder is done via a FIFO. The FIFO needs to be created first by calling e.g.:
mkfifo /tmp/pad.fifo
Example 1: Transmission of DLS texts (file content encoded as UTF-8; after internal conversion, transmit encoded as EBU Complete Latin based repertoire) using 6 bytes PAD (short X-PAD):
mot-encoder -o /tmp/pad.fifo -t dls.txt -p 6
Example 2: Transmission of MOT Slideshow using 34 bytes PAD:
mot-encoder -o /tmp/pad.fifo -d ./slides -p 34
Example 3: Transmission of DLS texts (file content encoded as UTF-8; after internal conversion, transmit encoded as EBU Complete Latin based repertoire) and MOT Slideshow using 58 bytes PAD:
mot-encoder -o /tmp/pad.fifo -t dls.txt -d ./slides -p 58
Example 4: Transmission of DLS texts (file content encoded as UTF-8; transmit without conversion) using 6 bytes PAD (short X-PAD):
mot-encoder -o /tmp/pad.fifo -t dls.txt -p 6 -C
If you do offline encoding of a DAB programme, it makes sense to use -s 0
- otherwise mot-encoder waits (by default) 10 realtime seconds before transmitting the next DL or slide.
Supported services
Dynamic Label Segment (DLS)
DLS texts (according to ETSI EN 300 401, ch. 7.4.5.2) can be embedded into PAD and are read from a specific file. This file is read everytime before the text is prepared for transmission, therefore it can be replaced in the meantime to change the transmitted text. The specification limits the size of a DLS text to at most 128 bytes - depending on the selected charset these byte amount can be used to transmit up to 128 characters.
Dynamic Label Plus (also called DL Plus; according to ETSI TS 102 980) allows to annotate parts of a DLS text with certain tags and is supported since commit c1599cb. To enable DL Plus, the DLS text within DLS text file must be prepended by a parameter block which contains the desired settings (see below).
MOT Slideshow (MOT SLS)
The MOT Slideshow (according to ETSI EN 301 234 and ETSI TS 101 499) allows the transmission of slides in JPEG or PNG format. The images in a specified folder are therefore transmitted one after another, until all images have been processed and the procedure repeats. If one image does not fulfill the 50 KB file size limit, has progressive coding or is larger than the recommendation of a 320x240 px resolution, it is shrinked (while keeping the aspect ratio) before transmission and converted to JPEG to fulfill the mentioned requirements.
PAD lengths
Since commit ae63fc5, the PAD length can be set to a value between 8 and 196 bytes per frame (using Variable Size X-PAD). In addition, 6 bytes per frame (using Short X-PAD) can be used. The PAD length must be set to the same value both at mot-encoder and audio encoder command line. In the future the PAD length will have to be set at a single location only.
Note: The audio encoders do not check if a chosen PAD length leaves enough remaining space for the audio itself. So this must be considered while chosing the PAD length.
Service signalling
DLS does not need any explicit signalling.
MOT SLS must be explicitely signalled within the FIC by using the FIG 0/13 (User application information). In ODR-DabMux, since v0.7.3 the parameter figtype within the mux file is used for this - please take a look at the example mux file. Note: Some receivers will display a transmitted MOT SLS even without explicit signalling.
Communication with audio encoder
The communication of the mot-encoder with the audio encoder is currently done via a FIFO and therefore unidirectional. As this does not allow flow control, the mot-encoder cannot take advantage of the complete available PAD bandwidth. This will change in the future, when a bidirectional communication protocol is established.
Protocol
The current protocol is in use since commits 5c6b9fb (fdk-aac-dabplus) and 182d08c (toolame-dab). On mot-encoder's side, each write to the FIFO consists of (padlen + 1) bytes, divided into the following components (all widths in bytes):
+--------------+---------+-------+--------------+ | zero padding | X-PAD | F-PAD | used PAD len | +--------------+---------+-------+--------------+ | padlen | 1 | | <used PAD len> |
X-PAD and F-PAD must already be in the reversed transmission byte order. The unused part at the beginning must be filled up with zeros and is ignored by the audio encoder. The unused PAD bytes within the audio frame result in additional bytes available to audio data.
Usage of DL Plus
To enable the transmission of DL Plus, the DLS text file has to contain a parameter block at its very beginning - the plain DL text must follow after it. Thus all parameters are surrounded by a pair of opening/closing tags. Within the parameter block, comment lines begin with an "#" and are ignored. Empty lines are skipped as well.
##### parameters { ##### # nothing happens in here; this is just a comment line ##### parameters } ##### Just a label
As in the above example, the parameters block does not contain any parameters, it has the same effect as if the DLS text file contained just the plain label.
To enable DL Plus in the first place, the setting DL_PLUS=1
is used. If this line is not present, DL Plus is disabled and all further DL Plus related parameters do not affect the mot-encoder behaviour. As no tag is specified here, one DUMMY tag is used (DL Plus transmissions must consist of at least one tag).
##### parameters { ##### DL_PLUS=1 ##### parameters } ##### Just a label
To add DL Plus tags, one parameter line per tag has to be used, which contains content type, start marker and length marker - one-after-another and separated by a single space. Please note that the value of the start/length markers is specified in terms of characters - not bytes!
##### parameters { ##### DL_PLUS=1 # this tags "Michael Jackson" as ITEM.ARTIST DL_PLUS_TAG=4 5 14 # this tags "Thriller" as ITEM.TITLE DL_PLUS_TAG=1 23 7 ##### parameters } ##### Now: Michael Jackson - Thriller
Furthermore the values of the Item Toggle
and Item Running
fields can be set. If there is no value for any of these two fields set, it remains 0. According to the spec, both fields being 0 means that they are not maintained at all.
The following example makes use of all available DL Plus parameters:
##### parameters { ##### DL_PLUS=1 DL_PLUS_ITEM_TOGGLE=0 DL_PLUS_ITEM_RUNNING=1 DL_PLUS_TAG=4 5 27 DL_PLUS_TAG=1 36 31 ##### parameters } ##### Now: Global Deejays Feat. Rozalla - Everbody's Free (2009 Radio Mix)
Known receiver issues
Many older receivers only support the EBU Complete Latin based repertoire (charset 0). This is the motivation for the character set conversion from UTF-8, a modern and universal encoding, towards this widely supported character set.
In case other conversions are needed, please get in touch with the developers on the mailing list.
Brand | Model | Firmware version | Description |
---|---|---|---|
SANGEAN | DPR-17 | DPR17-vp02D-EU5V | DL: texts having exactly 128 bytes are not displayed |