=Paper= {{Paper |id=Vol-1538/paper-06 |storemode=property |title=Transport Stream Generator and Player for Digital Terrestrial Television ISDB-Tb |pdfUrl=https://ceur-ws.org/Vol-1538/paper-06.pdf |volume=Vol-1538 |authors=Gonzalo Olmedo,Freddy Acosta,Nancy Paredes,Roberto Mena |dblpUrl=https://dblp.org/rec/conf/latincom/OlmedoAPM15 }} ==Transport Stream Generator and Player for Digital Terrestrial Television ISDB-Tb== https://ceur-ws.org/Vol-1538/paper-06.pdf
                                                   7th Latin American Workshop On Communications - 2015

         Transport Stream Generator and Player for Digital Terrestrial Television
                                                                      ISDB-Tb

                                          Gonzalo Olmedo, Roberto Mena, Freddy Acosta and Nancy Paredes

                                                  Department of Electrical and Electronic
                                                 Universidad de las Fuerzas Armadas ESPE
                        gfolmedo@espe.edu.ec, menaroberto@hotmail.com, fracosta@espe.edu.ec, niparedes@espe.edu.ec




                                                                                                                        Servicio	
  Portatil	
  –	
  One	
  S egment
Abstract— The current paper introduces software, named Celina,
                                                                                   Servicio	
  Fijo/Movil
that integrates the three ISDB-Tb standard functional blocks:                                                                                                                                                                    Codificacion
Source coding block, multiplex block and transmission coding                       Codificación	
  de	
  Video	
      Codificación	
  de	
  Audio	
                                       Codificación	
  de	
  Video
                                                                                                                                                                                                                                  	
  de	
  Fuente	
  
                                                                                                                                                          Codificación	
  de	
  Datos
block. Celina allows to generate the MPEG-2 Transport Stream and                          MPEG-­‐4                           HE	
  -­‐	
  AAC                                                     H.264
transmit it by controlling the modulator DekTec DTU-215
functionalities. Therefore, users can manipulate transmission
parameters and can broadcast the Transport Stream previously                                                                                                               Interfaz	
  Común	
   (Interfaz	
  de	
  flujo	
  de	
  transporte)
generated through a Radio Frequency channel.
                                                                                                                         Multiplexación	
  (Basada	
  en	
  Sistemas	
  MPEG	
  2)                                  Multiplexación
The first stage of the project uses bit level operations which perform
the audio and video coding. The EWBS descriptor and the ISDB-Tb                                                                                              Interfaz	
  Común	
   (Interfaz	
  de	
  flujo	
  de	
  transporte	
  en	
  t ramas)
program-specific information tables are generated and implemented
                                                                                                                                                                                                                         Codificación	
  
during the multiplex block. The second stage of the project handles                                                  OFDM	
  Segmentado	
  QAM/DQPSK	
  c on	
  Time	
  Interleave
                                                                                                                                                                                                                        de	
  Transmisión
a dynamic-link library, developed on C++, which utilize the most
important DTU-215 modulator features. All of this features are
embed in an easy- to-manage, scalable, Java graphic interface                                                         Fig. 1 ISDB-Tb Standard Estructure
application.
                                                                               The ISDB-Tb source coding block stablishes that fixed
Key Words— ENCODER, ISDB-TB, MODULATOR, MUX,                                   reception services use MPEG-4 and one-segment services uses
TRANSPORT STREAM, GRAPHIC USER INTERFACE.                                      H.264 as the compression method. Audio compression, both
                                                                               fixed and mobile, is defined by the HE-ACC method.
                           I. INTRODUCTION
                                                                               In the multiplex block, like the Japanese standard, the video,
   DTT (Digital Terrestrial Television) is the combination of                  audio and data content are multiplexed in a single TS
technological solutions that afford transmission and reception                 (Transport Stream). Transport Stream is a standard container
of motion pictures, sound and data in a stream of digital                      format for transmission and storage of audio, video, and
signals through a network of terrestrial repeaters. On March                   Program and System Information Protocol (PSIP) associated to
26th, 2010 Ecuador adopted the Brazilian-Japanese standard                     the MPEG-2 ISO/IEC 13818-1 standard [1]. There are several
ISDB-Tb (International System Digital Broadcasting,                            professional tools in the market that generate Transport
                                                                               Streams and manipulate packets. For example, Open Caster,
Terrestrial, Brazilian version) as the official standard for
                                                                               which is an open-source software [2], has been used to test
digital terrestrial television. Currently, cities like Quito and
                                                                               DTT signals and research projects thanks to the ISDB-Tb
Guayaquil are broadcasting testing signals using this digital
                                                                               adaptation developed by LIFIA1 at the Universidad Nacional
technology.                                                                    de la Plata [3].

   Because of features like the One-Segment service embedded
                                                                               The transmission coding block stablishes the coding,
into the same bandwidth, high reliability of the fixed/mobile
                                                                               modulation and techniques to decrease impulsive noise,
reception, robustness against the multi-path effect and EWBS                   attenuation and interference effects. This block afford to
(Emergency Warning Broadcast System) used for disasters                        broadcast within a robust signal the generated TS. By using a
prevention makes ISDB-Tb a system with better performance                      digital signal, broadcast errors can be corrected and a best
than similar standards. ISDB-Tb technical structure is                         picture quality like HD (High Definition) can be used [4].
composed by three functional blocks which are: (1) Source
coding block, (2) Multiplex block, and (3) Transmission                        1
                                                                                Research lab that offers technological transference and IT services to
coding block. This subsystems are shown at figure 1.                           national a international communities



Copyright © 2015 for the individual papers by the papers’ authors. Copying permitted for private and academic purposes. This volume is published and
copyrighted by its editors. Latin American Workshop On Communications' 2015 Arequipa, Peru Published on CEUR-WS: http://ceur-ws.org/Vol-1538/
As other commercial solutions, Celina is a new multiplexer                          signals and 320x180 or 320x240 with 300kbps for LD
designed to generate and control digital television signals                         (Low Definition) signals.
using DekTec2 devices. Celina was developed by the ESPETV                           -acodec mp2 -ac 2 -ab 128000 -ar 48000 stablishes
research group at the Universidad de la Fuerzas Armadas -                           MPEG2 as audio encoder, with stereo channel (1 mono,
ESPE. Celina is a multiplatform tool, which its current version                     2 estéreo) and a transfer rate of 128 kbps and 48kHz.
was developed to work over Windows Operating System.                                -muxrate 29.958294M -f mpegts out.ts determines that
                                                                                    a TS named out.ts is generated. This TS has a transfer
                                                                                    rate of 29,95Mps with null packets as the ISDB-T
           II. VIDEO AND AUDIO COMPRESSION                                          standard requires [4].

                                                                               The generated file out.ts has TS packets of 188 bytes each.
   Audio and video compression is achieved using FFMPEG3.
                                                                             This packets contain the audio and video PES (Packetized
FFMPEG is open-source software that permits to record,
                                                                             Elementary Stream) that are used to generate the data stream
encode and stream audio and video files. Furthermore, it can
                                                                             according to the ISDB-Tb system [4].
work over several operating systems using a command line
interface. In the current project, the Java application uses a
Runtime class and generates a .bat file for Windows in order
to execute the commands that FFPMEG requires.                                   III. PSI/SI TABLES AND SERVICES GENERATION

   In the GUI (Graphic User Interface) developed, the Input                     The PSI/SI (Program Specific Information / Service
tab allows to select the .mp4, .avi or .mov file that will be                Information) data permits the receiver to identify and correctly
encoded. Subsequently, the video and audio encoder, as well                  decode the different services that make up the TS. The
as video resolution, aspect ratio and audio channel is selected.             temporary file out.ts has the PAT (Program Association Table)
The Input tab is shown at the figure 2.                                      table that associates the included programs into the TS. Also
                                                                             contains the PMT (Program Map Table) table that links the
                                                                             video and audio elements. Additionally, the out.ts file include
                                                                             the PCR (Program Clock Reference) table that controls the
                                                                             video and audio synchronization. All this tables are related
                                                                             with their own PID (Packet Identifier), which is represented
                                                                             with a 13-bits number. The out.ts file can be played by
                                                                             specific programs like VLC. However, it does not contain the
                                                                             required ISDB-Tb format.

                                                                                In addition, Celina includes a TS analyzer that obtains the
                                                                             PIDs of audio, video and PMT from the PAT data, and it
                                                                             shows them in the GUI as decimal numbers like figure 3
                                                                             displays.
              Fig. 2 Audio and video encoding interface


  According to the selected configuration, a .bat file is
generated within the FFMPEG instructions that will create the
temporary file out.ts. A instruction generated is shown below.

#!/bin/sh
ffmpeg -i '/Users/ESPETV/Desktop/prueba.mp4' -vcodec mpeg2video -s
720x576 -r 30 -b 5000k -aspect 16:9 -acodec mp2 -ac 2 -ab 128000 -ar 48000
-muxrate 29.958294M -f mpegts out.ts

  where:
     -vcodec mpeg2video -s 720x576 -r 25 -b 5000k -aspect                           Fig. 3 PMT, audio and video PIDs from the out.ts file.
     16:9 identifies that MEPG2 is used as the video
     encoder with a 720x576 resolution, 30 frames per
     second, 5 Mbps transfer rate and 16x9 ratio aspect.
     CELINA was configured to support 1920x1080 or                              The new PID values can be used to restructure the PAT,
     1280x720 reslution with a transfer rate of 10 Mbps for                  PMT, PCR and every audio and video TS packet according to
     HD signals, 720x480 or 640x480 resolution with a                        the ABNT NBR 15603-1 specification [4].
     transfer rate of 5 Mbps for SD (Standard Definition)
                                                                               The provider name is a variable that can be entered by the
   2
      Company that designs and manufacture PC cards, USB/IP devices and      user through the Broadcaster tab, using the Broadcaster Name
software for the digital television professional market.
    3
      http://www.ffmepg.org
                                                                             option as figure 4 shows. In addition, in the same figure it can
be observed that the user has the option to include the Network     variables that are compatible with the ISDB-Tb standard and
Name, TS Name and Virtual Channel. The Virtual Channel              the DTU-215 modulator.
option is important because broadcasters can transmit on any
other frequency and maintain the same channel number as               The development of the DTU-215 modulator control
their current analog channel.                                       platform consists of two parts: a DLL (Dynamic Link Library)
                                                                    developed on C++ that uses the DTAPI functions, and a Java
                                                                    application that includes the C++ DLL, the TS generation part
                                                                    and an easy-to-use GUI. The figure 6 shows the different
                                                                    layers of abstraction used on the current project. The two
                                                                    higher layers were developed in Celina.



                                                                                            Java	
  application	
  a nd	
  GUI




                                                                                            C++	
  Dynamic	
  L ink	
  Library

                 Fig. 4 BROADCASTER Menu.

                                                                                                         DTAPI
   The EWBS tab can active the EWBS emergency system by
configuring the12-bits area code that modifies the PMT data
and includes the emergency descriptor [5]. As figure 5 shows,                             DTU	
  215	
  W DM	
  D evice	
  Driver
Celina suggests the 0x0A3D or 2621 code by default. This
code is the global area for Brazil and it is used because it was
configured in the receivers used for lab testing. The emergency
signal was configured to be activated after the first quarter of
the video has passed.

   The MPEG2-TS Multiplexer button generates a ready to
                                                                                   Fig. 6 Abstraction layers of CELINA
transmit TS for both standards ISDB-T and ISDB-Tb. The
temporary file out.ts stays in memory for new configurations
                                                                      The Java application has 3 classes that permit to interact with
until a new file is loaded or the program is closed.
                                                                    the user, validate data and communicate with the DLL
                                                                    developed. Below there is a description of each class
                                                                    developed.

                                                                           IntegraJNI: It contains the variables and methods that
                                                                           are used in the DLL. This class only declares the native
                                                                           methods in Java; the implementation is done in the C++
                                                                           DLL.
                                                                           ReproduccionVideo: It is a Runnable class that takes
                                                                           the previously configured and validated data, and used
                                                                           it to configure the transmission parameters and transmit
                                                                           the TS.
                                                                           TSGen: It is the main class that contains all the GUI
                       Fig. 5 EWBS Menu.                                   objects and local methods. It uses the objects of the
                                                                           previously mentioned classes. In this class the
                                                                           generation of the TS is made.
                IV. DEKTEC MODULATOR
                                                                      Java and C++ integration was made using the JNI tool. JNI
  The DTU-215 DekTec modulator and the DTAPI (DekTec                specifies the communication protocol between a Java code and
Application Programing Interface) are used for the                  an external native code written in other language. Celina uses
transmission coding block. DTAPI enables application                JNI to connect the DLL with the Java application. This allow
programs to access the functions of DekTec Devices at a             users to control the DekTec device using the GUI of the Java
higher level of abstraction than would be possible using direct     application.
device-driver calls [8]. The DTAPI is a collection of C++
classes, each representing a generic hardware function that          The software development that controls the modulator was
afford the use of several digital television standards as well as   design to make the most of the DCTU-215 features. The DLL
other DekTec devices. Celina only uses those classes and            has 14 methods which made the logical connection,
configuration, transmission and other functionalities that
permit to broadcast Transport Streams and Broadcast
Transport Streams. Below it is listed several of the previously
mentioned methods.

      String LeerError(): If there is any, it allows to read
      errors produced when a process has occur between the
      DTAPI and the modulator. C++ returns a String variable
      within the error message event.
                                                                    Fig. 7 Test scenario for transmission and reception of the ISDB-Tb
      boolean AdjuntarTarjeta(): It permits to initialize the
                                                                                                   signal
      connection between the PC that host Celina and the
      modulator.
      boolean ConectarPuerto(): It permits to begin upper            The TS generated, named prueba.ts, is transmitted by the
      layer communication with the transmission port.              Dektec DTU-215 modulator, through the physical channel
      boolean LimpiarBanderas(): It resets the internal error-     number 30 on the 569,143 MHz frequency. The modulation
      control flags of the DTU-215 modulator.                      parameters are configured, as well as the guard time,
      boolean           Configuracion_Tx_TodoCapaA(boolean         interleaving time, encoding and mode. Figure 8 shows the
      flag_TMCC, int[] valores_confg): It perform the              configuration of the previously mentioned parameters.
      transmission parameters configuration. It sends from
      Java to C++ an array of int variables that contain the
      required information of how the TS will be transmitted.
      The data that was sent, has a meaning according to its
      position in the array.
      boolean AbrirArchivo(String ts_path): It takes a String
      variable with the path and name of the TS and uses to
      open the file
      boolean InitTxParams(double frecuency, int size_pack,
      int nivelDbm): This method perform the configuration
      of the frequency where the TS will be transmitted, also it
      defines if the TS packets have 188 or 204 bytes in order
      to get them ready for the transmission.
      boolean ReproducirTs(int wrap): This method performs                 Fig. 8 Configuration of the transmission parameters
      the transmission of the TS with the previously
      mentioned configuration. The only Java parameter send          Once the signal is transmitted, Figure 9 shows the Transport
      is an indicator that afford the wrap option.                 Stream reception, the same that presented full synchronization
      boolean PararTs(): It permits to stop the TS transmission    without freezes, and the channel name “TIC EC”, in channel
      boolean CerrarPrograma(): It performs the logical            30.1 can be seen, as it was configured.
      disconnection, reset the flags, erase any data in the
      buffer to end the communication with the DTU-215
      modulator.
      int ValidarArchivoTS(): It permits to validate the
      selected file as a TS by checking its packet size.


                        V. RESULTS

  To carry out the tests, the scenario consist of a Dell PC Core
I5 1.7GHz with 4GB of RAM, which is connected to the USB
cable of the Dektec DTU-215 modulator. The output port of
the modulator is connected to a signal amplification device and
                                                                                    Fig. 9 Digital TV image reception
then to a splitter which connects to the Agillent CXA Digital
TV Analyzer and to a TV that contains the included ISDB-Tb         The Agillent analyzer verifies that the transmission signal is
decoder.                                                           indeed the center frequency mentioned above, and the
                                                                   bandwidth of the channel is 6MHz as indicated by the ISDB-
                                                                   Tb standard.
                                                                                             REFERENCES

                                                                     [1] ABNT NBR 15603-2, "Televisão Digital Terrestre -
                                                                         Multiplexação e serviços de informação (SI) Sintaxes e
                                                                         definições da informação básica de SI", first edition,
                                                                         December 2007
                                                                     [2] OpenCaster the free digital tv software, “Descarga del
                                                                         manual de OpenCaster”. November 2011. [Online]
       Fig. 10 Bandwidth transmission and Frequency verification         http://www.avalpa.com/the-key-values/15-free-software/
                                                                         33-opencaster.
                                                                     [3] OpenCaster para SADTV Lifia, “Manual de OpenCaster
To test the emergency signal, a Japanese decoder, brand                  para      SADTV”.        November        2011.    [Online].
PIXELA4, was connected. The bit of the emergency signal in               http://wiki.ginga.org.ar/lib/exe/fetch.php?media=lifia:guia
the TMCC (Transmission and Multiplexing Configuration                    opencaster.pdf.
Control) of the modulator was activated, as shown in the             [4] Televisión Digital Argentina, “Ventajas Televisión
Figure 11, there is the emergency signal activation.                     Digital”.          January            2011         [Online]
                                                                         http://www.minplan.gov.ar/html/tv_digital/a.php, 2010,
                                                                     [5] ARIB STANDARD, Service Information for Digital Broadcaster
                                                                         System, ARIB SDT-B10, 2008.
                                                                     [6] L. Soares, S. Barbosa, Programando en NCL 3.0, PUC-RIO,
                                                                         2012
                                                                     [7] ANATEL, ABNT NBR 15601, Sistema de transmisión de
                                                                         la norma Brasileña para Televisión Digital Terrestre,
                                                                         2007.
                                                                     [8] DekTec Digital Video. (2011). DTAPI – C++ API for
                                                                         DekTec Devices.
                                                                     [9] Dektec Digital Video. (2014). Catálogo 2014. December
                                                                         2014.                                         [Online]
                                                                         http://www.dektec.com/Products/Catalogue.pdf
               Fig. 11 Reception of the emergency signal

  Celina is a tool that allows the generation of a TS, including
the encoding and multiplexing stage. It builds the PAT, PMT,
PRC, SDT and NIT tables based on the Broadcasters’
requirements. It includes the generation of the EWBS
emergency signal, which activates audible alarms in decoders,
as well as it turns on the decoders, based on established code
in the program which must match the receiver.

  Celina allows the transmission of the previously generated
TS, considering that settings as: transmission frequency,
channel bandwidth, service distribution in hierarchical layers,
hierarchical layers modulation, etc. all comply the ISDBT-Tb
standard applicable regulations.

  Celina was designed as a training support tool. It works at
the bit level, allowing a large number of configurations
according to future requirements. For example, it increases the
number of emergency codes or modifies tables’ parameters
presented with fixed values. In future versions, Celina will
support the possibility of multiple programming, Ginga
Applications data and the generation BTS integrated with
ISDB-T and ISDB-Tb DekTec modulators.




   4
       Peripheral PC hardware and multimedia software manufacturer