当前位置: 首页 > news >正文

AVC1与H264的差别

今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。

H.264 Video Types

The following media subtypes are defined for H.264 video.

SubtypeFOURCCDescription
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 typeMEDIATYPE_Video
SubtypeMEDIASUBTYPE_AVC1
Format typeFORMAT_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.



相关文章:

  • sql点滴42—mysql中的时间转换
  • EucOne调试
  • 产品经理入职第一个月要做的12件事
  • 【转自ITPUB】SYNONYM关于underlying table权限的小小发现
  • allocator 的用法
  • IOS 绘制图表
  • Array types are now written with the brackets around the element type
  • linux_apache服务知识总结(二)(关于用户的访问控制及编译安装)
  • 特定字符输出及二分搜索 简单面试编程题
  • 【翻译】EXTJS 编码风格指南与实例
  • 操作符.*
  • Datax与hadoop2.x兼容部署与实际项目应用工作记录分享
  • 网站伪静态的好处与坏处
  • Android ListView只加载当前屏幕内的图片(解决list滑动时加载卡顿)
  • 使用jQuery快速添加一个页面的悬浮覆盖层
  • 【翻译】Mashape是如何管理15000个API和微服务的(三)
  • Angular 2 DI - IoC DI - 1
  • co模块的前端实现
  • JavaScript/HTML5图表开发工具JavaScript Charts v3.19.6发布【附下载】
  • JavaScript函数式编程(一)
  • python 学习笔记 - Queue Pipes,进程间通讯
  • react-native 安卓真机环境搭建
  • SQLServer之创建显式事务
  • tab.js分享及浏览器兼容性问题汇总
  • Webpack 4x 之路 ( 四 )
  • 分类模型——Logistics Regression
  • 好的网址,关于.net 4.0 ,vs 2010
  • 坑!为什么View.startAnimation不起作用?
  • 七牛云假注销小指南
  • 实习面试笔记
  • 数据仓库的几种建模方法
  • 微信小程序开发问题汇总
  • 项目实战-Api的解决方案
  • TPG领衔财团投资轻奢珠宝品牌APM Monaco
  • 通过调用文摘列表API获取文摘
  • 专访Pony.ai 楼天城:自动驾驶已经走过了“从0到1”,“规模”是行业的分水岭| 自动驾驶这十年 ...
  • ​Linux Ubuntu环境下使用docker构建spark运行环境(超级详细)
  • ​MySQL主从复制一致性检测
  • #Linux杂记--将Python3的源码编译为.so文件方法与Linux环境下的交叉编译方法
  • #我与Java虚拟机的故事#连载09:面试大厂逃不过的JVM
  • (+4)2.2UML建模图
  • (13)Hive调优——动态分区导致的小文件问题
  • (2)MFC+openGL单文档框架glFrame
  • (52)只出现一次的数字III
  • (env: Windows,mp,1.06.2308310; lib: 3.2.4) uniapp微信小程序
  • (初研) Sentence-embedding fine-tune notebook
  • (分布式缓存)Redis哨兵
  • (六) ES6 新特性 —— 迭代器(iterator)
  • (十一)JAVA springboot ssm b2b2c多用户商城系统源码:服务网关Zuul高级篇
  • (转) ns2/nam与nam实现相关的文件
  • (转)负载均衡,回话保持,cookie
  • (转)利用ant在Mac 下自动化打包签名Android程序
  • (自用)learnOpenGL学习总结-高级OpenGL-抗锯齿
  • ***php进行支付宝开发中return_url和notify_url的区别分析
  • *2 echo、printf、mkdir命令的应用