;??????????????????????????????????????????????????????? Encoder deviceAvcodeccontext *cotx = NULL;????????????????????????????????? The encoder context, the main parameter setting, determines the operation of the encoderAvframe *pframe;????????????????????????????????????????????????????? Frame, fill in the data to be encoded and then give it to the coding method for processingAvpacket PKT;????????????????????????????????????????????????????????????? Package, the original frame encoding gets pa
The original post link is as follows: http://blog.csdn.NET/ren65432/article/details/43449391
Sometimes we need to get h264 naked stream for analysis. This article describes how to obtain a h264 stream by FFmpeg. The H264 code stream files obtained can be played directly through the player such as VLC.
I. H264 file Dat
Recently, the IIS server downloads h264 files. After IIS is deployed, the input in the address bar of the browser indicates that the files do not exist and cannot be downloaded. You can try other types of files.
Finally, my solution: set your own IIS server as follows:
1. Set mime to enable IIS to support more file types. skip this step if. h264 already exists in the MIME type. You can also set other ty
After debugging for a while, the RTSP server can finally see the live video. The test environment is
① Rt5350 runs in AP Mode
② The client is PC + VLC, And wifi uses a 54 Mbps USB Nic of TP-link.
Busybox v1.12.1 (22:09:57 Cst) built-in Shell (Ash)Enter 'help' for a list of built-in commands.# FreeTotal used free shared BuffersMem: 28116 18524 9592 0 836Swap: 0 0 0Total: 28116 18524 9592# TopMem: 18520 K used, 9596 K free, 0 K shrd, 836 K buff, 2840 K cachedCPU: 9% USR 9% sys 0% nice 81% idle
An h264 video decoding trial program is displayed on the Internet, which can be used to test its logical process.
The Code is as follows:
Test_display_h264 (){In_fd = open (h1__input_file, o_rdonly); // video file open
Fstat (in_fd, S); // get input file sizeFile_size = S. st_size;
In_addr = (char *) MMAP (0, file_size, prot_read, map_shared, in_fd, 0); // mapping input file to memoryPp_fd = open (pp_dev_name, o_rdwr); // post processor open, why d
Today, when I access the Internet, I occasionally find the answer to my questions.
H.264 video types
The following media subtypes are defined for H.264 video.
Subtype
Fourcc
Description
Mediasubtype_avc1
'Avc1'
H. 264 bitstream without start codes.
Mediasubtype_h264
'H264'
H. 264 bitstream with start codes.
Mediasubtype_h264
'H264'
Equivalent to
Today, when I access the Internet, I occasionally find the answer to my questions.
H.264 video types
The following media subtypes are defined for H.264 video.
Subtype
Fourcc
Description
Mediasubtype_avc1
'Avc1'
H. 264 bitstream without start codes.
Mediasubtype_h264
'H264'
H. 264 bitstream with start codes.
Mediasubtype_h264
'H264'
Equivalent to
The following content is transferred from the Peter Lee h264 code stream structure.
H.264's bitstream structure is very different from H.263's. It no longer uses a strict hierarchical structure.
The following image is from the network and represents the h264 code stream structure from another perspective:
Twelve h264 RTP packet Timestamp
Let's take h264 as an example.
Void hsf-videortpsink: dospecialframehandling (unsigned/* fragmentationoffset */, The function first checks whether it is the last packet of a frame. If yes, it marks the 'M' and then sets the timestamp. Where does this timestamp come from? It depends on who calls the function dospecialframehandling (). After searching, it is called by multifr
Http://www.cnblogs.com/haibindev/archive/2012/04/16/2450989.html implements an RTMP server that outputs H264 live streamsRTMP (Real time Messaging Protocol) is a common streaming media protocol, used to transmit audio and video data, combined with flash, widely used in live, on-demand, chat and other applications, as well as PC, mobile, embedded and other platforms, is to do streaming media development often come into contact with the protocol. I have
types of fu-a and fu-b. The type values are 28 and 29, respectively.Remember the definition of the previous nal_unit_type, 0~23 is for H264 use, 24~31 unused, in RTP packaging, if a nalu placed in a RTP packet, you can use Nalu Nal_unit_type, However, when you need to package multiple Nalu into a single RTP package, or if you need to package a NALU into multiple RTP packets, define a new type to identify it.Type Packet type name----------------------
rtmp Server for output H264 live streamingRTMP (Real time Messaging Protocol) is a common streaming media protocol, used to transmit audio and video data, combined with flash, widely used in live, on-demand, chat and other applications, as well as PC, mobile, embedded and other platforms, is to do streaming media development often come into contact with the protocol. I have previously written an article, "rtmp protocol to send H. E encoding and AAC en
rtmp Server for output H264 live streamingRTMP (Real time Messaging Protocol) is a common streaming media protocol, used to transmit audio and video data, combined with flash, widely used in live, on-demand, chat and other applications, as well as PC, mobile, embedded and other platforms, is to do streaming media development often come into contact with the protocol. I have previously written an article, "rtmp protocol to send H. E encoding and AAC en
Os:centos6.4-64bit--------compiling FFMPEG with h265--------1. Installing HG Tool#yum Install HG2. Download x265 source code and make#hg Clone https://bitbucket.org/multicoreware/x265#cd X265/build/linux#make#make Install3. Download x264 and FFmpeg source and makePlease refer to one of my previous blog posts:Use Nginx+ffmpeg to build HLS live Transcoding server (http://blog.csdn.net/wutong_login/article/details/42292787)4. Compile support for h265 FFMPEG#PKG_CONFIG_PATH =/usr/local/lib/pkgconfig
The raw stream data obtained from h264 is. Generally, the bitstream structure is SPS, PPS, I frame, P frame ...... SPS, PPS, I frame, P frame ............ When we use RTP to package h264 data, SPS and PPS can directly send I and P frames without sending them. It also depends on the size of I frame and P frame. If it is smaller than MTU, it can be sent directly with the RTP package. If it is larger than MTU,
Due to my recent reading of h264 files, I encountered the problem of how to read the full frame data, through the use of Elecard Stream Analyzer tools, as well as the combination of "new generation of video compression coding standard--H264/AVC" (second edition) book, and found in the online summary as follows:
First NAL syntax, title syntax, and Nal_unit_type semantics must know:
The above two graphs are
Recent projects need to record video taken by the camera, using H264 encoding. The test found that H264 encoded 2k (1980x1080) video was smooth, but encoded 4k (3840x4120) video showed noticeable lag phenomenon. Therefore consider using H264 Nvenc hardware encoding.The original code
Avcodec *codec = Avcodec_find_encoder (av_codec_id_h264);
Switch
Avcod
The Base_clock of PTS here are calculated in terms of 1000 (milliseconds), and if reused in TS, the Base_clock is 90k, so it should be multiplied by 90. About the H264 in the SPS recorded in the frame rate is twice times the actual frame rate, including slice inside the PIC_ORDER_CNT_LSB is also twice times the increment, I guess the code according to the Sub-field (Top field, bottom field) coding.
H264 es
using MP4V2 to synthesize h264+aac mp4 files
Recording program to add new features: Record CMMB TV shows, our cards are sent out of the RTP stream (H264 video and AAC audio), the recording program to do the work is:
(1) Receiving and parsing RTP packets, separating out H264 and AAC data streams;
(2)
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.