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

(0)
上一篇 2021年12月3日 下午9:00
下一篇 2021年12月3日 下午9:00


相关推荐

  • WAP1 X/WAP2 0以及WAP浏览器的协议版本

    WAP1 X/WAP2 0以及WAP浏览器的协议版本WAP1X WAP20 以及 WAP 浏览器的协议版本

    2026年3月18日
    3
  • jediscluster.set加锁_redislock

    jediscluster.set加锁_redislock一、前置配置需要已经集成成功JedisCluster本人已实践的参考:https://blog.csdn.net/NullToSay/article/details/109813194二、定义RedisLock类importorg.apache.commons.lang.StringUtils;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;importredis.clients.jedis.JedisClust.

    2022年10月14日
    4
  • PyCharm使用教程 — 7、使用PyCharm进行DeBug调试

    PyCharm使用教程 — 7、使用PyCharm进行DeBug调试DeBug运行/调试Bug大家都知道是程序中的错误,导致程序不能正常运行。而DeBug的字面意思就是解决Bug。DeBug执行的方式也是有三种,与上面的代码运行章节类似,1、右键DeBug2、导航栏DeBug点击导航栏绿色的蜘蛛图标即可DeBug启动。3、通过mainDebug执行如果程序有main函数入口,可以点击左侧的绿色小三角,然后选择上图标识的Debug项目名即可。4、断点如果Debug的程序没有断点,则跟正常的执行没有区别。断点:一个断点标注一个代码行,当程序执行到

    2022年8月25日
    7
  • matlab求两向量夹角_matlab入门练习

    matlab求两向量夹角_matlab入门练习练习题来自 湖心亭 MATLAB 基础练习 一 zhuanlan zhihu com1 按要求写出实现该功能的代码 1 使用方括号 操作符产生一个列向量 x 内容为 1 2 4 7 2 使用方括号 操作符产生一个行向量 x 内容为 1 2 4 7 3 使用冒号 操作符产生一个行向量 x 内容为 9 7 5 3 1 4 使用方括号 操作符产生一个二维数组 A 第 1 行为 9 4 5 1 第

    2026年3月26日
    1
  • idea 2021.8激活码-激活码分享

    (idea 2021.8激活码)本文适用于JetBrains家族所有ide,包括IntelliJidea,phpstorm,webstorm,pycharm,datagrip等。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年3月26日
    61
  • seekg ()[通俗易懂]

    seekg ()[通俗易懂] seekg语法:istream&seekg(off_typeoffset,ios::seekdirorigin);istream&seekg(pos_typeposition);函数seekg()用于输入流,并且它将重新设置”get”指针到当前流的从origin偏移offset个字节的位置上,或是置”get”指针在position位

    2022年6月10日
    41

发表回复

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

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