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


相关推荐

  • 路径不正确的文件怎么删除(文件不存在)

    打开记事本输入:DEL/F/A/Q\?\%1RD/S/Q\?\%1保存为删除.bat将要删除的文件夹或文件拖到删除图标上,世界清净了。

    2022年4月12日
    90
  • java标识符可以$开头吗_JAVA标识符

    java标识符可以$开头吗_JAVA标识符JAVA标识符JAVA标识符简介Java语言中,对于变量,常量,函数,语句块也有名字,我们统统称之为Java标识符。也就是程序员在定义java程序时,自定义的一些名字,例如helloworld程序里关键字class后跟的Demo,就是我们定义的类名。类名就属于标识符的一种。标识符除了应用在类名上,还可以用在变量、函数名、包名上。(要求同学们先记住,以后会详细见到这些)。标识符命名规则1.标识符由…

    2022年7月26日
    17
  • 最简单的SpringBoot整合MyBatis教程

    最简单的SpringBoot整合MyBatis教程前面两篇文章和读者聊了SpringBoot中最简单的数据持久化方案JdbcTemplate,JdbcTemplate虽然简单,但是用的并不多,因为它没有MyBatis方便,在Spring+SpringMVC中整合MyBatis步骤还是有点复杂的,要配置多个Bean,SpringBoot中对此做了进一步的简化,使MyBatis基本上可以做到开箱即用,本文就来看看在SpringBoot中MyBa…

    2022年6月24日
    25
  • 圣经中基甸的故事_马热伊基艾

    圣经中基甸的故事_马热伊基艾给定一个包含 n 个点 m 条边的有向图,每条边都有一个流量下界和流量上界。给定源点 S 和汇点 T,求源点到汇点的最小流。输入格式第一行包含四个整数 n,m,S,T。接下来 m 行,每行包含四个整数 a,b,c,d 表示点 a 和 b 之间存在一条有向边,该边的流量下界为 c,流量上界为 d。点编号从 1 到 n。输出格式输出一个整数表示最小流。如果无解,则输出 No Solution。数据范围1≤n≤50003,1≤m≤125003,1≤a,b≤n,0≤c≤d≤21474836

    2022年8月11日
    4
  • 铸博皇御:贵金属技术分析基础入门知识「建议收藏」

    铸博皇御:贵金属技术分析基础入门知识「建议收藏」 在贵金属投资市场上,或许有很多投资者表示贵金属技术分析很难理解。特别是刚入门的新手,可能一开始对其并不容易理解,其实这可以理性地看待。贵金属技术分析是根据历史数据,以及开盘价、收盘价、最高价、最低价,利用数学统计的方法来进行综合统计计算。  一般进行分析时需要抛弃主观观念,客观地去分析价格的走向。虽然它不能够左右价格走向,但是可以由价格决定它的趋势走向。所以能不能学好贵金属技术分析,是多方面作用的结果。但需要提醒大家的是:用贵金属技术分析法,只能分析它的趋势,意味着不能完全依赖技术分析来行情作为决策重

    2022年5月28日
    37
  • linux永久关闭防火墙命令需要重新加载环境变量吗_linux常用命令关闭防火墙

    linux永久关闭防火墙命令需要重新加载环境变量吗_linux常用命令关闭防火墙第一步:systemctlstopfirewalld.service(暂时关闭防火墙服务,系统重启后防火墙还会打开)第二步:systemctldisablefirewalld.service(通过关闭防火墙服务,开机自动启动,来做到永久关闭防火墙服务)如何查看防火墙状态呢?systemctlstatusfirewalld.service如图所示,就代表关闭成功了…

    2025年9月20日
    5

发表回复

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

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