(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得到图像的宽高的更多相关文章

  1. 多媒体开发之h264中的sps---sps信息提取之分辨率宽高提取2

    -------------------author:pkf -----------------------------time:2015-8-20 -------------------------- ...

  2. 【图像处理】Golang 获取JPG图像的宽高

    一.背景 有些业务需要判断图片的宽高,来做一些图片相关缩放,旋转等基础操作. 但是图片缩放,旋转,拼接等操作需要将图片从 JPG 格式转成 RGBA 格式操作,操作完毕后,再转回 JPG 图片. 那如 ...

  3. 多媒体开发之h264中的sps---sps信息提取之帧率

    ------------------------------author:pkf -----------------------------------------time:2015-8-20 --- ...

  4. 多媒体开发之h264的三种字节流格式---annexb 哥伦布/mp4 以及还有一种rtp传输流格式

    ------------------------------------author:pkf ------------------------------------------time:2015-1 ...

  5. 嵌入式开发之zynqMp ---Zynq UltraScale+ MPSoC 图像编码板zcu102

    1.1 xilinx zynqMp 架构 1.1.1 16nm 级别工艺 Zynq UltraScale+  MPSoC架构 Xilinx新一代Zynq针对控制.图像和网络应用推出了差异化的产品系,这 ...

  6. 多媒体开发之rtp打包---打包中的FU-A分包方式说明

    继上篇rtp中的时间戳和负载类型之后,升入到了nalu的分片打包问题,这里做下笔记 (1)fu-a的打包格式 1.基于RTP协议的打包及解包 (1)单个NAL打包 H.264NALU单元常由[star ...

  7. 安卓开发之json解析

    1.从网页获取json返回字符串 public class ReadNet extends AsyncTask<URL, Integer, String> { @Override      ...

  8. Android开发之json解析

    目前正在尝试着写app,发现看懂代码和能写出来差距很大,最关键的是java基础比较的差,因为只会python,java基础只学习了一个礼拜就过了.感觉java写出来的代码不如python简单明了. 上 ...

  9. iOS开发之JSON解析

    JSON解析步骤: - (NSArray *)products { if (_products == nil) { //第一步:获取JSON文件的路径: NSString *path = [[NSBu ...

随机推荐

  1. c# Thread类

    现在C#已经建议摈弃使用 Suspend, Resume 暂停/恢复线程, 也尽量少用 Abort方法中断一个线程. 建议使用线程的同步手段有:  Mutex.ManualResetEvent.Aut ...

  2. C#根据经纬度获取物理地址

    废话不多说,直接上代码: 1.首先新建几个类,定义一些属性: public class BaiDuGeoCoding { public int Status { get; set; } public ...

  3. iOS 动画笔记 (一)

    你也肯定喜欢炫酷的动画! 在APP中,动画就是一个点睛之笔!可以给用户增加一些独特的体验感,估计也有许多的和我一样的,看着那些觉得不错的动画,也就只能流口水的孩子,毕竟可能不知道从哪里下手去写!动画学 ...

  4. bzoj 1412: [ZJOI2009]狼和羊的故事

    http://www.lydsy.com/JudgeOnline/problem.php?id=1412 超级源点连向所有的狼,超级汇点连向所有羊,流量为INF 相邻连边流量为1,最小割 #inclu ...

  5. 在Bonobo服务器里创建Repository(库)

    新建Repository步骤如下: 点击“库”链接,进入“库管理”页面,如下图所示: 在“库管理”页面点击“创建新库”按钮,进入“创建新库”页面,如下图所示: 点击“建立”按钮,会进入“库管理”页面, ...

  6. Learn How To Attach PL/SQL Library In Oracle Forms

    To attach a PL/SQL library in the Oracle Forms follow the following steps:1. Click on Attached Libra ...

  7. FAB使用在CoordinatorLayout的隐藏动画

    import android.content.Context; import android.os.Build; import android.support.design.widget.Coordi ...

  8. 【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of 'JmsMessagingTemplate' type found

    使用ActiveMQ过程中,定义消息生产者: package com.sxd.jms.producer; import org.springframework.beans.factory.annota ...

  9. (原创)lightgbm 一些错误情况处理

    1.做多分类问题时候(mutticlass),如果遇到 lightgbm.basic.LightGBMError: b'Number of classes should be specified an ...

  10. 2016.3.23 集成新版activiti-modeler(5.17+)到项目中

    书:<activiti实战> 博客: http://www.kafeitu.me/activiti/2013/03/10/integrate-activiti-modeler.html h ...