H.264 structure of the basic stream

Source: Internet
Author: User
H.264 basic stream (Elementary
The stream, ES) structure is divided into two layers, including the video encoding layer (VCL) and network adaptation layer (NAL ). The video encoding layer is responsible for efficient video content representation, while the network adaptation layer is responsible for packaging and transmitting data in an appropriate manner as required by the network. The benefits of introducing Nal and separating it from VCL include two aspects: first, separating signal processing from network transmission. VCL and NAL can be implemented on different processing platforms; the VCL and NAL separation design eliminates the need for the gateway to reconstruct and recode VCL bit streams in different network environments.
H.264 basic streams are composed of a series of nalu (Network isolation action layer unit), different NALU data volumes are different. Draft H.264 States [2] That when a data stream is stored on the media, a start code 0x264 is added before each NALU to indicate the start and end positions of a NALU. In this mechanism, the decoder detects the starting code in the code stream as a NALU start ID. When the next starting code is detected, the current NALU ends. Each NALU unit consists of one byte NALU header (NALU
Header) and several bytes of load data (rbsp. The format of the NALU header is 2:

 
F: forbidden_zero_bit.1. If there is a syntax conflict, it is 1. When the Network identifies that this unit has a bit error, it can be set to 1 so that the receiver can lose this unit.
NRI: nal_ref_idc.2 bits are used to indicate the importance level of the NALU. The greater the value, the more important the current NALU is. If the value is greater than 0, there is no specific rule. Type: 5 bits, indicating nalu
. See table 1:

 
Note that the NALU with the nri values of 7 and 8 is a sequential parameter set (SPS) and an image parameter set (PPS), respectively ). The parameter set is a set of data that seldom changes and provides decoding information for a large number of vcl nalu. The sequence parameter set acts on a series of continuous encoded images, while the image parameter set acts on one or more independent images in the encoding video sequence. If the decoder fails to correctly receive the two parameter sets, the other naluIt cannot be decoded. Therefore, they are generally sending other naluIt can also be transmitted over different channels or more reliable transmission protocols (such as TCP.

Example:

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.