多媒体开发之sps---解析sps得到图像的宽高
(1)通过块的宽高解析出真个h264的分辨率
如何解析SDP中包含的H.264的SPS和PPS串
http://www.pernet.tv.sixxs.org/thread-109-1-1.html
SDP中的H.264的SPS和PPS串,包含了初始化H.264解码器所需要的信息参数,包括编码所用的profile,level,图像的宽和高,deblock滤波器等。
由于SDP中的SPS和PPS都是BASE64编码形式的,不容易理解,附件有一个工具软件可以对SDP中的SPS和PPS进行解析。
用法是在命令行中输入:
spsparser sps.txt pps.txt output.txt
例如sps.txt中的内容为:
Z0LgFNoFglE=
pps.txt中的内容为:
aM4wpIA=
最终解析的到的结果为:
Start dumping SPS:
profile_idc = 66
constrained_set0_flag = 1
constrained_set1_flag = 1
constrained_set2_flag = 1
constrained_set3_flag = 0
level_idc = 20
seq_parameter_set_id = 0
chroma_format_idc = 1
bit_depth_luma_minus8 = 0
bit_depth_chroma_minus8 = 0
seq_scaling_matrix_present_flag = 0
log2_max_frame_num_minus4 = 0
pic_order_cnt_type = 2
log2_max_pic_order_cnt_lsb_minus4 = 0
delta_pic_order_always_zero_flag = 0
offset_for_non_ref_pic = 0
offset_for_top_to_bottom_field = 0
num_ref_frames_in_pic_order_cnt_cycle = 0
num_ref_frames = 1
gaps_in_frame_num_value_allowed_flag = 0
pic_width_in_mbs_minus1 = 21
pic_height_in_mbs_minus1 = 17
frame_mbs_only_flag = 1
mb_adaptive_frame_field_flag = 0
direct_8x8_interence_flag = 0
frame_cropping_flag = 0
frame_cropping_rect_left_offset = 0
frame_cropping_rect_right_offset = 0
frame_cropping_rect_top_offset = 0
frame_cropping_rect_bottom_offset = 0
vui_parameters_present_flag = 0
Start dumping PPS:
pic_parameter_set_id = 0
seq_parameter_set_id = 0
entropy_coding_mode_flag = 0
pic_order_present_flag = 0
num_slice_groups_minus1 = 0
slice_group_map_type = 0
num_ref_idx_l0_active_minus1 = 0
num_ref_idx_l1_active_minus1 = 0
weighted_pref_flag = 0
weighted_bipred_idc = 0
pic_init_qp_minus26 = 0
pic_init_qs_minus26 = 0
chroma_qp_index_offset = 10
deblocking_filter_control_present_flag = 1
constrained_intra_pred_flag = 0
redundant_pic_cnt_present_flag = 0
transform_8x8_mode_flag = 0
pic_scaling_matrix_present_flag = 0
second_chroma_qp_index_offset = 10
/////////////////////////////////////////////////////////////////////////////////////////////////
这里需要特别提一下这两个参数
pic_width_in_mbs_minus1 = 21
pic_height_in_mbs_minus1 = 17
分别表示图像的宽和高,以宏块(16x16)为单位的值减1
因此,实际的宽为 (21+1)*16 = 352
http://www.360doc.com/content/13/0916/13/9008018_314809692.shtml
http://www.360doc.com/content/14/1201/16/9008018_429611145.shtml
http://www.cnblogs.com/gaochundong/archive/2013/04/13/csharp_rtp_rfc3550.html
(2)
(3)
多媒体开发之sps---解析sps得到图像的宽高的更多相关文章
- 多媒体开发之h264中的sps---sps信息提取之分辨率宽高提取2
-------------------author:pkf -----------------------------time:2015-8-20 -------------------------- ...
- 【图像处理】Golang 获取JPG图像的宽高
一.背景 有些业务需要判断图片的宽高,来做一些图片相关缩放,旋转等基础操作. 但是图片缩放,旋转,拼接等操作需要将图片从 JPG 格式转成 RGBA 格式操作,操作完毕后,再转回 JPG 图片. 那如 ...
- 多媒体开发之h264中的sps---sps信息提取之帧率
------------------------------author:pkf -----------------------------------------time:2015-8-20 --- ...
- 多媒体开发之h264的三种字节流格式---annexb 哥伦布/mp4 以及还有一种rtp传输流格式
------------------------------------author:pkf ------------------------------------------time:2015-1 ...
- 嵌入式开发之zynqMp ---Zynq UltraScale+ MPSoC 图像编码板zcu102
1.1 xilinx zynqMp 架构 1.1.1 16nm 级别工艺 Zynq UltraScale+ MPSoC架构 Xilinx新一代Zynq针对控制.图像和网络应用推出了差异化的产品系,这 ...
- 多媒体开发之rtp打包---打包中的FU-A分包方式说明
继上篇rtp中的时间戳和负载类型之后,升入到了nalu的分片打包问题,这里做下笔记 (1)fu-a的打包格式 1.基于RTP协议的打包及解包 (1)单个NAL打包 H.264NALU单元常由[star ...
- 安卓开发之json解析
1.从网页获取json返回字符串 public class ReadNet extends AsyncTask<URL, Integer, String> { @Override ...
- Android开发之json解析
目前正在尝试着写app,发现看懂代码和能写出来差距很大,最关键的是java基础比较的差,因为只会python,java基础只学习了一个礼拜就过了.感觉java写出来的代码不如python简单明了. 上 ...
- iOS开发之JSON解析
JSON解析步骤: - (NSArray *)products { if (_products == nil) { //第一步:获取JSON文件的路径: NSString *path = [[NSBu ...
随机推荐
- Scrapy学习-24-集成elasticsearch
elasticsearch简单集成到scrapy中 使用elasticsearch的python接口处理数据 https://github.com/elastic/elasticsearch-dsl ...
- 阻止关闭窗口,FormCloseQuery
procedure TfrmTopJdsMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin ) = mrNo then ...
- hdu 5059(模拟)
Help him Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- 五、Ubuntu 进入vi相关问题
1.进入vi环境:vim 路径 2.编辑vi:按i键即可 3.保存vi:按esc键,输入冒号,输入wq 回车即可 4.遇到readonly相关问题,可先解除readonly:按esc键,输入:set ...
- mysql查询练习题
建库建表 a.建立一个公司数据库(gongsi) CREATE DATABASE gongsi b.建立一张部门表(部门编号b_id,部门名称b_name) , 其中b_ ...
- Codeforces Round #455 (Div. 2) A. Generate Login【贪心】
A. Generate Login time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...
- Codeforces 743D Chloe and pleasant prizes(树型DP)
D. Chloe and pleasant prizes ...
- superagent-promise
var Promise = this.Promise || require('promise'); var agent = require('superagent-promise')(require( ...
- luogu P1304 哥德巴赫猜想
题目描述 输入N(N<=10000),验证4~N所有偶数是否符合哥德巴赫猜想. (N为偶数). 如果一个数,例如10,则输出第一个加数相比其他解法最小的方案.如10=3+7=5+5,则10=5+ ...
- [UR #3] 核聚变反应强度
次大公约数就是gcd再除以其最小质因子(如果有的话).可以发现要求的sgcd 的前身gcd都是a1的约数,所以把a1质因数分解直接做就行了. #include<bits/stdc++.h> ...