The TS package consists of the following 3 parts:
Baotou: 4 bytes, synchronization, identification, error detection and encryption
Self-adapting domain: Optional
Package data: Maximum 184 bytes (no adaptive domain exists)
4 bytes |
184 bytes |
Baotou |
Self-adapting domain |
Package data |
4-byte Baotou structure:
1 bytes |
1 bits |
1 bits |
1 bits |
13 Bits |
2 bits |
2 bits |
4 bits |
Synchronization bytes |
Transmission Error Descriptor |
Load Start descriptor |
Transfer priority |
Packet recognition |
Transmission scrambling control |
Adaptive domain Control |
Continuous counter |
The self-adapting domain structure contains:
Domain Length: 1 bytes
Domain flag: 1 bytes, PCR flag is one of the important signs
Domain Information: specified by domain length
the types of package data are generally as follows:
PSI Information: Pat/pmt/cat/nit table
Video streaming
Audio streaming
Subtitle Stream
In addition to PSI information, video streaming, audio streaming, and subtitle streaming will do pes packaging.
PAT Table Structure
The Complete Pat table contains a header structure and several program structures,
Finally, a CRC check is added.
PAT Header structure (total 8 bytes)
1Byte |
1bit |
1bit |
2bit |
12bit |
2Byte |
2bit |
5bit |
1bit |
1Byte |
1Byte |
Table identification |
Segment Syntax identifiers |
Fill 0 |
Keep |
Segment length with CRC |
Transport Stream Identity |
Keep |
Version number |
Effective identification |
Segment number |
Last Paragraph number |
Pat Table Program Structure
2Byte |
3bit |
13bit |
Program number |
Keep |
Program Mapping Table PID |
PMT Table Structure
A complete PMT table contains a table header and several flow structures,
Finally, a CRC check is added.
PMT Table Flow Structure
1Byte |
3bit |
13bit |
4bit |
12bit |
Flow type |
Keep |
Basic Element PID |
Keep |
Program element length |
PMT Header structure (total 12 bytes)
1Byte |
1bit |
1bit |
2bit |
12bit |
2Byte |
2bit |
5bit |
1bit |
1Byte |
1Byte |
3bit |
13bit |
4bit |
12bit |
Table identification |
Segment Syntax identifier |
Fill 0 |
Reserved |
Segment length incl. CRC |
Number of programs |
Reserved |
Version |
Valid identity |
Segment number |
Last paragraph number |
Reserved |
PCR PID |
Keep |
Program information length |