当前位置:网站首页>AVC1与H264的区别
AVC1与H264的区别
2022-07-05 12:51:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。
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 MEDIASUBTYPE_H264, with a different FOURCC. |
MEDIASUBTYPE_X264 | ‘X264’ | Equivalent to MEDIASUBTYPE_H264, with a different FOURCC. |
MEDIASUBTYPE_x264 | ‘x264’ | Equivalent to MEDIASUBTYPE_H264, with a different FOURCC. |
The main difference between these media types is the presence of startcodes in the bitstream. If the subtype is MEDIASUBTYPE_AVC1, thebitstream does not contain start codes.
H.264 Bitstream Without Start Codes
The MP4 container format stores H.264 data without start codes.Instead, each NALU is prefixed by a length field, which gives thelength of the NALU in bytes. The size of the length field can vary, butis typically 1, 2, or 4 bytes.
When start codes are not present in the bitstream, the following media type is used.
Major type | MEDIATYPE_Video |
|---|---|
Subtype | MEDIASUBTYPE_AVC1 |
Format type | FORMAT_MPEG2Video |
The format block is an MPEG2VIDEOINFO structure. This structure should be filled in as follows:
- hdr: A VIDEOINFOHEADER2 structure that describes the bitstream. No color table is present after the BITMAPINFOHEADER portion of the structure, and biClrUsed must be zero.
- dwStartTimeCode: Not used. Set to zero.
- cbSequenceHeader: The length of the dwSequenceHeader array in bytes.
- dwProfile: Specifies the H.264 profile.
- dwLevel: Specifies the H.264 level.
- dwFlags: The number of bytes used for the length field that appears before each NALU. The length field indicates the size of the following NALU in bytes. For example, if dwFlags is 4, each NALU is preceded by a 4-byte length field. The valid values are 1, 2, and 4.
- dwSequenceHeader: A byte array that may contain sequence parameter set (SPS) and picture parameter set (PPS) NALUs.
The MP4 container might contain sequence parameter sets (SPS) orpicture parameter sets (PPS) as special NAL units in file headers or ina separate stream (distinct from the video stream). When the format isestablished, the media type can specify SPS and PPS NAL units in the dwSequenceHeader array. If cbSequenceHeader is greater than zero, dwSequenceHeaderis the start of a byte array containing SPS and PPS NALUs, delimited by2-byte length fields, all in network byte order (big-endian). It ispossible to have both SPS and PPS, only one of these types, or none.The actual type of each NALU can be determined by examining thenal_unit_type field of the NALU itself.
When this media type is used, each media sample starts at thebeginning of a NALU, and NAL units do not span samples. This enablesthe decoder to recover from data corruption or dropped samples.
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/149593.html原文链接:https://javaforall.cn
边栏推荐
- Taobao order amount check error, avoid capital loss API
- 单独编译内核模块
- PyCharm安装第三方库图解
- RHCSA4
- 【Nacos云原生】阅读源码第一步,本地启动Nacos
- Association modeling method in SAP segw transaction code
- JXL notes
- 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
- Taobao product details API | get baby SKU, main map, evaluation and other API interfaces
- A deep long article on the simplification and acceleration of join operation
猜你喜欢

阿里云SLB负载均衡产品基本概念与购买流程

How to connect the API interface of Taobao open platform (super detailed)

Reverse Polish notation

Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface

Setting up sqli lab environment

RHCSA8

Talk about my drawing skills in my writing career

Taobao short videos are automatically released in batches without manual RPA open source

使用 jMeter 对 SAP Spartacus 进行并发性能测试

谈谈我写作生涯的画图技巧
随机推荐
Hundred days to complete the open source task of the domestic database opengauss -- openguass minimalist version 3.0.0 installation tutorial
A deep long article on the simplification and acceleration of join operation
PyCharm安装第三方库图解
946. Verify stack sequence
Taobao short videos are automatically released in batches without manual RPA open source
阿里云SLB负载均衡产品基本概念与购买流程
RHCSA10
Insmod prompt invalid module format
Four common problems of e-commerce sellers' refund and cash return, with solutions
Detailed explanation of navigation component of openharmony application development
Discussion on error messages and API versions of SAP ui5 getsaplogonlanguage is not a function
NFT: how to make money with unique assets?
LeetCode20.有效的括号
Reshape the power of multi cloud products with VMware innovation
RHCSA4
How to protect user privacy without password authentication?
Small case of function transfer parameters
Taobao product details API | get baby SKU, main map, evaluation and other API interfaces
Principle and performance analysis of lepton lossless compression
What is the difference between Bi software in the domestic market