TSReader XML Export Information

Updated November 23, 2004

Introduction

The -x option (or clicking the Export to XML button) tells TSReader to generate an XML file with data decoded from the stream. This XML file can then be parsed by external applications. Data exported from TSReader is all in the MPEG-TABLES section.

About Descriptors

Many of the sections exported by TSReader may contain descriptors. Many of these descriptors are decoded internally by TSReader and are used to generate the data exported into XML but for completeness all descriptors are output using the following format in a DESCRIPTOR section.

TAG The descriptor's tag number (in hex)
LENGTH Length of the descriptor (in decimal)
DATA Data from the descriptor (in hex)

Sample:

<DESCRIPTOR>
<TAG>0x0a</TAG>
<LENGTH>4</LENGTH>
<DATA>0x65 0x6e 0x67 0x00</DATA>
</DESCRIPTOR>

TSREADER Section

This section tells you about the version and edition of TSReader that generated the XML file.

VERSION The major, minor and edit version of TSReader
EDITION The edition of TSReader used to generate the XML file. Either LITE or STANDARD.

Sample:

<TSREADER>
 <VERSION>2.5.40</VERSION>
 <EDITION>STANDARD</EDITION>
</TSREADER>

TUNED-MULTIPLEX Section

This section contains the command-line parameters used to setup the tuner on the Twinhan card. This section is only written by the Twinhan version of TSReader.

TONE-ENABLED Reflects the 22KHz option used for the last tuned mux.
DISEQC-INPUT Ditto for DiSEqC input
LNB-FREQUENCY Ditto for the LNB frequency
FREQUENCY Ditto for the tuned frequency
SYMBOL-RATE Ditto for the symbol rate
POLARITY Ditto for the polarity

Sample:

<TUNED-MULTIPLEX>
 <TONE-ENABLED>0</TONE-ENABLED>
 <DISEQC-INPUT>0</DISEQC-INPUT>
 <LNB-FREQUENCY>11250</LNB-FREQUENCY>
 <FREQUENCY>12282</FREQUENCY>
 <SYMBOL-RATE>20000</SYMBOL-RATE>
 <POLARITY>0</POLARITY>
</TUNED-MULTIPLEX>

PAT Section

This section parameters dealing with the Program Association Table carried on the mux. If this section is missing, most likely you've pointed TSReader at a mux that contains data.

VERSION The version of the PAT carried on the mux.
TRANSPORT-STREAM-ID The ID of the transport stream for this mux.
SERVICE-NUMBERS The numbers of the programs carried in the mux. Detailed of each service are carried in the PMT section

Sample:

<PAT>
 <VERSION>1</VERSION>
 <TRANSPORT-STREAM-ID>5</TRANSPORT-STREAM-ID>
 <SERVICE-NUMBERS>150,152,157,159,161,382,384,412,415,418,491,702,707,709,723,725</SERVICE-NUMBERS>
</PAT>

PMTs/ELEMENTARY-STREAM Section

This section (and the CHANNEL sub-sections) are written for each program defined in the PAT.

CHANNEL One CHANNEL section exists for each channel/service defined by the PAT
SERVICE-NUMBER The service/program number of this service
LCN Only present if the channel has a Logical Channel Number defined in the NIT
PMT-PID The PID carrying the PMT for this program
PCR-PID The PID carrying the PCR for the video/audio sync
SHORT-NAME The short name of the progam defined in the SDT (or TVCT for ATSC networks)
LONG-NAME The long name of the program defined in the SDT

One or more ELEMENTARY-STREAM sections exists for each CHANNEL section. Elementary streams usually the video and audio streams that make up a channel.

INDEX The index of this ELEMENTARY-STREAM
SCRAMBLED Set to 1 if the PID carrying this elementary stream is scrambled by a conditional access system
STREAM-TYPE Type of the elementary stream - VIDEO, AUDIO, TELETEXT or a number are valid values. If a number, this is the type field from the PMT.
AUDIO-LANGUAGE If an audio stream this field may convey the lanuage of the audio track
AUDIO-TYPE The type of audio stream: AC3, DTS, MPEG or PCM.
PID The number of the PID carrying this elementary stream

Sample:

<PMTs>
 <CHANNEL>
  <SERVICE-NUMBER>150</SERVICE-NUMBER>
  <PMT-PID>32</PMT-PID>
  <PCR-PID>5666</PCR-PID>
  <SHORT-NAME>VuFr</SHORT-NAME>
  <LONG-NAME>VuFr</LONG-NAME>
  <ELEMENTARY-STREAM>
   <INDEX>1</INDEX>
   <SCRAMBLED>1</SCRAMBLED>
   <STREAM-TYPE>VIDEO</STREAM-TYPE>
   <PID>5666</PID>
  </ELEMENTARY-STREAM>
  <ELEMENTARY-STREAM>
   <INDEX>2</INDEX>
   <SCRAMBLED>1</SCRAMBLED>
   <STREAM-TYPE>AUDIO</STREAM-TYPE>
   <AUDIO-LANGUAGE>eng</AUDIO-LANGUAGE>
   <AC3-AUDIO>0</AC3-AUDIO>
   <PID>5669</PID>
  </ELEMENTARY-STREAM>
 </CHANNEL>
</PMTs>

CAT Section

This contains parameters dealing with the Conditional Access Table carried on the mux:

CAT-ENTRY Since the CAT can carry multiple entries, there is a CAT-ENTRY section for each table sent
INDEX The index of this CAT-ENTRY
NAME The decoded name of the CA system

Sample:

<CAT>
 <CAT-ENTRY>
  <INDEX>1</INDEX>
  <NAME>Nagra (Echostar version)</NAME>
 </CAT-ENTRY>
 <CAT-ENTRY>
  <INDEX>2</INDEX>
  <NAME>Nagra</NAME>
 </CAT-ENTRY>
</CAT>

NIT Section (DVB Networks only)

This section lists the multiplexes that make up a DVB network. The start of each section contains the network type and this varies the output generated.

NIT-ENTRY One NIT-ENTRY section for each transponder
INDEX The index of this NIT-ENTRY
NETWORK-ID The ID number of the network
TRANSPORT-STREAM-ID The ID of the transport stream
ORIGINAL-NETWORK-ID The ID of the original network carried in the NIT
FREQUENCY The frequency of the signal in MHz.
THIS-NETWORK-INDICATOR Set to 1 if the network entry is part of the current network.
NETWORK-NAME The name of the network defined in the NIT.
NETWORK-TYPE Type of the network: DVB-C, DVB-S, DVB-T

For DVB-C networks, the following fields will also be present:

ORBITAL-POSITION The orbital position where the mux can be found
POLARITY The polarity of the mux
MODULATION The QAM modulation scheme used
SYMBOL-RATE The symbol rate of the mux in K-symbols per second
OUTER-FEC The outer FEC system used (if any)
INNER-FEC The inner FEC system used (if any)

For DVB-S networks, the following fields will also be present:

ORBITAL-POSITION The orbital position where the mux can be found
POLARITY The polarity of the mux
MODULATION The modulation scheme used. TSReader currently decodes QPSK and 8PSK modes.
SYMBOL-RATE The symbol rate of the mux in K-symbols per second
CODE-RATE The inner-coding rate of the mux

For DVB-T networks, the following fields will also be present:

BANDWIDTH Bandwidth of the transmision - 6, 7 or 8 MHz
CONSTELATION Constelation used for the multiplex
HIERARCHY-INFORMATION Hierarchy information for SFNs
FEC-HP Code rate of the signal (or for the HP signal if hierarchical)
FEC-LP Code rate for the LP hierarchical signal (if the mux is hierarchical)
GUARD-INTERVAL Guard interval used on the mux

Sample:

<NIT>
 <NIT-ENTRY>
  <INDEX>1</INDEX>
  <NETWORK-ID>256</NETWORK-ID>
  <NETWORK-TYPE>DVB-S</NETWORK-TYPE>
  <TRANSPORT-STREAM-ID>31</TRANSPORT-STREAM-ID>
  <ORIGINAL-NETWORK-ID>256</ORIGINAL-NETWORK-ID>
  <FREQUENCY>12661.40</FREQUENCY>
  <ORBITAL-POSITION>91.0 E</ORBITAL-POSITION>
  <POLARITY>RHCP</POLARITY>
  <MODULATION>QPSK</MODULATION>
  <SYMBOL-RATE>20000</SYMBOL-RATE>
  <CODE-RATE>7/8</CODE-RATE>
  <THIS-NETWORK-INDICATOR>1</THIS-NETWORK-INDICATOR>
  <NETWORK-NAME>Bell ExpressVu 91 W</NETWORK-NAME>
 </NIT-ENTRY>
<NIT>

TVCT Section (ATSC Networks only)

This section lists the Terrestrial Virtual Channel Table used on ATSC networks. There's normally one entry in the TVCT for each program defined in the PAT.

PROGRAM The MPEG-2 PAT program number
NAME The name of the channel (from the TVCT short name)
TSID The decimal transport stream ID
NTSC-CHANNEL The NTSC channel assigned to the TSID
ATSC-CHANNEL The ATSC channel assigned to the TSID
LOCALE The location of the transmitter (decoded from the TSID)
MAJOR-CHANNEL The major channel number (normally the same as the NTSC channel number)
MINOR-CHANNEL The minor channel number
MODULATION-MODE The modulation mode used
CARRIER-FREQUENCY The frequency of the ATSC pilot tone. This field may be zero especially when repeaters are used.

<TVCT>
<CHANNEL>
<PROGRAM>2</PROGRAM>
<NAME>MPT-DT</NAME>
<TSID>1397</TSID>
<NTSC-CHANNEL>22</NTSC-CHANNEL>
<ATSC-CHANNEL>42</ATSC-CHANNEL>
<LOCALE>MD ANNAPOLIS</LOCALE>
<MAJOR-CHANNEL>22</MAJOR-CHANNEL>
<MINOR-CHANNEL>2</MINOR-CHANNEL>
<SOURCE-ID>1</SOURCE-ID>
<MODULATION>ATSC (8 VSB)</MODULATION>
<CARRIER-FREQUENCY>0</CARRIER-FREQUENCY>
 <DESCRIPTOR>
 <TAG>0xa1</TAG>
  <LENGTH>21</LENGTH>
  <DATA>0xe0 0x21 0x03 0x02 0xe0 0x21 0x00 0x00 0x00 0x81 0xe0 0x24 0x65 0x6e 0x67 0x81 0xe0 0x25 0x65 0x6e 0x67</DATA>
</DESCRIPTOR>
</CHANNEL>
</TVCT>

 

EIT/EVENT/DESCRIPTOR Sections

These section contains program guide data decoded from the stream. TSReader can decode standard DVB EIT tables and the special compressed version used by Echostar on the Dish Network DBS system as well as up to 24 hours of data from the ATSC EITn/ETT tables.

CHANNEL One CHANNEL section exists for each channel/service carried in the EIT
SERVICE-NUMBER The service (or channel number) of this channel
SHORT-NAME Short name of the channel - "CNN" for example
LONG-NAME Log name of the channel - "Cable News Network" for example
TRANSPORT-STREAM-ID The number of the transport stream that carries this channel/service

One or more EVENT sections exists for each channel. One EVENT indicates one programme that is/will be carried on this service/channel.

START-UTC-DATE The starting date in UTC (also know as GMT or Greenwich Mean Time) of the event. The format used is YYYY-MM-DD
START-UTC-TIME The starting time in UTC. Format is HH:MM:SS
START-LOCAL-DATE The local start date of the event based on the timezone set for the PC. The format used is YYYY-MM-DD
START-LOCAL-TIME The local start time. Format is HH:MM:SS
DURATION The length of the event in HH:MM:SS format
NAME The name of the event
DESCRIPTION Description of the event

Sample:

<CHANNEL>
 <SERVICE-NUMBER>161</SERVICE-NUMBER>
 <SHORT-NAME>VuF11</SHORT-NAME>
 <LONG-NAME>VuF11</LONG-NAME>
 <TRANSPORT-STREAM-ID>5</TRANSPORT-STREAM-ID>
 <EVENT>
  <START-UTC-DATE>2003-09-15</START-UTC-DATE>
  <START-UTC-TIME>20:00:00</START-UTC-TIME>
  <DURATION>02:30:00</DURATION>
  <NAME>Arrête-moi si tu peux</NAME>
  <DESCRIPTION>Leonardo DiCaprio et Tom Hanks. (2002) Inspiré de l'histoire vécue d'un jeune fraudeur qui se fait passer pour un pilote d'avion, un médecin et un avocat. Réal. par Spielberg.(26642) (Stereo)</DESCRIPTION>
  <DESCRIPTOR>
   <TAG>0x54</TAG>
   <LENGTH>2</LENGTH>
   <DATA>0xf1 0xff</DATA>
  </DESCRIPTOR>
 </EVENT>
 <EVENT>
  <START-UTC-DATE>2003-09-15</START-UTC-DATE>
  <START-UTC-TIME>22:30:00</START-UTC-TIME>
  <DURATION>02:30:00</DURATION>
  <NAME>Arrête-moi si tu peux</NAME>
  <DESCRIPTION>Leonardo DiCaprio et Tom Hanks. (2002) Inspiré de l'histoire vécue d'un jeune fraudeur qui se fait passer pour un pilote d'avion, un médecin et un avocat. Réal. par Spielberg.(26643) (Stereo)</DESCRIPTION>
  <DESCRIPTOR>
   <TAG>0x54</TAG>
   <LENGTH>2</LENGTH>
   <DATA>0xf1 0xff</DATA>
  </DESCRIPTOR>
 </EVENT>
</CHANNEL>

PID Usage Section

This section lists the active PIDs in the mux. The PID-USAGE section has a PID section for each active PID within the mux. The parameters are:

NUMBER The PID number. This is always in hex.
PERCENTAGE-OF-MUX The percentage of the mux TSReader has calculated the stream is using.
RATE-MbPS The PID's average data rate in Mbps (mega bits per second)
DESCRIPTION A description of what the PID is used for
SCRAMBLED 0 for unscrambled, 1 for scrambled
CONTINUITY-ERRORS The number of continuity errors seen on the PID since TSReader was started. If the PID has no continuity errors, this value is not written.

Sample:

<PID-USAGE>
<PID>
<NUMBER>0x0000</NUMBER>
<PERCENTAGE-OF-MUX>0.0389</PERCENTAGE-OF-MUX>
<RATE-MbPS>0.0072</RATE-MbPS>
<DESCRIPTION>MPEG-2 Program Assocation Table</DESCRIPTION>
<SCRAMBLED>0</SCRAMBLED>
</PID>
<PID>
<NUMBER>0x0010</NUMBER>
<PERCENTAGE-OF-MUX>0.0192</PERCENTAGE-OF-MUX>
<RATE-MbPS>0.0036</RATE-MbPS>
<DESCRIPTION>MPEG-2 PMT for program 1</DESCRIPTION>
<SCRAMBLED>0</SCRAMBLED>
</PID>
<PID>
<NUMBER>0x0011</NUMBER>
<PERCENTAGE-OF-MUX>15.5568</PERCENTAGE-OF-MUX>
<RATE-MbPS>2.8768</RATE-MbPS>
<DESCRIPTION>MPEG-2 Video for program 1</DESCRIPTION>
<SCRAMBLED>0</SCRAMBLED>
</PID>
</PID-USAGE>