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


相关推荐

  • 最短路径算法汇总「建议收藏」

    最短路径算法汇总「建议收藏」1、Floyd-Warshall算法A、算法基本思想   在有向连通图中,从任意顶点i到顶点j的最短路径,可以看做从顶点i出发,经过m个顶点中转,到达j的最短路程。最开始可以只允许经过”1”号顶点进行中转,接下来只允许经过”1”号顶点和”2”号顶点进行中转……允许经过”1”~”m”号顶点进行中转,求任意两顶点的最短路程。B、算法实现for(intk=1;k<=n;

    2022年5月31日
    87
  • Android 系统签名实现的三种方式

    Android 系统签名实现的三种方式在项目开发时,如果需要使应用具有系统权限,例如可以支持静默安装和卸载APK,此时就需要使用系统签名。常用的系统签名方式包括在ubuntu环境下、手动签名和在AndroidStudio环境配置,三种方式中,实现最简单的是通过AndroidStudo方式,该方式的签名实现与正常的APK签名相同,唯一不同的就是签名文件是通过系统生成的。注意,无论采用何种签名方式,如果想实现具有系统权限的应用,在AP…

    2022年6月21日
    25
  • 微服务架构(java环境&tomcat)

    微服务架构(java环境&tomcat)

    2021年5月28日
    101
  • Mysql慢查询_mysql服务启动慢

    Mysql慢查询_mysql服务启动慢一、开启慢查询日志1、查看是否开启:showvariableslike’slow_query_log’;2、查看是否开启记录未使用索引的查询:showvariableslike’log_queries_not_using_indexes’;3、开启未使用索引的查询日志:setgloballog_queries_not_using_indexes=on;4、查看超过多长时间的语句才会…

    2022年10月14日
    2
  • 三极管的导通条件总结[通俗易懂]

    三极管的导通条件总结[通俗易懂]对三极管放大作用的理解,切记一点:能量不会无缘无故的产生,所以,三极管一定不会产生能量。但三极管厉害的地方在于:它可以通过小电流去控制大电流。放大的原理就在于:通过小的交流输入,控制大的静态直流。假设三极管是个大坝,这个大坝奇怪的地方是,有两个阀门,一个大阀门,一个小阀门。小阀门可以用人力打开,大阀门很重,人力是打不开的,只能通过小阀门的水力打开。所以,平常的工作流程便是,每当放水

    2022年6月18日
    76
  • 进程通信方式总结与盘点

    进程通信方式总结与盘点进程通信是指进程之间的信息交换 这里需要和进程同步做一下区分 进程同步控制多个进程按一定顺序执行 进程通信是一种手段 而进程同步是目标 从某方面来讲 进程通信可以解决进程同步问题 首先回顾下我们前面博文中讲到的信号量机制 为了实现进程的互斥与同步 需要在进程间交换一定的信息 因此信号量机制也可以被归为进程通信的一种方式 但是也被称为低级进程通信 主要原因为 效率低 一次只可操作少量的

    2025年7月26日
    8

发表回复

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

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