Introduction to MPEG-2 Transport Streams

Document Sample
Introduction to MPEG-2 Transport Streams Powered By Docstoc
					        DVB Overview
    Introduction to MPEG-2 Compression
           and Transport Streams


              November 2002
              Dennis Kucera
              Tektronix, Inc.




1
    The Digtal Video Broadcasting Initiative

     DVB Project was founded in Europe in 1993 as an industry led
      consortium of 290 broadcasters,manufacturers s/w developers &
      regulatory bodies in 35 countries to adopt a standard for digital
      broadcasting that would bring more programme choice to the home
      at an affordable price and with efficient use of the frequency
      spectrum.
     The US FCC adopted the major elements of the ATSC Digital
      Television Standard (A/53) in 1996 for the nation's next generation of
      broadcast television. Similar aims to DVB but with more emphasis on
      HDTV at the outset.
     The Japanese Ministry of Posts and Telecommunications followed
      suit and launched the BS-Digital standard for satellite transmission
      as first step towards the Integrated Services Digital Broadcast (ISDB)
      network.



2
    The European DVB Project

     Set up to address:-
       Transmission Standards
       Modulation Systems
       Error Correction
       Integrated Receiver/Decoders (IRD)
       Service Information
      that were not covered by MPEG-2
     Now adopted world-wide


     See DVB V2.0 CD-ROM (www.DVB.org)



3
     What is DVB?


    DVB RF                                VHF, UHF, L-Band
    DVB IF
                                   DVB S, C, T (QPSK, QAM, COFDM)
    DVB FEC – R/S
    DVB PI                                FEC – R/S
    DVB Testing
    DVB SI                    EN 50083-9 V2 DVB SPI, ASI, SSI
    MPEG-2                  TR 101 290 Timing and Protocol Testing
    MPEG-1
                          EN 300 468 DVB Service Information (EPG)
                     ISO/IEC 13818-1,2,3 MPEG-2 Systems, Video, and Audio
                    ISO/IEC 11172-1,2,3 MPEG-1 Systems, Video, and Audio


4
     DTV Transmission Chain
    ES=Elementary Stream                   Timing                       Programme Specific
    containing                             DTS/PTS                      Information(PSI) or
    Access                                                              Service Information
    Units I,B,P                                                         (SI)
                                       Data
                                                             M              System
                                                             U               Time
                        ES                       PES                                           M
    Video Encoder                   Packetiser               L               Clock
                                                                                               O
                                                             T
                                                                            (STC)              D
                                                 PES         I
     Presentation                                                                              U
                      Data          Packetiser               P              Transport
     Units                                                                                     L
                                                             L              Stream
                                                 PES                                           A
    Audio                                                    E
            Encoder                 Packetiser                                                 T
                                                             X
                        ES                                                                     O
                                                             E
                                                  PES                                          R
                ???                 Packetiser               R
                                                                                              DVB
     MPEG Compression Layer                                                                   ATSC
                                        MPEG Systems Layer+ DVB/ATSC/ARIB                     ISDB

                13818-2 A/53 atsc     13818-1    ETS 300-468 A65 PSIP                         QPSK , OFDM
    Basic       13818-3 A/52 ac3      13818-4    ETR 290                                      QAM HM
    Standards   13818-4                          ETR154      A54                              8VSB



5
     The Standards

     The MPEG-2 video compression standard and transport mechanism are
      common to DVB, ATSC & ISDB.
     Three audio compression standards are in use namely MPEG-1&2, Dolby
      AC3 and AAC.
     There are three Service Information standards namely DVB SI, PSIP (USA)
      and ARIB SI ( Japan)


    There is no definition of quality in any of these standards.
    The key word is interoperability between the various components
      of the digital broadcast chain.




6
                                  MPEG-2 Core Standards


     ISO/IEC 13818-1 (systems)
       Transport Stream and PES syntax
       T-STD Buffer model (decoder)
       PSI definition (PAT,PMT, CAT,NIT)
       Definition of PCRs, PTS and DTS
     ISO/IEC 13818-2 (video coding)
       Uses MPEG-1 as base syntax for Sequence, GOP, Picture, Slice
        and Macro Block syntax
       Five coding Profiles and four source formats or Levels
       Coding on frame or field basis-interlace.



7
                                   MPEG-2 Core standards

     ISO/IEC 13818-3 (audio coding)
       Builds upon ISO/IEC11172-3 (MPEG-1)
       Defines extensions for Multichannel audio and lower sampling
        frequencies
       Very rare usage?

     ISO/IEC 13818-6 (DSM-CC, 1996 addition to MPEG-2))
       User-to-User functionality
       User-to-Network functionality
       Basis for Data Broadcast




8
              Base Band Standards



      EN 500083-9 Interfaces for CATV/SMATV headends and
       similar professional equipment




12
      DVB Transmission Standards
      Satellite     DVB-S
      Cable:        DVB-C
      Terrestial:   DVB-T




13
     Test Standards

      MPEG
        ISO/IEC 13818-4 (conformance) Baseband only.
      DVB
         TR101 290 Baseband and Transmission Measurement
      ATSC
        A64 Transmission Measurement and Compliance.




14
     ATSC Standards (www.ATSC.org)
      A/52 - Digital Audio Compression (AC-3) Standard
      A/53 - ATSC Digital Television Standard
      A/54 - Guide to the use of ATSC digital Tv standard.
      A/55 - Programme Guide for digital TV
      A/56 - System in formation for digital TV.
      A/57 - Program/Episode/Version Identification Standard
      A/58 - Harmonisation with DVB SI in the use of ATSC.
      A/63 - Standard for coding 25/50 Hz video.
      A/64 - Transmission measurement and compliance.
      A/65 Rev A 24 Feb00 - Program and System Information Protocol for Terrestrial
       Broadcast and Cable .
      For Terrestrial Broadcast and Cable A/65 replaces:
         A/55 - Program Guide for Digital Television
         A/56 - System Information for Digital Television
                   which remain valid for satellite.
      A/90 - Data Broadcasting
      A/91 - Implementation guidelines for data.




15
     ISDB Standards
      Satellite
        ARIB STD-B20 System
        SRIB STD-B21 Receivers
        ARIB STD-B25 CA
        ARIB STD-B10 Service Information
        ARIB STD-B24 Data Coding
      Terrestrial
        To be drafted System
        To be drafted Receivers
        Other standards as for satellite.
      Cable Draft



16
      MPEG- 2 Formats

                                                            PROFILE
     LEVEL                          simple      main         snr         spatial     high

     High Film Prod quality                     80Mbit/s                             100 Mbit/s
     1920 pixels x1152 linesx 25
                                        x       128Mb
                                                                   x         x
     1920 x 1080 x30                            RAM
     High HDTV quality                          60Mbit/s                             80Mb/s
     1440 pixels x 1152 linesx 25
                                        x       64Mb
                                                                   x                 128Mb
     1440 x1080x 30                             RAM                                  RAM
     Main B/cast quality            15Mbit/s    15Mbit/s     15Mbit/s                20Mb/s
     720 pixels x 576 lines x 25    8Mb         16Mb         32Mb
                                                                             x       32Mb
     720x480x30                     RAM         RAM          RAM                     RAM
     Low VHS quality                            14Mbit/s     4Mbit/s
     352 pixels x 280 lines x 25
                                        x       4Mb          8Mb
                                                                             x            x
     352pixels x 240 lines x30                  RAM          RAM
                                    No          B frames     B frames    B frames    B frame
                                    B frames                             4:2:0       4:2:0 or
                                    4:2:0       4:2:0        4:2:0       SNR &       4:2:2
                                    Not         Not          SNR         spatial     SNR &
                                    scaleable   scaleable    scaleable   scaleable   spatial
                                                                                     scale

17
     The 4:2:2 Profile

      Intended for professional video applications where ease
       of editing and multi generation coding /decoding of video
       are important.
      I pictures are necessary which also result in high coding
       bit rates.
      It supports both 4:2:0 and 4:2:2 formats. High profile
       could handle this bit but decoder expensive because of
       other bells and whistles in the profile.
      4:2:2 profile is compatible with the Main Profile.
      Maximum bit rate = 50 Mbit/s (300 Mb/s for HD)




18
     ATSC Formats

     ML@MP differs from MPEG in that progressive scan above 30 frames is
     allowed and input does not correspond to CCIR 601.
     Higher level formats chosen to create square pels at !6:9

            MPEG                  STANDARDISED                    ATSC COMPRESSSION FORMATS
                                   VIDEO INPUTS
      1920 X 1080 X 30       1920 X 1080   SMPTE 274             1920 X1080      16:9    60I, 30P, 24P
                                           M
      1440 X 1080 X 30       1280 X 720    SMPTE                 1280 X 720      16:9    60P, 30P, 24P
                                           S17.392
       720 X 480 X 30         720 X 483    ITU-R BT               704 X 480      4:3&    60P, 60I, 30P,24P
                                           601-4                                 16: 9
       352 X 240 X30          640 X 480    VGA                    640 X 480      4:3     60P, 60I, 30P,24P

      If a CCIR 601 input 720 x 483 input is received, only 480 of the 483 active lines are used for
      encoding. Only 704 of the 720 pixels are used for encoding. The first eight and the last eight are
      dropped.




19
      DTV Transmission Chain
     ES=Elementary Stream                   Timing                       Programme Specific
     containing                             DTS/PTS                      Information(PSI) or
     Access                                                              Service Information
     Units I,B,P                                                         (SI)
                                        Data
                                                              M              System
                                                              U               Time
                         ES                       PES                                           M
     Video Encoder                   Packetiser               L               Clock
                                                                                                O
                                                              T
                                                                             (STC)              D
                                                  PES         I
      Presentation                                                                              U
                       Data          Packetiser               P              Transport
      Units                                                                                     L
                                                              L              Stream
                                                  PES                                           A
     Audio                                                    E
             Encoder                 Packetiser                                                 T
                                                              X
                         ES                                                                     O
                                                              E
                                                   PES                                          R
                 ???                 Packetiser               R
                                                                                               DVB
      MPEG Compression Layer                                                                   ATSC
                                         MPEG Systems Layer+ DVB/ATSC/ARIB                     ISDB

                 13818-2 A/53 atsc     13818-1    ETS 300-468 A65 PSIP                         QPSK , OFDM
     Basic       13818-3 A/52 ac3      13818-4    ETR 290                                      QAM HM
     Standards   13818-4                          ETR154      A54                              8VSB



20
     Transport Stream Packets

                            188 Byte Packet

     4 Byte   Adaptation Field            Payload
     Packet     (if present)            (if present)
     Header

      Fixed length of 188 bytes
      Packets contain one type of data only i.e video,audio,
       data, programme guide information.
      May also carry timing information (PCR)
      Every 4 Byte Header Contains following fields:
        sync byte 0x47
        transport error indicator
        payload unit start indicator


25
     Transport Packets

        Transport priority
        PID
        Scrambling Control
        Adaptation field control
        Continuity Counter.
      Adaptation field used either for stuffing or for
       information. This is only stuffing method allowed for
       transport packets carrying PES packets.
      In transport packets carrying PSI information stuffing
       bytes of value 0xFF placed after the last byte of a section
       of information to the end of the packet.
      Null Packets


26
     The Packet Header




27
     Programme Guide Information
      PSI - Programme Service Information. This is defined by MPEG and
       consists of
                            PAT,PMT,CAT,NIT,TSDT

      SI - Service information. These are additional tables defined by DVB
        (eg SDT,TDT,EIT etc)
      (two categories Mandatory & optional)

      PSIP - Additional tables defined by ATSC for terrestrial and cable
       only (MGT,VCT etc)

      ARIB SI- Additional tables defined by ARIB in Japan for satellite.




28
     PSI Information-the table structure
                                                                   PID 0


                       Programme Association Table - PAT
                                                                                                                     NIT
                                                                                                     PID 16
                                                                                                                           Network
                                                          Prog 0         PID16
                                                                                                                           Information Table
                                                          Prog 1         PID 20
                                     PID20                Prog 2         PID 30


                                                                                                          PID 30




 Programme Map table        Stream     Type      PID                                         Stream      Type   PID    Programme Map
        PMT                   1        Video     19                                              1      Video   50        table PMT
                              2         Audio    33                                              2      Audio   42
                              3         Audio    29                                              3      Audio   35



             PID No.         0         20       30      19         35      33       50      42
                           PAT          Prog 1 Prog 2   Prog1   Prog2      Prog1    Prog2   Prog2      Prog 1
     Transport Packets                  PMT    PMT      Vid1    Audio2     Audio1   Vid1    Audio1     Audio2




29
     Program Clock Reference (PCR)

      What it does
        Enable the MPEG decoder to
          synchronise to the encoder.
      How it does it
        42 bit sample of the STC at the
         encoder indicates to the
         demultiplexer what the STC
         time should be at the decoder        System
         when each clock reference is         Time
         received.                            Clock
                                              (STC)
        Synchronisation errors arise if
         the PCR value generated by the
                                              PCR
         multiplexer is inaccurate or if it
         is received late because of
         network delays e.g Jitter.




30
     PCR Value

                                             PCRn =PCR base + PCR extension
                                             Tn = PCR base / 90x103 + PCR ext / 27x106


                                                = 300x PCR base / 27x106 + PCR Extension/ 27x106
                                 90x103 Hz
                    Modulo 300
                                             The PCR value displayed by Adherent
                                             represents the number of cycles of the 27Mhz
     27x 106 Hz                              clock each of duration 37nSec.
                                             i.e. clock ‘ticks’
                                 Counter
                  PCR
                  extension
                                    233


                                 PCR base




31
     PCR Tolerances



      Decoders use PCRs to generate video timing And
       sometimes colour burst . Therefore there are strict
       limits on PCR repetition rate, accuracy .
      The recommended repetition rate is between 40-
       100ms
      PCR inaccuracy must be less than +/- 500 nS




32
     Overall Timing Jitter
      Overall Jitter        =     PCR Inaccuracy +            PCR Arrival Time
                                                                   Jitter

                 Clock                              Counter
               Frequency                             error
                                                                     Variable
                       Re-multiplexing     Clock                   Network Delay
                                            drift




33
       The PLL


     PCR

           Subtractor
              Subtractor                LP Filter                     VCO       VCO




                                         Load



                                          Counter
             System Time
                                    Counter
                Clock

                      Encoder            Path Delay                   Decoder
                      Encoder STC                          Enc. STC             Dec. STC
           PCR1        0 sec             1sec              1 sec                0 sec
           PCR2        .1 sec                              1.1 sec              .1 sec
           PCR3        .2 sec           No timing Jitter   1.2 sec              .2 sec




34
     Decoder Buffer(T-STD)
        hh
                                                    Decoder
                                 Video                        Video
                                                    control   Decoder
                                 Data
                                                      via
                                 buffer
                                                    PTS/DTS
                                                              Re-order
         MPEG 2                                               buffer
         TS       System demux
                       and                STC          STC
                   extract PCR
                                        Generator



                                                    Decoder
                                 Audio
                                                    control    Audio
                                 Data
                                                      via      Decoder
                                 buffer
                                                    PTS/DTS




36
       T-STD Buffer model


                                                                                                                                 Delay

                                                                                           Access Units
             Video TS Packets                                               Elementary
                                Transport Buffer   Multiplex Buffer          Decoder                      Video Decoder
                                                                               Buffer
                                                                                                                            Decoded
                                                                                                                            Presentation Units




TS Packets


                                                                                         Access Units
                                                                      Elementary
                                Transport Buffer                       Decoder                              Decoder
                                                                         Buffer
                                                                                                                          Decoded
                                                                                                                          Presentation Units

                                                                      Elementary
                                  Transport
                                                                       Decoder                                     System data
                                  Buffer sys
                                                                      Buffer sys




37
     The need to test digital TV




      To ensure interoperability between all the components of
      the DTV broadcast chain during the development,
      deployment operation and maintenance phases.




38
     DTV in regions of the world

      DVB adopted in Europe and parts of Asia. Uses
       MPEG1&2 or Dolby AC3 audio.
      ATSC adopted in the USA and parts of Asia. Same
       principles as DVB but focused on HDTV single
       programme per RF carrier, Uses Dolby AC3 audio.
      Japanese ISDB followed on with similar aspirations
       but with HDTV and standard definition in one system.
       Uses MPEG AAC advanced audio coding (like MPEG4)




39
     Audio compression systems used
     in MPEG-2 transport streams
      MPEG-1 layers 1, 2 & 3 (Europe & DVB domain)
      layer-II used in broadcast systems
      MPEG-2 audio (5.1 channels) possible, but rarely used
      All are ‘backwards compatible’


      Dolby digital (AC3) USA ATSC and also DVB (Germany)
      5.1 channels (0.1 = low freq effects)


      AAC (Japan) ADIFF and ADTS type audio
      MPEG-4 will use AACas default standard
       (Frauhoffer labs) 8 or more channels dynamically reposition-able
       in space




40
     DVB Overview

        Testing

         VidTrans
       October 2002
       Dennis Kucera




41
       Types of Errors

                                            Priority
      Errors that prevent decodability        1
      Errors which impair decodability        2
        artifacts in the decoded picture
        intermittent decoding
      Errors that indicate a problem           3
       at the encoder or multiplexer
       but do not affect decodability




42
     Test Documents

      MPEG
       13818-4-MPEG
       Covers all layers ES to TS
      DVB
       13818-4 and
       TR101 290-DVB
             Covers Systems Layer only + RF
             Refers to 13818-1, TR101 211, ETS 300,468 and others.
      ATSC
       13818-4
       A54,A65



43
     So, what more are the broadcasters
     asking for?




            What does this mean?…..

44
     Templates- definition

      A Template profile consists of a unique combination of tests,
       defined by a user, depending on his particular custom
       monitoring needs.
      The tests forming the part of a template profile can
       encompass standard tests [TR101290] and proprietary tests.
      Each ‘template applied’ test can have maximum, minimum or
       ‘window’ parameter range associated with it.




45
     Template Profile example


        Template Profile 1
            Network ID:                    9018       (0x233A)
            Transport Stream ID: 16640     (0x4100)
        Service Ids
               4164             Monrovia News-48
                     PIDS
                     101        Video with PCR
                     102        Audio
                     105        DVB Subtitle
               4228             Widgets Interactive channel
                     PIDs
                     610        Video with PCR
                     611        Audio
                     720        DSMCC object carousel




46
     TR101 290


         Baseband measurements split into 3
          groups
            1st priority
            2nd priority
            3rd priority




47
     TR101 290 1st Priority

       No:       Indicator

       1.1       TS_sync_loss
       1.2       Sync_byte_error
       1.3       PAT_error
       1.4       Continuity_count_error
       1.5       PMT_error
       1.6       PID_error



48
     TR 101 290 2nd Priority

      No:       Indicator

      2.1       Transport_error
      2.2       CRC_error
      2.3       PCR_error
      2.4       PCR_accuracy_error
      2.5       PTS_error
      2.6       CAT_error




49
     TR 101 290 3rd Priority
       No:       Indicator

       3.1       NIT_error
       3.2       SI_repetition_error
       3.3       Buffer_error
       3.4       Unreferenced_PID_error
       3.5       SDT_error
       3.6       EIT_error
       3.7       RST_error
       3.8       TDT_error
       3.9       Empty_buffer_error
       3.10      Data_delay_error

50
      PSI - PAT, PMT tests
      For the PAT TR 101 290 specifies
        Repetition rate of PID 0 less than 0.5s
        Scrambling control set to 00 (unscrambled)
        PID 0 must contain only PAT sections

      For a PMT TR 101 290 specifies
        Repetition rate less than 0.5s
        Scrambling control set to 00 (unscrambled)




51
     PCR measurements
      TR101 290 measurements

       PCR_error
          Discontinuity of > 100 ms
          Repetition rate

       PCR_accuracy_error
          Accuracy of encoded PCR values




52
     In-Service Monitoring
      Continuous monitoring for 24 hours a day, 365 days a
       year
      Required by:
        Broadcasters
        Regulators
        Service providers




53
      In service monitoring system requirements

      Comprehensive real time monitoring
      Remote control
      Logging of faults
      Variety of interfaces
      Simplified User Interface




54
     Monitoring parameters

      TR101 290 1st, 2nd and 3rd Priority
      Bit rate
      Templates




55