<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Transport Stream Generator and Player for Digital Terrestrial Television</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gonzalo Olmedo</string-name>
          <email>gfolmedo@espe.edu.ec</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roberto Mena</string-name>
          <email>menaroberto@hotmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Freddy Acosta</string-name>
          <email>fracosta@espe.edu.ec</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nancy Paredes</string-name>
          <email>niparedes@espe.edu.ec</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electrical and Electronic Universidad de las Fuerzas Armadas ESPE</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <abstract>
        <p>- The current paper introduces software, named Celina, that integrates the three ISDB-Tb standard functional blocks: Source coding block, multiplex block and transmission coding block. Celina allows to generate the MPEG-2 Transport Stream and transmit it by controlling the modulator DekTec DTU-215 functionalities. Therefore, users can manipulate transmission parameters and can broadcast the Transport Stream previously generated through a Radio Frequency channel. The first stage of the project uses bit level operations which perform the audio and video coding. The EWBS descriptor and the ISDB-Tb program-specific information tables are generated and implemented during the multiplex block. The second stage of the project handles 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 application.</p>
      </abstract>
      <kwd-group>
        <kwd>ENCODER</kwd>
        <kwd>ISDB-TB</kwd>
        <kwd>MODULATOR</kwd>
        <kwd>TRANSPORT STREAM</kwd>
        <kwd>GRAPHIC USER INTERFACE</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>DTT (Digital Terrestrial Television) is the combination of
technological solutions that afford transmission and reception
of motion pictures, sound and data in a stream of digital
signals through a network of terrestrial repeaters. On March
26th, 2010 Ecuador adopted the Brazilian-Japanese standard
ISDB-Tb (International System Digital Broadcasting,
Terrestrial, Brazilian version) as the official standard for
digital terrestrial television. Currently, cities like Quito and
Guayaquil are broadcasting testing signals using this digital
technology.</p>
      <p>Because of features like the One-Segment service embedded
into the same bandwidth, high reliability of the fixed/mobile
reception, robustness against the multi-path effect and EWBS
(Emergency Warning Broadcast System) used for disasters
prevention makes ISDB-Tb a system with better performance
than similar standards. ISDB-Tb technical structure is
composed by three functional blocks which are: (1) Source
coding block, (2) Multiplex block, and (3) Transmission
coding block. This subsystems are shown at figure 1.</p>
      <p>Servicio  Portatil  –  One Segment
Servicio  Fijo/Movil
Codificación  de  Video   Codificación  de  Audio   Codificación  de  Datos</p>
      <p>MPEG-­‐4 HE  -­‐  AAC</p>
      <p>Codificación  de  Video</p>
      <p>H.264</p>
      <p>Codificacion
 de  Fuente  </p>
      <p>Multiplexación  (Basada  en  Sistemas  MPEG 2)
OFDM  Segmentado  QAM/DQPSK  con  Time  Interleave</p>
      <p>Interfaz  Común  (Interfaz  de  flujo  de  transporte)
Interfaz  Común  (Interfaz  de  flujo  de  transporte  en  tramas)</p>
      <p>Multiplexación
Codificación  
de  Transmisión</p>
      <p>Fig. 1 ISDB-Tb Standard Estructure
The ISDB-Tb source coding block stablishes that fixed
reception services use MPEG-4 and one-segment services uses
H.264 as the compression method. Audio compression, both
fixed and mobile, is defined by the HE-ACC method.</p>
      <p>
        In the multiplex block, like the Japanese standard, the video,
audio and data content are multiplexed in a single TS
(Transport Stream). Transport Stream is a standard container
format for transmission and storage of audio, video, and
Program and System Information Protocol (PSIP) associated to
the MPEG-2 ISO/IEC 13818-1 standard [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. There are several
professional tools in the market that generate Transport
Streams and manipulate packets. For example, Open Caster,
which is an open-source software [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], has been used to test
DTT signals and research projects thanks to the ISDB-Tb
adaptation developed by LIFIA1 at the Universidad Nacional
de la Plata [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        The transmission coding block stablishes the coding,
modulation and techniques to decrease impulsive noise,
attenuation and interference effects. This block afford to
broadcast within a robust signal the generated TS. By using a
digital signal, broadcast errors can be corrected and a best
picture quality like HD (High Definition) can be used [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
1 Research lab that offers technological transference and IT services to
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
designed to generate and control digital television signals
using DekTec2 devices. Celina was developed by the ESPETV
research group at the Universidad de la Fuerzas Armadas
ESPE. Celina is a multiplatform tool, which its current version
was developed to work over Windows Operating System.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. VIDEO AND AUDIO COMPRESSION</title>
      <p>Audio and video compression is achieved using FFMPEG3.</p>
      <p>FFMPEG is open-source software that permits to record,
encode and stream audio and video files. Furthermore, it can
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.</p>
      <p>In the GUI (Graphic User Interface) developed, the Input
tab allows to select the .mp4, .avi or .mov file that will be
encoded. Subsequently, the video and audio encoder, as well
as video resolution, aspect ratio and audio channel is selected.</p>
      <p>The Input tab is shown at the figure 2.</p>
      <p>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
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.</p>
      <p>CELINA was configured to support 1920x1080 or
1280x720 reslution with a transfer rate of 10 Mbps for
HD signals, 720x480 or 640x480 resolution with a
transfer rate of 5 Mbps for SD (Standard Definition)
2 Company that designs and manufacture PC cards, USB/IP devices and
software for the digital television professional market.</p>
      <p>
        3 http://www.ffmepg.org
signals and 320x180 or 320x240 with 300kbps for LD
(Low Definition) signals.
-acodec mp2 -ac 2 -ab 128000 -ar 48000 stablishes
MPEG2 as audio encoder, with stereo channel (1 mono,
2 estéreo) and a transfer rate of 128 kbps and 48kHz.
-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
standard requires [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>The generated file out.ts has TS packets of 188 bytes each.</p>
      <p>
        This packets contain the audio and video PES (Packetized
Elementary Stream) that are used to generate the data stream
according to the ISDB-Tb system [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>III. PSI/SI TABLES AND SERVICES GENERATION</p>
      <p>The PSI/SI (Program Specific Information / Service
Information) data permits the receiver to identify and correctly
decode the different services that make up the TS. The
temporary file out.ts has the PAT (Program Association Table)
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.</p>
      <p>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.</p>
      <p>
        The new PID values can be used to restructure the PAT,
PMT, PCR and every audio and video TS packet according to
the ABNT NBR 15603-1 specification [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>The provider name is a variable that can be entered by the
user through the Broadcaster tab, using the Broadcaster Name
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
their current analog channel.</p>
      <p>The development of the DTU-215 modulator control
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.</p>
      <p>
        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 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. As figure 5 shows,
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.
      </p>
      <p>The MPEG2-TS Multiplexer button generates a ready to
transmit TS for both standards ISDB-T and ISDB-Tb. The
temporary file out.ts stays in memory for new configurations
until a new file is loaded or the program is closed.</p>
    </sec>
    <sec id="sec-3">
      <title>IV. DEKTEC MODULATOR The DTU-215 DekTec modulator and the DTAPI (DekTec</title>
      <p>
        Application Programing Interface) are used for the
transmission coding block. DTAPI enables application
programs to access the functions of DekTec Devices at a
higher level of abstraction than would be possible using direct
device-driver calls [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The DTAPI is a collection of C++
classes, each representing a generic hardware function that
afford the use of several digital television standards as well as
other DekTec devices. Celina only uses those classes and
Java  application  and  GUI
C++  Dynamic  Link  Library
      </p>
      <p>DTAPI</p>
      <p>DTU  215  WDM  Device  Driver</p>
      <p>The Java application has 3 classes that permit to interact with
the user, validate data and communicate with the DLL
developed. Below there is a description of each class
developed.</p>
      <p>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.</p>
      <p>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.</p>
      <p>TSGen: It is the main class that contains all the GUI
objects and local methods. It uses the objects of the
previously mentioned classes. In this class the
generation of the TS is made.</p>
      <p>Java and C++ integration was made using the JNI tool. JNI
specifies the communication protocol between a Java code and
an external native code written in other language. Celina uses
JNI to connect the DLL with the Java application. This allow
users to control the DekTec device using the GUI of the Java
application.</p>
      <p>The software development that controls the modulator was
design to make the most of the DCTU-215 features. The DLL
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.</p>
      <p>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.
boolean AdjuntarTarjeta(): It permits to initialize the
connection between the PC that host Celina and the
modulator.
boolean ConectarPuerto(): It permits to begin upper
layer communication with the transmission port.
boolean LimpiarBanderas(): It resets the internal
errorcontrol flags of the DTU-215 modulator.
boolean Configuracion_Tx_TodoCapaA(boolean
flag_TMCC, int[] valores_confg): It perform the
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
the transmission of the TS with the previously
mentioned configuration. The only Java parameter send
is an indicator that afford the wrap option.
boolean PararTs(): It permits to stop the TS transmission
boolean CerrarPrograma(): It performs the logical
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.</p>
    </sec>
    <sec id="sec-4">
      <title>V. RESULTS</title>
      <p>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
then to a splitter which connects to the Agillent CXA Digital
TV Analyzer and to a TV that contains the included ISDB-Tb
decoder.</p>
      <p>Fig. 7 Test scenario for transmission and reception of the ISDB-Tb
signal</p>
      <p>The TS generated, named prueba.ts, is transmitted by the
Dektec DTU-215 modulator, through the physical channel
number 30 on the 569,143 MHz frequency. The modulation
parameters are configured, as well as the guard time,
interleaving time, encoding and mode. Figure 8 shows the
configuration of the previously mentioned parameters.</p>
      <p>Once the signal is transmitted, Figure 9 shows the Transport
Stream reception, the same that presented full synchronization
without freezes, and the channel name “TIC EC”, in channel
30.1 can be seen, as it was configured.
The Agillent analyzer verifies that the transmission signal is
indeed the center frequency mentioned above, and the
bandwidth of the channel is 6MHz as indicated by the
ISDBTb standard.
To test the emergency signal, a Japanese decoder, brand
PIXELA4, was connected. The bit of the emergency signal in
the TMCC (Transmission and Multiplexing Configuration
Control) of the modulator was activated, as shown in the
Figure 11, there is the emergency signal activation.</p>
      <p>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.</p>
      <p>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.</p>
      <p>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.</p>
      <p>4 Peripheral PC hardware and multimedia software manufacturer</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>ABNT</given-names>
            <surname>NBR</surname>
          </string-name>
          <article-title>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</article-title>
          ,
          <source>December 2007</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>[2] OpenCaster the free digital tv software, “Descarga del manual de OpenCaster”</article-title>
          .
          <source>November</source>
          <year>2011</year>
          . [Online] http://www.avalpa.com/the-key-values/15-free-software/ 33-opencaster.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3] OpenCaster para SADTV Lifia, “Manual de OpenCaster para SADTV”.
          <source>November</source>
          <year>2011</year>
          . [Online]. http://wiki.ginga.org.ar/lib/exe/fetch.php
          <article-title>?media=lifia:guia opencaster</article-title>
          .
          <source>pdf.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Televisión</given-names>
            <surname>Digital</surname>
          </string-name>
          <string-name>
            <surname>Argentina</surname>
          </string-name>
          , “
          <article-title>Ventajas Televisión Digital”</article-title>
          .
          <source>January</source>
          <year>2011</year>
          [Online] http://www.minplan.gov.ar/html/tv_digital/a.php,
          <year>2010</year>
          ,
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>ARIB</surname>
            <given-names>STANDARD</given-names>
          </string-name>
          ,
          <article-title>Service Information for Digital Broadcaster System</article-title>
          ,
          <source>ARIB SDT-B10</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L.</given-names>
            <surname>Soares</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Barbosa</surname>
          </string-name>
          ,
          <source>Programando en NCL 3</source>
          .0,
          <string-name>
            <surname>PUC-RIO</surname>
          </string-name>
          ,
          <year>2012</year>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>ANATEL</surname>
          </string-name>
          ,
          <source>ABNT NBR 15601</source>
          , Sistema de transmisión de la norma
          <source>Brasileña para Televisión Digital Terrestre</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>DekTec</given-names>
            <surname>Digital</surname>
          </string-name>
          <article-title>Video</article-title>
          . (
          <year>2011</year>
          ). DTAPI - C+
          <article-title>+ API for DekTec Devices</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Dektec</surname>
            <given-names>Digital Video.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Catálogo 2014</article-title>
          .
          <source>December</source>
          <year>2014</year>
          . [Online] http://www.dektec.com/Products/Catalogue.pdf
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>