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帧)> . 但发现很多局限性,而且有时解出来是错误的. 所以重新去研究了. 用了 官方提供的代码库来解析. 花了点时间,从代码库里单独把解 ...
随机推荐
- maven报错【Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of】
[自己的操作] (1)windows -> Preferences -> maven 的settings.xml文件中.m2的位置已经失效,更改正确后尝试 (2)pom.xml还有下面错误 ...
- 日志组件logback的介绍及配置使用方法(二)
四.Logback的默认配置 如果配置文件 logback-test.xml 和 logback.xml 都不存在,那么 logback 默认地会调用BasicConfigurator ,创建一个最小 ...
- HDU2473 Junk-Mail Filter 【可删除的并查集】
HDU2473 Junk-Mail Filter Problem Description Recognizing junk mails is a tough task. The method used ...
- 剑指offer第六章
剑指offer第六章 1.数字在排序数组中出现的次数 统计一个数字在排序数组中出现的次数.例如输入排序数组{1,2,3,3,3,3,4,5}和数字3,由于3在数组中出现了4次,所以输出4 分析:思路1 ...
- 理解可变参数va_list、va_start、va_arg、va_end原理及使用方法
原文: http://www.cnblogs.com/pengdonglin137/p/3345911.html
- ballerina 学习十五 控制流
ballerina 的控制流没有什么特殊,只是相比一般语言多了一个模式匹配的操作match ,实际上其他语言(erlang elixir rust 中的模式匹配是很强大的) 简单例子 if/else ...
- as3 阻止后续侦听器
public class Test1 extends Sprite { private var spr:Sprite; private var spr2:Sprite; public function ...
- python编程规范系列--建议08~18
本系列来自<编写高质量代码 改善python程序的91个建议>的读书笔记整理. 本章主要内容 建议8:利用assert语句来发现问题 建议9:数据交换值时不推荐使用中间交换变量 建议10 ...
- linux下使用tar命令详解
解压语法:tar [主选项+辅选项] 文件或者目录 使用该命令时,主选项是必须要有的,它告诉tar要做什么事情,辅选项是辅助使用的,可以选用. 主选项: c 创建新的档案文件.如果用户想备份一个目录或 ...
- POJ1273(最大流入门)
Drainage Ditches Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 70333 Accepted: 2733 ...