MPEG-2码流结构分析
MPEG2视频编码定义在 ISO/IEC13818-2中,MPEG2 video sequence如下图所示
我们可以借助Elecard Stream Analyer工具来分析MPEG2视频码流
MPEG2编码码流的起始码的含义如下
1.Sequence Header
MPEG2视频裸流的每一个GOP以Sequence Header开头,Sequence Header的起始码为00 00 01 B3,它里面保存了如下信息
- horizontal_size_value:视频帧宽度
- vertical_size_value:视频帧高度
- aspect_ratio_information:宽高比,各取值的含义如下
- frame_rate_code:帧率,各取值含义如下
- bit_rate_value:码率
- marker_bit:This is one bit that shall be set to '1'. This bit prevents emulation of start codes
- vbv_buffer_size:定义了VBV (Video Buffering Verifie)的大小
2.Sequence Extention

- profile_and_level_indication:指明了profile和leve
- progressive_sequence:When set to '1' the coded video sequence contains only progressive frame pictures. Whenprogressive_sequence is set to '0' the coded video sequence may contain both frame pictures and field pictures, and framepicture may be progressive or interlaced frames.
- chroma_format:采样格式,各取值含义如下
3.Group of picture Header

- time_code:时码,占25个字节,包含drop_frame_flag, time_code_hours, time_code_minutes,marker_bit, time_code_seconds 以及 time_code_pictures,各标志取值范围如下
- closed_gop:指明紧挨着在group of picture header后的I帧的连续的B帧的编码方式,如果被设置为1,表示该B帧只采用backward prediction 或 intra coding (Close GOP是指帧间的预测都是在GOP中进行的。而使用open GOP,后一个GOP会参考前一个GOP的信息。使用这种方式就大大降低了码率)
4.Picture Header

- temporal_reference:指明该帧的参考属性,各取值含义如下
- vbv_delay:当该值为 0xFFFF 表示VBR编码
5. Picture coding extension
- f_code[s][t]:4bit的整数,用在解码时的运动向量中,s和t的取值含义如下图
- intra_dc_precision: indicates the number of bits for quantized DC,coefficients of intra-coded blocks,The more bits are used, the more precise quantization is achieved,取之含义如下
- picture_structure :图像扫面方式,各取值含义如下
- frame_pred_frame_dct:If this flag is set to '1', then only frame-DCT and frame prediction are used. In a field picture it shall be '0'. frame_pred_frame_dct shall be '1' if progressive_sequence is '1'. This flag affects the syntax of the bitstream.
- concealment_motion_vectors:This flag has the value '1' to indicate that motion vectors are coded in intra macroblocks. This flag has the value '0' to indicate that no motion vectors are coded in intra macroblocks
MPEG-2码流结构分析的更多相关文章
- H264编码原理以及I帧、B和P帧详解, H264码流结构分析
H264码流结构分析 http://blog.csdn.net/chenchong_219/article/details/37990541 1.码流总体结构: h264的功能分为两层,视频编码层(V ...
- H264码流结构分析和rtp打包结构详解
网络抽象层单元类型 (NALU): NALU头由一个字节组成,它的语法如下: +---------------+ |0|1|2|3|4|5|6|7| +-+-+-+-+-+-+-+ ...
- (转载)H.264码流的RTP封包说明
H.264的NALU,RTP封包说明(转自牛人) 2010-06-30 16:28 H.264 RTP payload 格式 H.264 视频 RTP 负载格式 1. 网络抽象层单元类型 (NALU) ...
- H264码流打包分析
转自:http://www.360doc.com/content/13/0124/08/9008018_262076786.shtml SODB 数据比特串-->最原始的编码数据 RBSP ...
- H264码流打包分析(精华)
H264码流打包分析 SODB 数据比特串-->最原始的编码数据 RBSP 原始字节序列载荷-->在SODB的后面填加了结尾比特(RBSP trailing bits 一个bit“1”)若 ...
- H.264码流结构解析
from:http://wenku.baidu.com/link?url=hYQHJcAWUIS-8C7nSBbf-8lGagYGXKb5msVwQKWyXFAcPLU5gR4BKOVLrFOw4bX ...
- 【雷神源码解析】无基础看懂AAC码流解析,看不懂你打我
一 前言 最近在尝试学习一些视频相关的知识,随便一搜才知道原来国内有雷神这么一个真正神级的人物存在,尤其是在这里(传送门)看到他的感言更是对他膜拜不已,雷神这种无私奉献的精神应当被我辈发扬光大.那写这 ...
- aac adts & LATM封装码流分析
本文继续上一篇文章的内容,介绍一个音频码流处理程序.音频码流在视频播放器中的位置如下所示. 本文中的程序是一个AAC码流解析程序.该程序可以从AAC码流中分析得到它的基本单元ADTS frame,并且 ...
- 从H264码流中获取视频宽高 (SPS帧) 升级篇
之前写过 <从H264码流中获取视频宽高 (SPS帧)> . 但发现很多局限性,而且有时解出来是错误的. 所以重新去研究了. 用了 官方提供的代码库来解析. 花了点时间,从代码库里单独把解 ...
随机推荐
- 《DSP using MATLAB》示例Example6.18、6.19
- 《DSP using MATLAB》示例Example 6.12
上代码: % x = -8:7 y = TwosComplement(x, 4) y = dec2bin(y, 4); disp(sprintf('%s', [y'; char(ones(1, 16) ...
- 在IIS上搭建FTP服务
FTP服务 FTP是文件传输协议(File Transfer Protocol)的简称,该协议属于应用层协议(端口号通常为21),用于Internet上的双向文件传输(即文件的上传和下载).在网络上有 ...
- 给StackPanel的子元素添加padding
<StackPanel> <StackPanel.Resources> <Style TargetType="{x:Type TextBox}"> ...
- Sprint第一个冲刺(第三天)
一.Sprint介绍 今天我们完成了简单登录界面及美化的任务,完成了此次整个Sprint的百分之十五. 下面是实验截图: 二.Sprint周期 看板: 燃尽图:
- consul 几个方便使用的类库
consul 几个方便使用的类库 1. java https://github.com/OrbitzWorldwide/consul-client <dependency> < ...
- linux各个文件作用
linux下的文件结构,看看每个文件夹都是干吗用的/bin 二进制可执行命令 /dev 设备特殊文件 /etc 系统管理和配置文件 /etc/rc.d 启动的配置文件和脚本 /home 用户主目录的基 ...
- TOMCATE8下面项目启动问题
1.将servlet-api.jar替换项目中的servlet-api2.4 2.<servlet> <servlet-name>dwr-invoker&l ...
- 关于INTEL FPGA设计工具DSP Builder
一段时间以来,MathWorks一直主张使用Matlab和Simulink开发工具进行基于模型的设计,因为好的设计技术使您能够在更短的时间内开发更高质量的复杂软件.基于模块的设计采用了数学和可视化的方 ...
- rtmp发送H264及aac的音视频
RTMP推送的音视频流的封装形式和FLV格式相似,由此可知,向FMS推送H264和AAC直播流,需要首先发送"AVC sequence header"和"AAC sequ ...