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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 计算机加密无法连接打印机,0x00000006无法连接打印机怎么办[通俗易懂]

    计算机加密无法连接打印机,0x00000006无法连接打印机怎么办[通俗易懂]0x00000006无法连接打印机怎么办?解决思路一:WIN10作为主机共享的话要设置一下,具体如下,鼠标右击任务栏网络图标,在菜单中左键点击打开网络和共享中心,鼠标左键点击打开窗口的左上角更改高级共享设置,在打开的窗口中,鼠标左键点击所有网络,选择1.公用文件夹(启用)2.文件共享连接使用128位加密3.密码保护的共享(关闭),保存。然后去需要共享的机器:按下键盘左下角的window…

    2022年5月15日
    169
  • Pytorch搭建DenseNet[通俗易懂]

    Pytorch搭建DenseNet[通俗易懂]文章目录DenseNet与ResNeXtDenseNet网络的搭建Growth_rateTransitionLayerBottleneck定义网络小测试问题1训练与测试可视化网络结构DenseNet与ResNeXt首先回顾一下DenseNet的结构,DenseNet的每一层都都与前面层相连,实现了特征重用。下图表示一个DenseBlock如图所示,在一个DenseBlock中,第i层的…

    2022年9月29日
    2
  • lockscreen仿ios下载_一键清除苹果锁屏密码

    lockscreen仿ios下载_一键清除苹果锁屏密码很久以前转了一个iOS利用HTCWeatherAnimatedPerpageHTML实现仿HTC天气时钟的帖子:iPhone4实现HTCSense时钟动画天气:http://blog.csdn.net/davidhsing/article/details/6723878 这几天更新了iOS5.1.1的完美越狱,现在发现以前放在Page1的方式有些腻

    2022年9月29日
    3
  • zabbix 监控介绍「建议收藏」

    zabbix 监控介绍「建议收藏」一、监控介绍你用过哪些监控软件?zabbix和nagios、cacti、ganglia有什么区别?zabbix有那些好处?zabbix的监控流程是什么?zabbix常见监控项有那些?1、CactiCacti是一套基于PHP、MySQL、SNMP及RRDTool开发的监测图形分析工具,Cacti是使用轮询的方式由主服务器向设备发送数据请求来获取设备上状态数据信息的,如果设备不断增多,这个轮询的过程就非常的耗时,轮询的结果就不能即时的反应设备的状态

    2022年4月28日
    80
  • python下几种打开文件的方式(你习惯的不一定是最好的)

    python下几种打开文件的方式(你习惯的不一定是最好的)python下打开文件的几种方式,以及优先推荐使用的写法。

    2022年10月9日
    3
  • 个人微信api接口调用代码[通俗易懂]

    个人微信api接口调用代码[通俗易懂]个人微信api接口1、微信好友收发消息/***给微信好友发消息*@authorwechatno:tangjinjinwx*@bloghttp://www.wlkankan.cn*/@AsyncpublicvoidhandleMsg(ChannelHandlerContextctx,TransportMessagevo,StringcontentJsonStr){try{…

    2022年10月2日
    3

发表回复

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

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