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


相关推荐

  • 数据外连接 LEFT OUT JOIN 的用法

    数据外连接 LEFT OUT JOIN 的用法table1 与 table2 的等值连接如下 Select nbsp A id A name A housenumber B housenumber B housenamefro table2Bwhere housenumber B housenumber nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp

    2026年3月17日
    2
  • python之IP地址处理模块IPy

    python之IP地址处理模块IPyIPy 的安装 wgethttps pypi python org packages source I IPy IPy 0 81 tar gztar xzvfIPy 0 81 tar gzcdIPy 0 81pythonsetu pyinstallIP 地址与网段的基本处理 IPy 模块包含 IP 类通过 version 方法区别 IPv4 与 IPv6 通过制定的网段输出该网段

    2025年11月26日
    7
  • 公司用的检查openweb服务是否启动的脚本

    公司用的检查openweb服务是否启动的脚本

    2022年3月8日
    37
  • java数组转List集合对象

    java数组转List集合对象方法一 List String list newArrayList lt gt Collections addAll list ids 方法二 Arrays asList userIds String

    2026年3月17日
    1
  • 如何为pycharm配置Python解释器_anaconda3添加环境变量

    如何为pycharm配置Python解释器_anaconda3添加环境变量@本文来源于公众号:csdn2299,喜欢可以关注公众号程序员学府文章目录1.python解释器安装2.配置环境变量3.pycharm安装4.pycharm设置及使用4.1pycharm设置4.2pycharm使用1.python解释器安装下载地址:https://www.python.org/打开官网,点击downloads,选择操作系统,以windows为例:选择python2与python3解释器版本(以python3.6.6及python2.7.16为例):以python3.6.6为例

    2022年8月25日
    8
  • 中标麒麟安装jdk

    中标麒麟安装jdk中标麒麟自带 jdk7 如果需要更换 jdk 可以切换默认的 jdk 安装自己需要的 jdk 版本 jdk 6u45 linux x64 rpm b 环境变量配置 使用命令 vim etc profile 在该文件的末尾添加如下配置 exportJAVA HOME usr java jdk1 6 0 45exportJAVA HOME usr java jdk1 6 0 4

    2026年3月26日
    1

发表回复

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

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