Android audio and video–H.264 video stream decoding

1 Introduction H.264 is a digital video compression format used by many developers. It is mainly used for the transmission of live streaming and video streaming on video websites. Many developers have also begun to use H.265 for video compression, which has better performance. H.264 has a big improvement. This article focuses on the implementation […]

RTMP streams in two ways: H.264, ACC and FLV encapsulation format

1. RTMP streaming method 1: Push H.264, ACC 1. Create a thread to initialize RTMP. void RtmpPush::init() { LOGE(“init()”); mCallJava->onConnectint(THREAD_MAIN); pthread_create( & amp;push_thread, NULL, callBackPush, this); } void *callBackPush(void *data) { RtmpPush *rtmpPush = static_cast<RtmpPush *>(data); rtmpPush->startPushing = false; LOGE(“callBackPush()”); //RTMP applies for heap memory rtmpPush->rtmp = RTMP_Alloc(); //RTMP initialization RTMP_Init(rtmpPush->rtmp); rtmpPush->rtmp->Link.timeout = 10; rtmpPush->rtmp->Link.lFlags […]

H.264 video stream NALU segmentation

H264 layered structure The main goal of H264 is to have a high video compression ratio and good network affinity. In order to achieve these two goals, the H264 solution is to divide the system framework into two levels, namely the video coding level (VCL: Video Coding Layer) and Network Abstraction Level (NAL: Network Coding […]

How to send and receive custom data in the lightweight RTSP service that supports H.264 extended SEI?

Why develop lightweight RTSP service? The purpose of developing lightweight RTSP services is to solve the problem that users or developers need to deploy RTSP or RTMP services separately in some scenarios. The main advantages of this service are as follows: Convenience: With the lightweight RTSP service, users do not need to configure a separate […]

H.264 – Sequence Parameter Set (SPS)

SPS SPS syntax (seq_parameter_set_data) resolution width high Crop the picture to get the correct resolution vui structure (vui_parameters) The content is taken from Recommendation ITU-T H.264. SPS syntax (seq_parameter_set_data) 7.3.2.1.1 Sequence parameter set data syntax seq_parameter_set_data( ) { C Descriptor ? profile_idc 0 u (8) ? constraint_set0_flag 0 u(1) ? constraint_set1_flag 0 u(1) ? constraint_set2_flag […]

Why do I need to encode YUV into H.264 when transmitting video streams?

First of all, at the beginning, we borrowed a picture of Thor to help everyone understand The benefits of this article, free C++ audio and video learning materials package, technical video/code, including (audio and video development, interview questions, FFmpeg, webRTC, rtmp, hls, rtsp, ffplay, codec, push-pull stream, srs) ↓↓↓↓↓↓See below↓↓Click at the bottom of the […]

H.264 Slice Header (SliceHead)

Basic structure (SliceHead) H.264 (also known as AVC) is a video coding standard that divides a video frame into multiple segments for compression. Each fragment is called Slice, and SliceHeader is the structure used to describe each fragment in H.264. The SliceHeader structure contains some important information: first_mb_in_slice: Indicates the index of the first macroblock […]

H.264 Picture Parameter Set (PPS)

Basic structure (PPS) PPS (Picture Parameter Set) is a parameter set in the H.264/AVC video coding standard, which is used to describe the coding parameters of video frames. It contains some parameters related to image processing and encoding, such as image size, frame rate, color space, etc. PPS is usually used together with SPS (Sequence […]