AVC1与H264的区别

AVC1与H264的区别今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。H.264VideoTypesThefollowingmediasubtypesaredefinedforH.264video.SubtypeFOURCCDescri

大家好,又见面了,我是你们的朋友全栈君。

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

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

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


相关推荐

  • Zigbee协议栈应用(一)——Zigbee协议栈介绍及简单例子[通俗易懂]

    Zigbee协议栈应用(一)——Zigbee协议栈介绍及简单例子[通俗易懂]1、Zigbee协议栈简介  协议是一系列的通信标准,通信双方需要按照这一标准进行正常的数据发射和接收。协议栈是协议的具体实现形式,通俗讲协议栈就是协议和用户之间的一个接口,开发人员通过使用协议栈来使用这个协议,进而实现无线数据收发。  如图1所示:Zigbee协议分为两部分,IEEE802.15.4定义了PHY(物理层)和MAC(介质访问层)技术规范;Zigbee联盟定义了NWK(网络层)、A…

    2022年5月28日
    41
  • 解决CSDN富文本编辑器回车换行间距过大

    解决CSDN富文本编辑器回车换行间距过大在CSDN富文本编辑器中直接按回车(Enter)换行后文本间距会很大,解决方法是同时按住Shift+Enter,换行后间距就会很小!如下图所示:原理:Enter产生硬回车,它在换行的同时也起着段落分隔的作用。Shift+Enter产生软回车,它换行,但是并不换段,即前后两段文字在Word中属于同一“段”。…

    2022年5月1日
    79
  • vs2010 序列号 真的好用 vs2008 序列号

    vs2010 序列号 真的好用 vs2008 序列号用VS2008有些日子,刚刚才发现AboutMVS是有天数限制的(90),郁闷,只好在网上找序列号,不错,把刚刚找到的VS2008可升级序列号发给大家。1.VisualStudio2008ProfessionalEdition:XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT2.VisualStu…

    2022年8月10日
    14
  • minicom指令_minicom使用

    minicom指令_minicom使用Linux下的Minicom的功能与Windows下的超级终端功能相似,适于在linux通过超级终端对嵌入式设备的管理以及对嵌入操作系统的升级。1.启动minicom以root权限登录系统使用命令:minicom–s则minicom启动,出现配置界面。2.设置serialportsetup使用down箭头选择serialportsetup,出现具体各选项的配置:3.选择Save…

    2022年4月28日
    74
  • icmp协议是tcp还是udp_icmp协议使用udp

    icmp协议是tcp还是udp_icmp协议使用udp2018年4月11日11:41:29更新工具发包触发点结局traceroute初始发udp包ttl递增,icmp每一跳报ttl超时udp端口不可达tracert初始发icmprequest包触发点:ttl递增,icmp超时icmpechoreply注:触发点都是根据ttl超时来检测参考项traceroutetracert…

    2022年9月2日
    8
  • ElasticSearch 简单的 搜索 聚合 分析

    ElasticSearch 简单的 搜索 聚合 分析一、搜索1.DSL搜索全部数据没有任何条件查询名称包含xxx的商品,同时按照价格降序排序分页查询商品from第几条开始size获取几条查询结果中返回的字段设置2、query

    2022年7月2日
    31

发表回复

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

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