About ES PES TS PS bitstream

Source: Internet
Author: User

1 ) ES

es--elementary Streams (Raw Stream) is a data stream that comes directly from the encoder, so the encoded video data stream (H.264,mjpeg, etc.), audio data stream (AAC), or other encoded data stream is collectively referred to. After the ES stream passes through the PES packager, it is converted into a PES package.

ES is a data stream that contains only one content, such as video only or audio only, and the PES after packaging is only one of the properties of ES, such as PES with video es only, pes with audio es only. Each ES is composed of several access units (AU) , each video au or audio au is composed of the head and coded data two project group, 1 au equivalent to encode 1 video images or 1 audio frames, it can be said that each AU is actually encoded data stream display units, This is the equivalent of 1 video images decoded or 1 audio frames sampled.

2) PES

pes--packetized Elementary Streams (grouped es), ES-formed groupings, called PEs groupings, are a data layout used to pass ES. The PES stream is a data stream formed by the processing of the ES stream through the PES packager, which completes the process of grouping, packaging, and participating in Baotou information (the first packaging of ES streams). The root unit of the PES stream is the PES package. The PES package is composed of Baotou and payload.

3) PTS, DTS

pts--presentationtime Stamp (display time logo memento sign) The implied display units are present in the system objectives (H. MJPEG, etc.).

dts--decoding Time Stamp (The decoding time identifies the memento flag) when the total bytes of the access unit are removed from the decoding buffer.

Pts/dts is played in the PES package inside the Baotou, these two parameters are to solve the audio and video synchronization display, to prevent input cache overflow or underflow of the key. Each i (keyframe), P (guess frame), B (two-way guessing frame) frames have a pts and DTS, but PTS and DTS are not the same for B frames, no need to mark B-Frame DTS, for I-frames and P-frames, the display must be stored in the video's first-order buffer, After the delay (sort from scratch) and then display, it is necessary to mark Pts and DTS separately.

4) PS

Ps--program Stream (Program stream) PS flow is composed of PS package, and a PS package is made up of several PES packages (here, ES through the two-layer package). The packet header of the PS package contains synchronization information and clock recovery information. A PS package can contain up to 16 video PES packages and 32 audio PES packages with the same 1: benchmark.

5) TS

Ts--transport Stream (Transport Stream) consists of a fixed-length TS Package (188 bytes), and the TS package is a single-head package for the PES package (where ES is also packaged in a two-layer package). The packet header information for the PES package still exists in the TS package.

The difference between ts Stream and PS flow is that the package layout of TS flow is fixed length, and the package layout of PS flow is variable length. PS Package because the length is changed, once the loss of a certain PS packet synchronization information, the receiver will enter the missing step condition, resulting in serious information loss of the transaction. While TS code stream has taken a fixed-length package layout, when the transmission error is damaged the synchronization information of a TS packet, the receiver can detect the synchronization information in the bread after the fixed position, thus resuming the synchronization and avoiding the loss of information. It is to take the TS code stream when the channel scene is worse, the transmission error is high, and the PS stream is generally taken when the signal is better and the transmission error is lower.

6) TS Single-stream, obfuscation code stream

Singularity : The root base of the TS Stream is a 188-byte TS package.

Obfuscation: TS Stream is composed of a variety of data, a TS package of data can be so video data, audio data, fill data, Psi/si table 格 data, etc. (the only PID corresponding).

Second, Foundine basic process

1) after A/D conversion, the root stream of ES roots is obtained through the process MPEG-2 compression coding. This data stream is very large and is just a i,p,b of these video frame or audio sampling information.

2) through the process PES Packager, package and insert the Pts/dts tag into the PES in each frame. It was a stream of 格, and now it's a separate situation for packets.

3) PES is packaged as a PS or TS package for storage (DVD) or transmission (DVB). Because each Lu Yin/video contains only one coded stream of data, each PES also contains only the data stream of the response.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.