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


相关推荐

  • IDEA激活成功教程后一直提示JetbrainsAgent 相关的弹框问题

    IDEA激活成功教程后一直提示JetbrainsAgent 相关的弹框问题激活成功教程后打开IDEA就弹框,关闭之后会自动打开浏览器,隔一会也会弹出来 也是一样的问题一开始是说把txt 和 jar 文件放一个路径下之类的方法,几经波折,发现没任何用处~最后各种搜索排查,在设置下更改配置就不弹啦~settings设置下搜索agent 取消”Instrumenting agent(requires debugger restart)”在 Reload classes after compilation:选择第一个 Always…

    2022年8月20日
    8
  • android监听进程杀死_安卓进程管理

    android监听进程杀死_安卓进程管理今天在编写application通用组件时,需要在低内存的回调中杀死进程,所以找了下androd傻进程的方法,总结下来有下面几种:根据进程名称杀进程android.os.Process.killProcess(android.os.Process.myPid());代码本身没什么可以说的,需要注意的是,当进程在前台时,会杀死现有进程,然后再重新启动改线程,类似于手机的重启。但是只要我们把…

    2025年9月6日
    3
  • 什么叫应用程序域?(zhuan)

    什么叫应用程序域?(zhuan) 一:应用程序域介绍:    "域",就是范围,环境,边界的意思,那么什么是应用程序域,官方给出的是这样的解释:操作系

    2022年7月3日
    17
  • w3c标准是什么_语言的特征主要包括什么

    w3c标准是什么_语言的特征主要包括什么什么是W3C标准站点标准(SiteStandard)不是某一个标准,而是一系列标准的集合。网页主要由三部分组成:结构(Structure)、表现(Presentation)和行为(Behavior)。对应的标准也分三方面:结构化标准语言主要包括XHTML和XML;表现标准语w3c网页标准,具体指那些?CSS布局HTML小编今天和大家分享高手指教,。WEB标准不是某一个标准,而是一系列标准的…

    2025年12月13日
    0
  • Python day4知识回顾

    Python day4知识回顾#-*-coding:utf_8_*_#Author:Vi#字典是无序的info={‘student001′:”DIO”,’student002′:”JOJO”,’student003’:”Pucci”,}”’#print(info[‘student003’])info[‘student001’]=”屌”#对已有字典进行修改info[‘stud…

    2025年5月24日
    4
  • ubuntu 安装jdk

    ubuntu 安装jdkhttps://developer.aliyun.com/article/704959#:~:text=%E4%B8%80.%20Ubuntu%20%E5%AE%89%E8%A3%85JDK%E7%9

    2022年7月4日
    24

发表回复

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

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