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


相关推荐

  • Python 实现异步调用函数

    Python 实现异步调用函数async_call.py#coding:utf-8fromthreadingimportThreaddefasync_call(fn):defwrapper(*args,**kwargs):Thread(target=fn,args=args,kwargs=kwargs).start()returnwrappertest.p…

    2022年7月11日
    22
  • Python遗传和进化算法框架(一)Geatpy快速入门[通俗易懂]

    Python遗传和进化算法框架(一)Geatpy快速入门[通俗易懂]Geatpy是一个高性能实用型的Python遗传算法工具箱,提供一个面向对象的进化算法框架,经过全面改版后,新版Geatpy2目前由华南农业大学、暨南大学、华南理工等本硕博学生联合团队开发及维护。Website(includingdocumentation):http://www.geatpy.com Demo:https://github.com/geatpy-dev/geatp…

    2022年5月19日
    59
  • Java 8 – 收集器Collectors_实战

    Java 8 – 收集器Collectors_实战文章目录

    2025年5月23日
    2
  • 下载scrapy失败_手机安装包无法安装怎么办

    下载scrapy失败_手机安装包无法安装怎么办Scrapy安装有问题的,按照这个路径配置下anaconda的环境变量然后进入pycharm里的工作目录输入pipinstall-ihttps://pypi.tuna.tsinghua.edu.cn/simplescrapy安装完成后在cmd中输入scrapy,显示下图内容则证明安装成功:…

    2022年9月17日
    7
  • PyPDF2模块[通俗易懂]

    PyPDF2模块[通俗易懂]1、PdfFileReader构造方法:PyPDF2.PdfFileReader(stream,strict=True,warndest=None,overwriteWarnings=True)stream:*File对象或支持与File对象类似的标准读取和查找方法的对象,也可以是表示PDF文件路径的字符串。*strict(bool):确定是否应该警告用户所用的…

    2022年6月23日
    30
  • intellij idea 全局搜索_idea设置全局搜索

    intellij idea 全局搜索_idea设置全局搜索IntelliJIDEA使用教程(总目录篇)我们用Eclipse或者IntelliJIDEA编程,有时候需要将整个项目的某个字符串替换成其他的。全局搜索我会,我还给调成ctrl+g了呢,但是遇到要全局(整个项目)替换字符串。哎哟,我有点蒙了。这不换了编辑器吗。我用的是eclipse的keymap而且电脑又不是mac。那么问题来啦。怎么找快捷键呢。如下;额,顺便说下…

    2022年9月27日
    5

发表回复

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

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