Você está na página 1de 1

MPEG-2 Transport Stream

ISO/IEC 13818-1 International Standard


ISO/IEC 13818-1 transport packet
Syntax
t r a n s p o r t _ p a c k et ( ) { sync_byte t r a n s p o r t _ e r r o r _ i n d i c at o r p a y l o a d _ u n i t _ s t a r t _ i n d i c at o r transport_priority PID transport_scrambling_control a d ap t at i o n _ f i e l d _ c o n t r o l continuity_counter i f ( a d ap t a t io n_ fi el d_ co ntr ol= = 10 | | ada p t at i o n _ f i e l d _ c o n t r o l = = 1 1 ) { a d ap t at i o n _ f i e ld ( ) } i f ( a d ap t a t io n_ fi el d_ co ntr ol= = 01 | | ada p t at i o n _ f i e l d _ c o n t r o l = = 1 1 ) { fo r ( i = 0 ; i < N ; i + + ) { d at a _ b y t e } } }

Service Information (SI) in DVB S y s t e m s


ETSI EN 300 468 International Standard
P E S PACKET SYNTAX DIAGRAM
24 bits 8 bits 16 bits

No. of bits
8 1 1 1 13 2 2 4

Discontinuity Information Section (DI T)

Packet Start Code Prefix

Stream Id

PES Packet Length

Optional PES HEADER

Network Information section (NIT)


PES Packet Data Bytes

Service description section (SDT)


Syntax No. of bits
8 1 1 2 12 16 2 5 1 8 8 16 8 16 6 1 1 3 1 12 s e rv i c e _ d e s c r i p t i o n _ s e c t i o n( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length transport_stream_id r e s e rv e d version_number c u r r e n t _ n e x t _ i n d i c at o r section_number last_section_number original_network_id r e s e rv e d _ f u t u r e _ u s e f o r ( i = 0 ; i < N ; i + +) { s e rv i c e _ i d r e s e rv e d _ f u t u r e _ u s e E I T _ s c h e d u l e _ f l ag E I T _ p r e s e n t _ f o l l ow i n g _ f l ag r u n n i n g _ s t at u s free_CA_mode descriptors_loop_length for(j=0;j<N;j++){ d e s c r i p t o r( ) } } CRC_32 }

Bouquet association section (BAT)


Syntax No. of bits
8 1 1 2 12 16 2 5 1 8 8 4 12 b o u q u e t _ a s s o c i at i o n _ s e c t i o n ( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length bouquet_id r e s e rv e d version_number c u r r e n t _ n e x t _ i n d i c at o r section_number last_section number r e s e rv e d _ f u t u r e _ u s e bouquet_descriptors_length for(i=0;i<N;i++){ d e s c r i p t o r() } r e s e rv e d _ f u t u r e _ u s e transport_stream_loop_length for(i=0;i<N;i++){ transport_stream_id original_network_id r e s e rv e d _ f u t u r e _ u s e transport_descriptors_length f o r ( j = 0 ; j < N ; j + +) { d e s c r i p t or ( ) } } CRC_32 }

Syntax

No. of bits

Syntax

No. of bits
8 1 1 2 12 16 2 5 1 8 8 4 12

2 bits

2 bits

1 bit

1 bit

1 bit

1 bit

8 bits

8 bits

m * 8 bits

10

PES Scrambling Control

PES Priority

D at a Alignment Indicator

Copyright

Original or Copy

7 Flags

PES Header Data Length

Optional Fields

Stuffing Bytes (0xFF)

33 bits 33 bits

42 bits

22 bits

8 bits

7 bits

16 bits

PTS DTS

ESCR

ES Rate

DSM Trick Mode

Additional Copy Info

Previous PES CRC

PES Extension

SCRs 5EFlag

TRANSPORT STREAM SYNTAX DIAGRAM


188 bytes

Optional Fields

Transport Packet Stream


8 bits 1 bit

128 bits

8 bits

8 bits

16 bits

7 bits

Header

Payload

Header

Payload

Header

Payload

n e t w o r k _ i n f o r m at i o n _ s e c t i o n( ){ table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length network_id r e s e rv e d version_number c u r r e n t _ n e x t _ i n d i c at o r section_number last_section number r e s e rv e d _ f u t u r e _ u s e network_descriptors_length for(i=0;i<N;i++){ d e s c r i p t o r( ) } r e s e rv e d _ f u t u r e _ u s e transport_stream_loop_length for(i=0;i<N;i++){ transport_stream_id original_network_id r e s e rv e d _ f u t u r e _ u s e transport_descriptors_length for(j=0;j<N;j++){ descriptor() } } CRC_32 }

discontinuity_information_section ( ) { table_id section_syntax_indicator reserved_future_use reserved section_length transition_flag reserved_future_use }

8 1 1 2 12 1 7

Selection Information Section (SI T)


4 12 16 16 4 12

4 12 16 16 4 12

Syntax

No. of bits

32

32

32

PES Private D at a

Packet Header Field

Program Packet Sequence Counter

P-STD Buffer

PES Extension Field Length

PES Extension Field Data

1 bit

1 bit

13 bits

2 bits

2 bits

4 bits

Sync Byte

Transport Error Indicator

Payload Unit Start Indicator

Transport Priority

PID

Transport Scrambling Control

Adaptation Field Control

Continuity Counter

Adaptation Field

Program association section (PAT)


Syntax
8 bits 1 bit 1 bit 1 bit 5 bits

Event Information Section (EIT)

No. of bits
8 1 1 2 12 16 2 5 1 8 8 16 3 13 13 32

Adaptation Field Length

Discontinuity Indicator

Random Access Indicator

Elementary Stream Priority Indicator

5 Flags

Optional Fields

Stuffing Bytes

42 bits

42 bits

8 bits

8 bits

8 bits

3 bits

PCR

OPCR

Splice Countdown

Transport Private Data Length

Transport Private D at a

Adaptation Field Extenstion Length

3 Flags

Optional Fields

Conditional access section (CAT)


Syntax No. of bits 8 1 1 2 12 18 5 1 8 8 CA_section() { table_id section_syntax_indicator 0 r e s e rv e d section_length reserved version_number current_next_indicator section_number last_section number for (i=0;i< N;i++) { descriptor( ) } CRC_32 }

1 bit

15 bits

2 bits

22 bits

4 bits

33 bits

Itw_valid Flag

Itw Offset

Piecewise R at e

Splice Type

DTS_next_au

program_association_section( ) { table_id section_syntax_indicator 0 r e s e rv e d section_length transport_stream_id r e s e rv e d version_number current_next_indicator section_number last_section_number f or ( j=0 ;j< N ; j++ ) { program_number r e s e rv e d if (program_number==0 ) { network_PID } else { program_map_PID } } CRC_32 }

MPEG-2
(Defined) PID=0x0000

DVB
(Mandatory) PID=0x0010

DVB
(Optional) PID=0x0010

Syntax

No. of bits
8 1 1 2 12 16 2 5 1 8 8 16 16 8 8 16 40 24 3 1 12

PAT

NIT
Actual transport stream

NIT
Other transport stream

Network Information

PID=0x0011

BAT
PID=0x0011 PID=0x0001 PID=0x0011

Bouquet Association

PROGRAM ASSOCIATION SECTION DIAGRAM


8 bits 1 bit 1 2 bit bits 12 bits 16 bits 2 bits 5 bits 1 bit 8 bits 8 bits 32 bits

SDT
Actual transport stream

SDT
Other transport stream

Service Description

e v e n t _ i n f o r m at i o n _ s e c t i o n( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length s e rv i c e _ i d r e s e rv e d version_number c u r r e n t _ n e x t _ i n d i c at o r section_number last_section_number transport_stream_id original_network_id segment_last_section_number last_table_id f o r ( i = 0 ; i < N ; i + +) { event_id start_time d u r at i o n r u n n i n g _ s t at u s free_CA_mode descriptors_loop_length f or ( j = 0 ; j < N ; j + +) { d e s c r i p t or( ) } } CRC_32 }

selection_information_section ( ) { table_id section_syntax_indicator DVB_reserved_future_use ISO_reserved section_length DVB_reserved_future_use ISO_reserved version_number current_next_indicator section_number last_section_number DVB_reserved_for_future_use transmission_info_loop_length for(i=0;i<N;i++) { descriptor ( ) } for(i=0;i<N;i++) { service_id DVB_reserved_future_use running_status service_loop_length for(j=0;j<N;j++) { descriptor ( ) } } CRC_32 }

8 1 1 2 12 16 2 5 1 8 8 4 12

16 1 3 12

32

ETSI TR 1 0 12 9 0 -Table Timing Intervals


Table Type PID Max/Min

32

Table ID

Section Syntax Indicator

Section Length

Transport Stream ID

Version Number

Current Next Indicator

Section Number

Last Section Number

N Loop

CRC 32

32

CAT
PID=0x0002

PID=0x0012

PID=0x0012

PID=0x0012

PAT TSDT NIT actual NIT other SDT actual SDT other BAT EIT actual present-following EIT other present-following TOT TDT PMT

0x 0 0 0x 02 0x10 0x10 0x11 0x11 0x11 0x12 0x12 0x14 0x14 ALL

500 ms 10000 ms [1] 10000 / 25 ms 10000 / 25 ms 2000 / 25 ms 10000 / 25 ms 10000 / 25 ms 2000 / 25 ms [2] 10000 / 25 ms [2] 30000 / 25 ms 30000 / 25 ms 500 ms

EIT
16 bits 3 bits 13 bits 16 bits 3 bits 13 bits

EIT
Actual transport stream schedule

EIT
Other transport stream present/following

Program Number 0

Network PID

...

Program Number i

Program Map PID_i

...

Transport Stream Description Section (TSDT)


Syntax TS_Description_section( ) { table_id section_syntax_indicator 0 r e s e rv e d section_length r e s e rv e d version_number current_next_indicator section_number last_section number for (i=0;i< N;i++) { descriptor( ) } CRC_32 } No. of bits 8 1 1 2 12 18 5 1 8 8

Actual transport stream present/following

Event Information

Running status section (RST)


Syntax No. of bits
8 1 1 2 12 16 16 16 16 5 3 r u n n i n g _ s t at u s _ s e c t i on() { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length for(i=0;i<N;i++){ transport_stream_id original_network_id s e rv i c e _ i d event_id r e s e rv e d _ f u t u r e _ u s e r u n n i n g _ s t at u s } }

[1] ETSI TR 101 211, TSDT interval defined in section 4.1.9 [2] ETSI TR 101 211, Additional EIT Actual/Other Schedule intervals defined for: -DVB Satellite/Cable in section 4.4.1 -DVB Terrestrial in section 4.4.2

schedule

TSDT
Transport Stream program map section (PMT)
Syntax No. of bits TS_program_map_section( ) { table_id 8 section_syntax_indicator 1 0 1 reserved 2 section_length 12 program_number 16 reserved 2 version_number 5 current_next_indicator 1 section_number 8 last_section number 8 reserved 3 PCR_PID 13 reserved 4 program_info_length 12 for (i=0;i<N;i++) { descriptor( ) } for (i=0;i<N1;i++) { stream_type 8 reserved 3 elementary_PID 13 reserved 4 ES_info_length 12 for (j=0;j<N2;j++) { descriptor( ) } } CRC_32 32 }

PID=0x0013

Stream Type Assignments


Value Description

CONDITIONAL ACCESS SECTION DIAGRAM


8 bits 1 bit 1 2 bit bits 12 bits 18 bits 5 bits 1 bit 8 bits 8 bits 32 bits

RST
PID= 0x10 to 0x1FFE PID=0x0014 PID=0x0014

Running Status

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F - 0x7F 0x80 - 0xFF

Table ID

Section Syntax Indicator

Section Length

Version Number

Current Next Indicator

Section Number

Last Section Number

N Loop Descriptors

CRC 32

Time offset section (TOT)

PMT

TDT
Time & Date

TOT
PID=0x0010 to 0x0014

Ti m e Offset

Syntax

No. of bits
8 1 1 2 12 40 4 12

TS PROGRAM MAP SECTION DIAGRAM


8 bits 1 bit 1 2 bit bits 12 bits 16 bits 2 bits 5 bits 1 bit 8 bits 8 bits 3 bits 13 bits 4 bits

32

Table ID

Section Syntax Indicator

Section Length

Program Number

Version Number

Current Next Indicator

Section Number

Last Section Number

PCR PID

ST

Stuffing

t i m e _ o f f s e t _ s e c t i on ( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length UTC_time r e s e rv e d descriptors_loop_length for(i=0;i<N;i++){ d e s c r i p t or ( ) } CRC_32 }

32

12 bits

32 bits

Program Info Length

N Loop Descriptors

ITU-T | ISO/IEC reserv e d ISO/IEC 11172-2 V i d e o ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream ISO/IEC 11172-3 A u d i o ISO/IEC 13818-3 A u d i o ITU-T Rec. H.222.0 | ISO/IEC 13818-1 privat e _ s e c t i o n s ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES p a c k e t s containing private dat a ISO/IEC 13522 MHEG Annex A - DSM CC ITU-T Rec. H . 2 2 2 . 1 ISO/IEC 13818-6 type A ISO/IEC 13818-6 type B ISO/IEC 13818-6 type C ISO/IEC 13818-6 type D ISO/IEC 13818-1 auxiliary ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserv e d User privat e

Abbreviations
AC-3 BAT BCD bslbf CA CAT CLUT CRC DAB DIT DVB DVD EBU EIT EMM EPG ETS FEC IEC IRD ISO LSB MJD MPEG NIT NVOD PAT PDC PID PMT PSI PSTN QAM QPSK rpchof RS RST SeF SDT SI SIT SMI ST TDT TOT TPS TS uimsbf UTC VBI VPS WSS Dolby AC-3 audio coding (ITU-R Recommendation BS1196 [19]) Bouquet Association Table Binary Coded Decimal bit string, left bit first Conditional Access Conditional Access Table Color Look-Up Table Cyclic Redundancy Check Digital Audio Broadcasting Discontinuity Information Table Digital Video Broadcasting Digital Versatile Disc European Broadcasting Union Event Information Table Entitlement Management Message Electronic Programme Guide European Telecommunication Standard Forward Error Correction International Electrotechnical Commission Integrated Receiver Decoder International Organization for Standardization Least Significant Bit Modified Julian Date Moving Pictures Expert Group Network Information Table Near Video On Demand Program Association Table Programme Delivery Control Packet IDentifier Program Map Table Program Specific Information Public Switched Telephone Network Quadrature Amplitude Modulation Q u at e r n a ry Phase Shift Keying remainder polynomial coefficients, highest order first Reed-Solomon Running Status Table Scale Factor Service Description Table Service Information Selection Information Table Storage Media Interoperability Stuffing Table Time and Date Table Time Offset Table Transmission Parameter Signalling Transport Stream unsigned integer most significant bit first Universal Time, Co-ordinated Vertical Blanking Interval Video Programme System Wide Screen Signalling

N Loop

CRC_32

Private Section
8 bits 3 bits 13 bits 4 bits 12 bits

Syntax
N Loop Descriptors

No. of bits

Allocation of table_id Values


Value Description

Stream Type

Elementary PID

ES Info Length

P R I VATE SECTION DIAGRAM


8 bits 1 bit 1 bit 2 bits 12 bits

Table Id

Section Syntax Indicator

Private Indicator

Private Section Length

N Private Data Bytes

16 bits

2 bits

private_section ( ) { table_id 8 section_syntax_indicator 1 private_indicator 1 reserved 2 private_section_length 12 if(section_syntax_indicator== 0) { for(i=0; i<N; i++) { private_data_byte 8 } } else { table_id_extension 16 r e s e rv e d 2 version_number 5 current_next_indicator 1 section_number 8 last_section_number 8 for(i=0;i<private_section_length-9;i++) { private_data_byte 8 } CRC_32 } } 32

Time and date section (TDT)


Syntax No. of bits
8 1 1 2 12 40 t i m e _ d at e _ s e c t i on( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length UTC_time }

Stuffing section (ST)


Syntax No. of bits
8 1 1 2 12 8 s t u f f i n g _ s e c t i on ( ) { table_id s e c t i o n _ s y n t a x _ i n d i c at o r r e s e rv e d _ f u t u r e _ u s e r e s e rv e d section_length for(i=0;i<N;i++){ d at a _ b y t e } }

PID Allocation for DVB SI


Table PID Value

5 bits

1 bit

8 bits

8 bits

32 bits

Table Id Extension

Version Number

Current Next Indicator

Section Number

Last Section Number

N Private D at a

CRC 32

PAT C AT TSDT r e s e rv e d N I T, S T S D T, B AT, S T E I T, S T R S T, S T T D T, T O T, S T network synchronizat i o n r e s e rved for future use inband signalling measurement DIT SIT

0x0000 0x0001 0x0002 0x0003 to 0x000F 0x0010 0x0011 0x0012 0x0013 0x0014 0x0015 0x0016 to 0x001B 0x001C 0x001D 0x001E 0x001F

0x00 0x01 0x02 0x03 0x04 to 0x3F 0x40 0x41 0x42 0x43 to 0x45 0x46 0x47 to 0x49 0x4A 0x4B to 0x4D 0x4E 0x4F 0x50 to 0x5F 0x60 to 0x6F 0x70 0x71 0x72 0x73 0x74 to 0x7D 0x7E 0x7F 0x80 to 0xFE 0xFF

program_association_section conditional_access_section program_map_section transport_stream_description_section reserved network_information_section - actual_network network_information_section - other_network service_description_section - actual_transport_stream reserved for future use service_description_section - other_transport_stream reserved for future use bouquet_association_section reserved for future use event_information_section - actual_transport_stream, present/following event_information_section - other_transport_stream, present/following event_information_section - actual_transport_stream, schedule event_information_section - other_transport_stream, schedule time_date_section running_status_section stuffing_section time_offset_section reserved for future use discontinuity_information_section selection_information_section user defined reserved

www.tektronix.com

Você também pode gostar