Multiplex
A certain way to arrage several byte streams in one, by interleaving them.
For audio/video, the byte order is made to roughly match the time order,
so that an app can continuously read the PS (or TS) and get
both video and audio for a certain time point in the stream.
(The /exact/ matching of video and audio happens via sync and clock, not byte order.)
Both PS and TS are multiplexes, but different ones.

TS = Transport Stream
How MPEG data goes over the airwaves. Small packages with error correction.
It contains one or several programs (each with several ES),
plus metadata and management data (e.g. PSI).
<http://en.wikipedia.org/wiki/MPEG_transport_stream>

PS = Program Stream
How MPEG files are stored on disk. Long chunks, no error correction.
Contains exactly one program (one movie, one channel etc.).
Contains one or more ES (elementary streams): one for video, one or more for audio etc..

ES = Elementary Stream
One video or audio or subtitle etc. stream - only one of them.
This is the actual data, encoded in a certain codec.
E.g. an MP3 stream would be an audio stream, and a H.264 stream a video stream.
Each ES has its own PID

Codec = Coder/Decoder
A defined way to express video, audio etc. data in a bitstream.
Often with compression, e.g. MP3 is one audio codec of MPEG. 

PID
A numeric ID for an ES or PSI stream within a PS or TS.
DVB cards usually allow to filter for one or more PIDs, and de- and re-multiplex
a bigger stream so that only the requested streams (identified per PIDs) are in the
returned stream.



PSI = Program Specific Information
Just a generic name for NIT, PAT, PMT, CAT etc.
It is part of the management data contained in a TS.
<http://en.wikipedia.org/wiki/Program_Specific_Information>

PAT = Program Association Table
informs about the program (= channel, service) on the current transponder.
It contains the service IDs and PMT PIDs for all programs
on the current transponder.
The PAT is a special service (PID 0x0) on each transponder.

PMT = Program Map Table
describes one program (= channel, service). There is one PMT per program.
It contains the PIDs for all streams belonging to the program and their purpose
(video, audio inkl. language, CA streams etc.).

NIT = Network Information Table
contains information about all transponders on the same system (satellite etc.),
particularly tuning information like frequencies, symbol rate, bandwidth etc..
The NIT is a special service (PID 0x10) on all transponders.

The format of all the PSI types is a bit TLV-like (Tag, Length, Value).
First, there's a tag, a byte which tells the type of the following data.
Then, there may be fixed-length fields defined by the spec (that's noit TLV-like).
There may be a two bytes (only the lower 12 bits used) length field which tells
how many bytes the following data is long.
The format of the following data is determined by the tag. You have to know the
tag and data format to read the data. If you don't know the tag, you can (and have to)
just skip the data (|length| bytes).



PID values
0        Program association table (PAT)
1        Conditional access table (CAT)
2 to F   Reserved
10       Network information table (NIT)
11       Service description table (SDT)
         Bouquet information table (BAT), Stuffing table (ST)
12       Event information table (EIT), Stuffing table (ST)
13       Running status table (RST), Stuffing table (ST)
14       Time/date table (TDT),
         Time offset table (TOT), Stuffing table (ST)
15 to 1F Reserved for future use
20-1FFE  Video/audio/private data, assigned by PMT
1FFF     NULL packets

Table IDs
   0x00   Program association table (PAT)
   0x01   Conditional access table (CAT)
   0x02   Program Map Table (PMT)
   0x03   TS Description section
   0x04   ISO_IEC_14496_scene_description_section
   0x05   ISO_IEC_14496_object_descriptor_section
0x06-0x37 ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved
0x38-0x3F Defined in ISO/IEC 13818-6
0x40-0xFE User private
  0xFF    forbidden

Stream type assignments (tags in PMT)
  0x00    ITU-T | ISO/IEC Reserved
  0x01    ISO/IEC 11172 Video
  0x02    ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream
  0x03    ISO/IEC 11172 Audio
  0x04    ISO/IEC 13818-3 Audio
  0x05    ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections
  0x06    ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data
  0x07    ISO/IEC 13522 MHEG
  0x08    ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC
  0x09    ITU-T Rec. H.222.1
  0x0A    ISO/IEC 13818-6 type A
  0x0B    ISO/IEC 13818-6 type B
  0x0C    ISO/IEC 13818-6 type C
  0x0D    ISO/IEC 13818-6 type D
  0x0E    ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary
  0x0F    ISO/IEC 13818-7 Audio with ADTS transport syntax
  0x10    ISO/IEC 14496-2 Visual
  0x11    ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1
  0x12    ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets
  0x13    ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections.
  0x14    ISO/IEC 13818-6 Synchronized Download Protocol
0x15-0x7F ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved
0x80-0xFF User Private


Descriptors: Program and program element (per MPEG2)
descriptor_tag TS    PS     Identification
       0       n/a   n/a    Reserved
       1       n/a   n/a    Reserved
       2       X      X     video
       3       X      X     audio_stream
       4       X      X     hierarchy
       5       X      X     registration
       6       X      X     data_stream_alignment
       7       X      X     target_background_grid
       8       X      X     Video_window
       9       X      X     CA
      10       X      X     ISO_639_language
      11       X      X     System_clock
      12       X      X     Multiplex_buffer_utilization
      13       X      X     Copyright
      14       X            Maximum_bitrate
      15       X      X     Private_data_indicator
      16       X      X     Smoothing_buffer
      17       X            STD
      18       X      X     IBP
    19-26      X            Defined in ISO/IEC 13818-6
      27       X      X     MPEG-4_video
      28       X      X     MPEG-4_audio
      29       X      X     IOD
      30       X            SL
      31       X      X     FMC
      32       X      X     External_ES_ID
      33       X      X     MuxCode
      34       X      X     FmxBufferSize
      35       X            MultiplexBuffer
    36-63      n/a   n/a    ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved
   64-255      n/a   n/a    User Private


Descriptors and their locations (per DVB-SI)
         Descriptor            Tag value    NIT    BAT     SDT    EIT TOT PMT     SIT *1
network_name                      0x40       *      -       -      -   -   -        -
service_list                      0x41       *      *       -      -   -   -        -
stuffing                          0x42       *      *       *      *   -   -        *
satellite_delivery_system         0x43       *      -       -      -   -   -        -
cable_delivery_system             0x44       *      -       -      -   -   -        -
VBI_data                          0x45       -      -       -      -   -   *        -
VBI_teletext                      0x46       -      -       -      -   -   *        -
bouquet_name                      0x47       -      *       *      -   -   -        *
service                           0x48       -      -       *      -   -   -        *
country_availability              0x49       -      *       *      -   -   -        *
linkage                           0x4A       *      *       *      *   -   -        *
NVOD_reference                    0x4B       -      -       *      -   -   -        *
time_shifted_service              0x4C       -      -       *      -   -   -        *
short_event                       0x4D       -      -       -      *   -   -        *
extended_event                    0x4E       -      -       -      *   -   -        *
time_shifted_event                0x4F       -      -       -      *   -   -        *
component                         0x50       -      -       *      *   -   -        *
mosaic                            0x51       -      -       *      -   -   *        *
stream_identifier                 0x52       -      -       -      -   -   *        -
CA_identifier                     0x53       -      *       *      *   -   -        *
content                           0x54       -      -       -      *   -   -        *
parental_rating                   0x55       -      -       -      *   -   -        *
teletext                          0x56       -      -       -      -   -   *        -
telephone                         0x57       -      -       *      *   -   -        *
local_time_offset                 0x58       -      -       -      -   *   -        -
subtitling                        0x59       -      -       -      -   -   *        -
terrestrial_delivery_system       0x5A       *      -       -      -   -   -        -
multilingual_network_name         0x5B       *      -       -      -   -   -        -
multilingual_bouquet_name         0x5C       -      *       -      -   -   -        -
multilingual_service_name         0x5D       -      -       *      -   -   -        *
         Descriptor            Tag value    NIT    BAT      SDT    EIT     TOT PMT     SIT *1
multilingual_component            0x5E       -      -        -      *        -  -          *
private_data_specifier            0x5F       *      *        *      *        -  *          *
service_move                      0x60       -      -        -      -        -  *          -
short_smoothing_buffer            0x61       -      -        -      *        -  -          *
frequency_list                    0x62       *      -        -      -        -  -          -
partial_transport_stream *1       0x63       -      -        -      -        -  -          *
data_broadcast                    0x64       -      -        *      *        -  -          *
scrambling                        0x65       -      -        -      -        -  *          -
data_broadcast_id                 0x66       -      -        -      -        -  *          -
transport_stream *2               0x67       -      -        -      -        -  -          -
DSNG *2                           0x68       -      -        -      -        -  -          -
PDC                               0x69       -      -        -      *        -  -          -
AC-3 (see annex D)                0x6A       -      -        -      -        -  *          -
ancillary_data                    0x6B       -      -        -      -        -  *          -
cell_list                         0x6C       *      -        -      -        -  -          -
cell_frequency_link               0x6D       *      -        -      -        -  -          -
announcement_support              0x6E       -      -        *      -        -  -          -
application_signalling            0x6F       -      -        -      -        -  *          -
adaptation_field_data             0x70       -      -        -      -        -  *          -
service_identifier (see [17])     0x71       -      -        *      -        -  -          -
service_availability              0x72       -      -        *      -        -  -          -
default_authority                 0x73       *      *        *      -        -  -          -
related_content                   0x74       -      -        -      -        -  *          -
         Descriptor            Tag value    NIT    BAT      SDT    EIT     TOT PMT      SIT *1
TVA_id                            0x75       -      -        -      *        -  -          -
content_identifier                0x76       -      -        -      *        -  -          -
time_slice_fec_identifier         0x77       *      -        -      -        -  -          -
ECM_repetition_rate               0x78       -      -        -      -        -  *          -
S2_satellite_delivery_system      0x79       *      -        -      -        -  -          -
enhanced_AC-3 (see annex D)       0x7A       -      -        -      -        -  *          -
DTS (see annex G)                 0x7B       -      -        -      -        -  *          -
AAC (see annex H)                 0x7C       -      -        -      -        -  *          -
XAIT location (see [46])          0x7D       *      *        *      *        *  *          *
FTA_content_management            0x7E       *      -        *      *        -  -          -
extension                         0x7F       *      *        *      *        *  *          *
user defined                      0x80 to 0xFE
forbidden                         0xFF
*1: Only found in Partial Transport Streams
*2: Only in the TSDT (Transport Streams Description Table).
*3: May also be located in the CAT (ISO/IEC 13818-1 [20]) and INT (TS 102 006 [13]).
*4: * Possible location.


<irc lang="de">
die programmdaten bei DVB werden auf demselben transponder übertragen (d.h. dieselbe frequenz).
der transponder liefert erstmal nur nen "transport stream" (= MPEG2 TS)
da drin sind metadaten, wie welche sender drauf liegen, welche "service id" die haben, und welche "PIDs" zu jeder service ID gehören.
die PIDs sind die IDs für die video und audio-datenströme. die sind auch im selben TS
die TV-karte filtert die dann raus, nachdem mythtv ihr gesagt hat, weclhe PIDs es will.
zwischen all dem sind auch noch andere datenströme (=streams), u.a. "EIT". Das EIT sind die programmdaten, die du haben willst.
es gibt 2 EIT-tabellen: current/next und für die weitere zukunft.
beide sind IIRC optional. es kann also durchaus sender geben, wo das fehlt.
wie anykey__ schon sagte, ist es rein theoretisch auch möglich, das programm für *alle* sender auf einem speziellen transponder/frequenz/TS zu senden. das kann auch wieder im EIT-format sein, oder in nem anderen.
die meisten sender liefern aber das EIT im selben TS.
</irc>


Resources:
- MPEG2 TS/PS, ISO 13818-1
  <http://neuron2.net/library/mpeg2/iso13818-1.pdf>, Page 41-50
- DVB-SI, SDT, NIT, EIT, ETSI EN 300 468
  <http://users.jyu.fi/~mweber/leffakone/docs/DVB_SI-new.pdf>
