To play the H264 bare stream, you can split it into the following three jobs:1. Decoding H264 bare stream to get YUV data2. Convert YUV data to RGB data fill picture3. Display the captured pictureTo complete the work 1, we can directly use the HiSilicon decoding library, because the HiSilicon decoding library is C + + dynamic library, to complete in C # call can refer to HiSilicon
slice is incremented by 2.The frame rate recorded in the SPS in H264 is usually twice times the actual frame rate time_scale/num_units_in_tick=fps*2Therefore, the actual calculation formula should be this wayPTS=1000* (I_FRAME_COUNTER*2+PIC_ORDER_CNT_LSB) * (Time_scale/num_units_in_tick)or aPTS=1000* (I_FRAME_COUNTER+PIC_ORDER_CNT_LSB/2) * (TIME_SCALE/NUM_UNITS_IN_TICK/2)So, the 11th frame of PTS should be so calculated1000* (9*2+2) * (Time_scale/num
iOS audio AAC video H264 coded push flow best practicesProjects are personal research and experimentation, there may be many bad or wrong places please forgive.1 Overview of features* Realization of audio and video data collection* Realize the encoding of audio and video data, video encoding into H264, audio encoding into AAC* To achieve the release of audio and video data, the encoded audio and video trans
, skip here.But there is a problem to note that non-IE browser session will be lost, the search for a lot of data, the final summary of the reasons are:
Because Uploadify uses a flash client, it produces useragent different from the user-agent of the browser.
Final Solution:
Copy Code code as follows:
Add the session parameter to the upmodify upload parameter as follows:
Scriptdata: {"session_id": "},
Add the following code to the server-side receive page:
if (@$_request['
H264 es raw data is generally in the format of the NAL (Network Abstract Layer). Can be used directly for file storage and network transport. Each nalu (Network Abstract Layer Unit) data is composed of data header +rbsp data.
The first step is to split the data stream into a single, NALU data.
The value of Nal_type,i_nal_type that gets Nalu equals 0x7 indicates that the NALU is an SPS packet. Find and parse this SPS packet, which contains very importa
Step by step learning, a little progress every day
FFmpeg + x264 + QT Decoding code H264
Decoding: H264 encoded format of the MP4 file decoded after saving RGB to PPM format
Encoding: Encode the decoded RGB format to H264
Code:
Decoding section:
. Pro
TEMPLATE = AppCONFIG + = ConsoleCONFIG-= qt
SOURCES + = Main.cppIncludepath + =-i/usr/local/include/LIBS + =-l/
I. H264 Basic Concepts
1.1, NAL, slice and frame introduction and interrelated
NAL refers to the network extraction layer, which put some network-related information.
Slice is the meaning of the film, 264 in the image into a frame (frame) or two fields (field), and the frame can be divided into one or several slices (slilce), the slices are composed of macro blocks (MB). A macro block is a basic unit of encoding processing.
A frame can be divided into
One, H264 video encoded into MP4 file
See: H264 video encoded into MP4 file
See: Compilation of Mp4v2 under VS2010 and its use in projectsRecently do the project needs to be H264 file encapsulated as MP4 file, from the Internet to find the MP4V2 library, downloaded down do not know where to start, the official website https://code.google.com/p/mp4v2/in the comp
slice header .).
Slice_alpha_c0_offset_div2: returns the offset value used to enhance α and tc0.
Filteroffseta = slice_alpha_c0_offset_div2
The range of slice_alpha_c0_offset_div2 is-6 to + 6.
Slice_beta_offset_div2: returns the offset value used to enhance β and tc0.
Filteroffsetb = slice_beta_offset_div2
The range of slice_beta_offset_div2 is-6 to + 6.
Conditions for the existence of these two elements: disable_deblocking_filter_idc! = 1. For these elements, you only need to know that they
Hierarchical structure of H264 elementsIn the bit stream of the encoder output, each bit is subordinate to a syntactic element. Syntactic elements are organized into hierarchical structures that describe each level of information.In H. Five, the syntactic elements are organized into sequences, images, slices, macro blocks, and Submacro blocks. In such a structure, the head of each layer and its data part form a strong dependency relationship between m
Use ffmpeg to encode the BMP image as a x264 video file and save the H264 video as a BMP image,The ffmpeg open-source library encodes bmp images into x264 files and decodes and saves the encoded H264 files as BMP files. Based on the blog code, you can build a test environment in vs2010. Resource download code:
# Define _ AFXDLL # include
The following information is reported when you test the code in the b
; // encode the video data cache int outbuf_size; // encode the output data de-size int ndatalen; // The length of the RGB image data area int width; // The output video width int height; // output video height public: void ffmpeg_encoder_init (); // initialize void ffmpeg_encoder_setpara (codecid mycodeid, int vwidth, int vheight); // set the parameter. The first parameter is the encoder, the second parameter is the width of the compressed video, and the third video is its height void ffmpeg_en
Well, memory leaks are bad. began to suspect that their own code problems, debugging for half a day, and repeatedly rewrite and optimize the code, or leak serious.Take the online ready-made ffmpeg H264 coded sample to test, the same leak is very serious.Baidu a bit, a lot of people encounter the same problem, they say is the memory leak of the code library itself .... , no words, ffmpeg, that H264 code can
These months have been doing the iphone audio and video things, because the individual is lazy, so has not tidied up, now idle egg pain, and later the project to be shelved, here to record what I do the iphone mobile push the stream of things.Projects are personal research and experimentation, there may be many bad or wrong places please forgive.1 Overview of features* Realization of audio and video data collection* Realize the encoding of audio and video data, video encoding into
System FrameworkPrinciple Description:Adopt distributed network system, install video client software on mobile phone, install camera Server software on remote server, collect camera real-time video, carry out H264 encoding, and publish it in the form of custom TCP server, and use the client software to enter the IP address of the server. Connect and watch live video.Feature Description:Currently learning version supports capture 320*240 video, server
our knowledge of copyright, here can only open the header file:
#ifndef __h264decode_h__ #define __H264DECODE_H__ #if defined (__symbian32__)//S602RD/3RD/UIQ #include #include #include #include #else//windows/mobile/mtk/ophone #include #include #include #endif class H264decode { Public: /***************************************************************************//* Construct decoder
how H264 (ES) packaged into H264 (PES)
has been on the internet to collect all kinds of information, heart tired ah. The following nine locks are very complicated for you to explain the unknown relationship between TS and H264. first, the overall general diagram
This I do not know is in which CSDN master that get the figure, helped me a lot of busy, on the p
Since the company bought a device that did not provide a decoder, I had to do the decoding work as a last resort. I found a circle on the Internet. H264 decoding is more convenient, which is a series of ffmpeg function libraries. The original equipment also uses this set of function libraries to decode.
Using H264 decoding is divided into several steps:
Note that you must add extern "C" when adding the
Recently began to engage in video-related things. have been afraid of H264, feel too difficult, now began to touch it slowly, understand it. Inadvertently, see someone on the net to H264 stream analysis. Address: http://blog.csdn.net/leixiaohua1020/article/details/17933821. There are commercial tools, such as H264videoesviewer, but money, and expensive, the company spends money on one (really "one"), only o
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.