H265封装成RTP流(一)

H265封装成RTP流是比较复杂的一件事情,需要一些基础知识才行,首先需要了解一些H265的知识,这里介绍的H265的头信息识识,主要来源于官方的文档《T-REC-H.265-201410-I!!PDF-E.pdf》,主要内容为第7章的内容。

H265码流开头,为00 00 00 01 ,后面跟两个字节的nal_unit_header。Nal_unit_header头的结构为:

+------------------+------------------+

|0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|F|    Type      |      LayerId | TID |

+-----------------+-------------------+

对字段的解释,还是用英文吧,

forbidden_zero_bit shall be equal to 0

nal_unit_type specifies the type of RBSP data structure contained in the NAL unit as specified in Table 7-1.

nal_unit_type     Name of nal_unit_type Content of NAL unit and RBSP syntax structure NAL unit type class
0 TRAIL_N Coded slice segment of a non-TSA, non-STSA trailing picture VCL

1  TRAIL_R slice_segment_layer_rbsp( )

2 TSA_N Coded slice segment of a TSA picture VCL

3 TSA_R slice_segment_layer_rbsp( )

4 STSA_N Coded slice segment of an STSA picture VCL

5 STSA_R slice_segment_layer_rbsp( )

6 RADL_N Coded slice segment of a RADL picture       VCL

7 RADL_R slice_segment_layer_rbsp( )

8 RASL_N Coded slice segment of a RASL picture VCL

9 RASL_R slice_segment_layer_rbsp( )
 
10 RSV_VCL_N10 Reserved non-IRAP SLNR VCL NAL unit types VCL

12 RSV_VCL_N12

14 RSV_VCL_N14

11  RSV_VCL_R11 Reserved non-IRAP sub-layer reference VCL NAL unit types VCL

13  RSV_VCL_R13

15 RSV_VCL_R15
 
16  BLA_W_L Coded slice segment of a BLA picture  VCL

17  P BLA_W_RADL slice_segment_layer_rbsp( )

18 BLA_N_LP
 
19  IDR_W_RADL   Coded slice segment of an IDR picture VCL

20 IDR_N_LP slice_segment_layer_rbsp( )

21 CRA_NUT Coded slice segment of a CRA picture VCL

slice_segment_layer_rbsp( )

22  RSV_IRAP_VCL22 Reserved IRAP VCL NAL unit types VCL

23 RSV_IRAP_VCL23
 
24..31 RSV_VCL24..  Reserved non-IRAP VCL NAL unit types VCL

RSV_VCL31

32 VPS_NUT Video parameter set video_parameter_set_rbsp( ) non-VCL

33 SPS_NUT Sequence parameter set seq_parameter_set_rbsp( ) non-VCL

34 PPS_NUT Picture parameter set pic_parameter_set_rbsp( ) non-VCL

35 AUD_NUT Access unit delimiter access_unit_delimiter_rbsp( ) non-VCL

36 EOS_NUT End of sequence end_of_seq_rbsp( ) non-VCL

37 EOB_NUT End of bitstream end_of_bitstream_rbsp( ) non-VCL

38 FD_NUT Filler data filler_data_rbsp( ) non-VCL

39  PREFIX_SEI_NUT Supplemental enhancement information sei_rbsp( ) non-VCL

40   SUFFIX_SEI_NUT

41..47 RSV_NVCL41..  Reserved non-VCL

RSV_NVCL47

48..63 UNSPEC48.. Unspecified       non-VCL

UNSPEC63

LayerId:6 bits

nuh_layer_id:Required to be equal to zero in [HEVC]. It isanticipatedthat in future scalable or 3D video codingextensionsof this specification, this syntax element will be used toidentify additional layers that may be present in the codedvideo sequence, wherein a layer may be, e.g. a spatial scalablelayer, a quality scalable layer, a texture view, or a depthview.

TID: 3bits

nuh_temporal_id_plus1.This field specifies the temporal identifierof the NAL unit plus 1. The value of TemporalId is equal toTID minus 1. A TID value of 0 is illegal to ensure thatthere is at least one bit in the NAL unit header equal to 1, so toenable independent considerations of start code emulationsin the NAL unit header and in the NAL unit payload data.

H265封装成RTP流(一)相关推荐

  1. 将NALU封装成RTP包

    源码地址:https://github.com/zhouyinfei/rtsp-netty-server NALU封装成RTP包: //nalu封装成rtp public List<byte[] ...

  2. H265打包成RTP

    本篇介绍一下H265怎么打包RTP,在H265中,每一个前缀码00000001后面跟随的前两个字节为NALU的语法元素,总体结构如下 这两个字节字段分布如下,F(forbidden_zero_bit) ...

  3. H265打包成RTP包详解

    在我们的高清视频传输中,一般都需要对视频信息进行指定协议的打包,RTP是比较常用的一种视频打包负载传输方式,那么具体是怎么打包的呢?今天就简单介绍一下. 1.H265的结构 在H265中,每一个前缀码 ...

  4. 最简单的h264/h265/svac和g711封装成ps流符合gb28181过检码流要求

    最近做国标级联,鼓捣了个简单的ps流封装,做分享做笔记. #include <stdint.h> #include <string> #include <memory.h ...

  5. 将H264码流打包成RTP包

    分类: 流媒体(25) 版权声明:本文为博主原创文章,未经博主允许不得转载. H264码流打包成RTP包的代码如下: [cpp] view plaincopy #include <stdio.h ...

  6. H264码流打包成RTP包

    http://blog.csdn.net/tanningzhong/article/details/53281986 H264码流打包成RTP包的代码如下: [cpp] view plaincopy ...

  7. PS封装H264码流

    H264的PS封装 一个完整的ps包封装: PSheader + PS system header + PS system Map + PES header + h264 data 因为一般视频数据都 ...

  8. wireshark 抓ps 流_wireshark抓取rtp流保存为.264文件并播放

    注:此文章含转载内容,如侵权,请联系我来删除: 在调试vlc播放器播放rtp时,由于出现卡顿,所以想把rtp流保存下来播放,看是否是rtp推的问题还是电脑解码问题.网上看到的类似文章,我都没成功,最后 ...

  9. H264编码 封装成MP4格式 视频流 RTP封包

    From:http://www.cnblogs.com/ghw-NO1/archive/2012/08/28/2660848.html 一.概述 本文讲述的是对H264编码且封装成MP4格式的视频流进 ...

最新文章

  1. 开源Jekyll助您构建你的网站
  2. 如何让Python不回显获取密码输入
  3. SQL Server 2008基于策略的管理
  4. 了解ViewConfiguration
  5. Linux下dislocate命令用法,五个超酷Linux命令
  6. ASP.NET实现推送文件到浏览器的方法
  7. 【转】JAVA 调用Web Service的方法
  8. Scala 面向对象编程
  9. lampp mysql 等待响应时间很长_Apache 打开网页的时候等待时间过长的解决方案
  10. C#图解教程读书笔记(第3章 类型、存储及变量)
  11. FCN论文-语义分割
  12. linux服务器raid逻辑盘迁移,raid空闲盘的热迁移
  13. [label][responsive-web-design]网页响应测试各种尺寸的工具
  14. 华硕服务器 u盘安装系统,华硕台式机重装系统详细图解步骤
  15. Maven安装和配置详细教程
  16. nxp单片机入门_ST、NXP、Microchip、TI、Renesas公司的MCU和MPU定位、性能及特点
  17. 【百度地图】百度地图完全模仿链家找房,三级下钻联动聚合,画圈找房!
  18. 设置部署服务器的运行端口,以太坊swarm配置bzz运行常见问题解决方案
  19. 山东省计算机应用能力等级考试,山东省2017年9月全国计算机等级考试报名时间...
  20. U盘有占用空间,但无文件或者都变成了快捷方式

热门文章

  1. 目标检测经典论文——R-CNN论文翻译:Rich feature hierarchies for accurate object detection and semantic segmentation
  2. 统计咨询:决定系数(R方)是否越大越好?
  3. linux如何关闭硬件加速,启用硬件加速是什么意思?如何关闭【详解】
  4. MSP430F5529-定时器介绍
  5. VLC软件转换音频、视频格式
  6. Flutter网络请求
  7. 【webrtc】 CongestionControlHandler 的 RTC_DCHECK_RUN_ON(sequenced_checker_);
  8. 首例共享单车身故赔偿警示,骑车时想过谁能为你的安全买单吗?
  9. UltraEdit 使用技巧笔记(转)
  10. Snell定律(折射定律)之导数的应用