An idea of processing the h264 packet loss Screen

Source: Internet
Author: User

H264 video packet loss is inevitable during transmission in the group network, especially when the network environment is poor, transmission of h264 code streams, packet loss will lead to the decoding terminal screen, mosaic is serious, this cutting-edge technology is FEC, NACK, the former is the forward correction technology, and the latter is the retransmission. The two can work well to solve the visual effect caused by packet loss, which is generally unavailable to small manufacturers, if you want to pause the screen even when packet loss occurs, do not flat the screen. The most direct method I want is: Once the packet loss is found, all the packets will be dropped before the next I frame arrives, so once packet loss is detected, mark it and start to judge whether the received rtp packet is 264 I frame. For the method of determining the I frame, see static bool ishpoliciframe (byte [] paket) {int RTPHeaderBytes = 0; int fragment_type = paket [RTPHeaderBytes + 0] & 0x1F; int nal_type = paket [RTPHeaderBytes + 1] & 0x1F; int start_bit = paket [RTPHeaderBytes + 1] & 0x80; if (fragment_type = 28 | fragment_type = 29) & nal_type = 5 & start_bit = 128) | fragment_type = 5 | fragment_type = 7 | fragment_type = 8) {return true ;} return false ;}

Related Article

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.