AVC1与H264的差别

AVC1与H264的差别

大家好,又见面了,我是全栈君,祝每个程序员都可以多学几门语言。

今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。

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.net/118812.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • pycharm flask框架_挣钱的项目

    pycharm flask框架_挣钱的项目基于Pycharm轻松创建Flask项目需要pycharm专业版,社区版是没有项目模板的,也可以手动创建这几个文件夹完成模板的创建。打开Pycharm的file,选择创建新的项目,然后弹出对话框,我们可以看到里面有很多的案例,Flask、Django等等,我们选择生成Flask的demo程序选择创建之后一个简易的Flask项目就出现在我们眼前,第一个是入口程序,还有一个static的静态目录,templates是模板存放的位置我们可以手动来启动这个Flask项目,但是这不是很理智的,在Pych

    2022年8月28日
    1
  • springsecurity自定义密码验证_数字图形验证码怎么填

    springsecurity自定义密码验证_数字图形验证码怎么填SpringSecurity添加图形验证码认证功能第一步:图形验证码接口1.使用第三方的验证码生成工具Kaptchahttps://github.com/penggle/kaptcha@ConfigurationpublicclassKaptchaImageCodeConfig{@BeanpublicDefaultKaptchagetDefaultKaptcha(){DefaultKaptchadefaultKaptcha=newDefa

    2022年9月15日
    0
  • 从零开始学习UCOSII操作系统3–UCOSII启动过程「建议收藏」

    从零开始学习UCOSII操作系统3–UCOSII启动过程「建议收藏」从零开始学习UCOSII操作系统3–UCOSII启动过程1、初始化UCOSII(1)在调用UCOSII在任何的其他的服务之前,UCOSII要求首先调用初始化函数OSInit();这个函数的目的就是在整个系统启动之前,初始化所有的变量和数据结构。(2)其中,在OSInit()函数中建立空闲任务OS_TaskIdle();这个任务总是处于就绪态的,空闲任务的优先级是设置为最低

    2022年6月4日
    26
  • 初识Promises[通俗易懂]

    初识Promises[通俗易懂]原文:PromisesinNode.jswithQ–AnAlternativetoCallbacksby MarcHarter 《Node.jsinPractice》怎么写异步代码?相对原始的callbacks而言,promises无疑是更好的选择。可掌握promises的概念及其用法可能不太容易,而且很有可能你已经放弃它了。但经过一大波码农的努力,promi

    2025年6月15日
    1
  • 未明确定义列什么原因_将多表数据汇总到一个表

    未明确定义列什么原因_将多表数据汇总到一个表运行环境:Oracle10gsqlplus环境下。 在查询语句中,经常会出现一个错误: SQL基础:ORA-00918:未明确定义列的错误。 当前遇到有两种情况。原因为:当查询语句中,查询的表(数据集)中有相同的字段名,查询字段无法确认是改查那个字段 时,就会报未明确定义列的错误。 第一种情况: 1.单表时: 比如fconsign表中存在三个字段:fcsg_c

    2022年10月5日
    0
  • 知己知彼:一篇来自前端同学对后端接口的吐槽!

    点击上方“全栈程序员社区”,星标公众号 重磅干货,第一时间送达 作者:李熠 juejin.im/post/6844903861841313806 前言 去年的某个时候就想写一篇关于…

    2021年6月24日
    112

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号