rfc3984

合集下载

浙江大华DH650平台设备接入协议

浙江大华DH650平台设备接入协议

DH650平台设备接入协议1.概述DH650平台设备接入协议(后面简称本协议)描述DH650平台的设备接入协议,规定了设备接入DH650平台进行通信时的命令和数据交互的细节。

本协议引用到的相关规范:z IETF RFC 2616: "Hypertext Transfer Protocol – HTTP/1.1", Fielding R. et al., June 1999.z"Extensible Markup Language (XML) 1.0 Specification (Second Edition)", T. Bray, J. Paoli, C. M. Sperberg-McQueen, E. Maler, 6 October 2000.z IETF RFC 2326: "Real Time Streaming Protocol (RTSP)", Schulzrinne H., Rao A. and Lanphier R., April 1998.z IETF RFC 2327: "SDP: Session Description Protocol", Handley M., Jacobson V. and Perkins C., April 1998.z IETF RFC 3550: "RTP: A Transport Protocol for Real-Time Applications", Schulzrinne H. et al., January 1996.z IETF RFC 3016: "RTP Payload Format for MPEG-4 Audio/Visual Streams", Kikuchi Y. et al., November 2000.z IETF RFC 3984: "RTP Payload Format for H.264 Video", Wenger S. et al, February 2005.2.协议整体设计2.1. 通讯协议组成通讯协议由一个命令通道和零到多个数据通道组成。

公共安全视频监控建设联网应用服务方案

公共安全视频监控建设联网应用服务方案

公共安全视频监控建设联网应用服务方案1.项目设计原则本项目整体设计上体现科学性、合理性、高效性和前瞻性原则。

要求系统的技术路线和宏观规划上应与国内外公安科学技术发展趋势紧密结合。

采用先进指导思想与技术路线,使系统体现一定的前瞻性,保持一定的先进性。

结合本项目建设的特点,要充分合理利用现有建设系统资源,保护用以往建设投资。

通过技术上和管理体制上的先进性和前瞻性来保障公安视频信息高度共享和综合利用,实现管理与服务相结合、公安业务信息能与其他相关信息系统的互联互通。

系统应能够支持今后各项业务功能的兼容性和可移植性,系统应具备易用、安全、可靠、稳定等特性,系统具备一定的数据冗余备份容灾能力;工程建设应充分考虑到系统建设的整体性、实用性、开放性和连续性;系统建成后应具备稳定可靠、易用、易维护、并能保证系统长久高效的生命力和后续建设的可持续性。

本项目在统一规划、统筹建设、分步实施的基础上,合理配置各项资源、服务,充分利用支队原有已经建成的公安图像资源,充分利旧、合理配置,整体统筹的实现所涉及的各项子系统的信息集成、协调控制与综合管理。

2.项目背景近年来,随着改革的持续深化、人口居住的集中化、汽车保有量的迅猛增长,基层治安方面出现一些新的问题,各类社会矛盾和冲突逐步增多,新的形势对基层治安综合治理工作提出更高的要求。

为推进基层治安综合治理,国家下发了多个政策文件指导平安建设。

中共中央办公厅、国务院办公厅印发《关于加强社会治安防控体系建设的意见》,提出网格化管理和社会化服务,在做好治安防控的同时服务好人民群众。

中央综合办等九部委印发《关于加强公共安全视频监控建设联网应用工作的若干意见》,市政府《关于全面深化平安北京建设的意见》(京发(2014)15号)市委办公厅,市政府办公厅《关于加强首都立体化社会治安防控体系建设的实施意见》(京办发(2016)2号),根据中央综治办,国家发改委等中央9部委《关于加强公共安全视频监控建设联网应用工作的若干意见》(发改高技(2015)996号)和国家发改委中央综治办公安部《关于印发加强公共安全视频监控建设联网应用工作方案(2015-2020年)的通知》(发改办高技术[2015]2056号),根据《北京市发展改革委员会首都社会治安综合治理委员会办公室,北京市公安局关于印发北京市公共安全视频监控建设联网应用实施方案(2015-2020)年的通知》(京发改[2016]1596号)《北京市公共安全视频监控建设联网总体技术规划》[关于印发《公共安全视频监控建设联网应用工作实施方案(2016-2020年)》的通知]的要求,突显公共安全视频监控建设联网应用在治安防范、社会管理、服务民生等方面发挥的积极作用。

H264 视频文件 帧格式 传输封装等 杂碎

H264 视频文件 帧格式 传输封装等 杂碎

rfc3984Standards Track [Page 2] RFC 3984 RTP Payload Format for H.264 Video February 2005 1.按照RFC3984协议实现H264视频流媒体nalu单元包起始0x 00 00 00 01H.264 NAL格式及分析器/zsw%5Fdavy/b ... c409cc7cd92ace.html/zsw_davy/blo ... 081312c8fc7acc.html----------------------------------比特流信息----------------------------------------------①NALU(Network Abstract Layer Unit):两标准中的比特流都是以NAL为单位,每个NAL 单元包含一个RBSP,NALU的头信息定义了RBSP所属类型。

类型一般包括序列参数集(SPS)、图像参数集(PPS)、增强信息(SEI)、条带(Slice)等,其中,SPS和PPS 属于参数集,两标准采用参数集机制是为了将一些主要的序列、图像参数(解码图像尺寸、片组数、参考帧数、量化和滤波参数标记等)与其他参数分离,通过解码器先解码出来。

此外,为了增强图像的清晰度,AVS-M添加了图像头(Picture head)信息。

读取NALU流程中,每个NALU前有一个起始码0x000001,为防止内部0x000001序列竞争,H.264编码器在最后一字节前插入一个新的字节——0x03,所以解码器检测到该序列时,需将0x03删掉,而AVS-M只需识别出起始码0x000001。

②读取宏块类型(mb type)和宏块编码模板(cbp):编解码图像以宏块划分,一个宏块由一个16*16亮度块和相应的一个8*8cb和一个8*8cr色度块组成。

(a) 两标准的帧内、帧间预测时宏块的划分是有区别的。

计算视频播放的时间(pts)

计算视频播放的时间(pts)

计算视频播放的时间(pts)在解码视频流的时候对每⼀个视频帧都会有⼀个时间戳pts(显⽰时间戳),得到这个pts的值,并记下最开始的⼀个pts值(pts_00),以后画⾯显⽰的时间就可以⽤当前播放的帧的时间戳(pts_now -pts_00)/90000获得了,单位是秒,⾄于为什么是除以90000,这个问题还不清楚,我会继续跟踪下去,哈哈A: RFC3984 规定采⽤ 90000 Hz 的时钟,因此如果编码帧频是 30,那么时间戳间隔就该是 90000 / 30 = 3000,根据抓包来看,似乎时间戳间隔的确是 3000。

时间戳的间隔不固定,⽐如有的时间戳间隔是 2990 有的是 3002,会导致解析出来的视频快播的效果么参考⽹页:问题是这样的⽤⼀个 VLC(流媒体客户端) 去请求流媒体服务器上的数据,但是获得的数据播放速度明显快于1倍速,⼤概是 timestamp 不对,不知道是服务器的错误,还是客户端解码时出错,总感觉服务器那边有问题,由于服务器端是客户端提供的,客户说是我们的问题,我还不知道如何证明是谁的错。

A:RFC3984 规定采⽤ 90000 Hz 的时钟,因此如果编码帧频是 30,那么时间戳间隔就该是 90000 / 30 = 3000,根据抓包来看,似乎时间戳间隔的确是 3000。

时间戳的间隔不固定,⽐如有的时间戳间隔是 2990 有的是 3002,会导致解析出来的视频快播的效果么Q:各位⼤侠好:我现在正在开发视频实时流播放,简单的过程如下:采集视频流 -> 视频流转换为Sorenson H.263编码格式 -> 把编码的实时流通过RTMP协议发送 -> flash客户端进⾏播放。

现在我的时间戳颗粒是这样⽣成的:第⼀帧的时间戳为0;第⼆帧的时间戳的算法为:第⼀个字符编码的当前时间 - 上⼀帧第⼀个字符编码的当前时间根据这个时间颗粒的算法,我在flash客户端播放就会产⽣延时。

UDP数据包大小

UDP数据包大小
第二个限制来自于TCP/IP的内核实现。可能存在一些实现特性(或差错),使IP数据报长度小于65535字节。
在SunOS 4.1.3下使用环回接口的最大IP数据报长度是32767字节。比它大的值都会发生差错。
但是从BSD/386到SunOS 4.1.3的情况下,Sun所能接收到最大IP数据报长度为32786字节(即32758字节用户数据)。
实际地址 F0-4D-A2-5C-FF-65
IP 地址 192.168.1.108
子网掩码 255.255.255.0
默认网关 192.168.1.254
DHCP 服务器 192.168.1.254
获得了租约 2012-11-26 172755
租约过期 2012-11-27 172755
由于IP能够发送或接收特定长度的数据报并不意味着接收应用程序可以读取该长度的数据。因此,UDP编程接口允许应用程序指定每次返回的最大字节数。如果接收到的数据报长度大于应用程序所能处理的长度,那么会发生什么情况呢?不幸的是,该问题的答案取决于编程接口和实现。
典型的Berkeley版socket API对数据报进行截断,并丢弃任何多余的数据。应用程序何时能够知道,则与版本有关(4.3BSD Reno及其后的版本可以通知应用程序数据报被截断)。
在Solaris 2.2下使用环回接口,最大可收发IP数据报长度为65535字节。
从Solaris 2.2到AIX 3.2.2,发送的最大IP数据报长度可以是65535字节。很显然,这个限制与源端和目的端的实现有关。
主机必须能够接收最短为576字节的IP数据报。在许多UDP应用程序的设计中,其应用程序数据被限制成512字节或更小,因此比这个限制值小。

【一文弄懂RFC6184】

【一文弄懂RFC6184】

H.264(AVC:Advanced Video Coding)是目前应用广泛的视频编码格式,而为了让H.264能在网络环境中进行传输,需要将之封装为RTP包,协议RFC6184就是描述如何定义这些RTP包的。

RFC6184废弃了RFC3984,是目前最新的协议标准。

简介H.264标准协议定义了两种不同的类型:一种称为VCL(Video Coding Layer),另一种称为NAL(Network Abstraction Layer)。

为了在网络上进行传输,NAL Encoder会将VCL Encoder输出的内容(slice)封装称为NALUs (NAL Units),然后再封包(如RTP包)进行传输。

NALU的格式如下:F(1 bit):如果是坏帧,则置1。

否则为0。

NRI(2 bit):如果是00,则表示此帧即使丢失了,也不影响解码;其他值则表示此帧如果丢失了,会影响解码。

Type(5 bit):NAL Unit的类型。

RTP包格式RTP头格式在RFC3550协议中定义,其中与H.264相关的字段如下:M(1 bit):表示此RTP包是NAL的最后一个RTP包。

PT(7 bits):动态映射的payload type的值,通常在SDP中完成协商。

Sequence number(16 bits):单调递增,同时也表示了解码的顺序。

timestamp(32 bits):NALU的采样时间,时钟频率是90k。

RTP负载格式根据NALU和RTP包大小,定义了三种不同的负载格式。

如下:Single NAL Unit:仅包含一个NALU。

Aggregation Unit:包含多个NALU,其中包含四种类型:STAP-A, STAP-B, MTAP16, MTAP24。

Fragmentation Unit:当一个NALU太大导致无法放入一个RTP包时,会使用这种格式。

NALU type与各个负载格式的对应关系如下:根据不同的使用场景,定义了三种不同的封包模式。

Android手机视频采集与传输软件设计

Android手机视频采集与传输软件设计

有线电视技术1引言目前,Android 操作系统是世界上最流行的手机操作系统之一,它在智能手机市场的占有率达到40%以上。

越来越多的人开始使用Android 智能手机,而基本上Android 手机都自带摄像头,可以实现拍照、录像等功能。

但一般情况下,拍的照片或者录像在当时只能自己才能看到。

如果想发给远方的亲朋好友,要通过彩信或者3G 视频电话等功能实现,这样做不仅资费高,而且十分不便。

本文的设计思想是利用Andro id 手机的摄像头,调用多媒体框架OpenCo re 实现视频采集[1]、编码,并通过RTP 协议把视频打包发送到PC 客户端[2]。

利用手机3G 传输网络,实现手机拍摄、PC 客户端观看视频的功能。

2Ope nCore 多媒体框架2.1O pe nCore 概述OpenCore 的另一个常用称呼是PacketVideo ,它是Andro id 的多媒体核心,是Andro id 框架的软件层名称。

OpenCo re 的代码非常庞大,是基于C++实现的,定义了全功能的操作系统移植层,各种基本功能均被封装成为类的形式,各层次之间的接口一般使用继承方式。

OpenCo re 从宏观上面看,主要包含两大方面内容:(1)PV Play er :提供媒体播放功能,完成各种音频、视频流的回放。

(2)PV Author :提供媒体流记录的功能,完成各种音频、视频流以及静态图像的捕获。

为了更好的组织整体架构,OpenCo re 在软件层宏观上面分为几个层次。

具体分层如下:(1)OSCL :是操作系统兼容库,包含一些操作系统底层的操作,以便于更好的在不同的操作系统之间移植。

包含了基本数据类型、配置、字符串工具、IO 等,类似基础的C++库。

(2)PV MF :PV 多媒体框架,在框架内实现文件解析和编码器接口。

(3)PV Play er 引擎:驱动PVPlayer 运行。

(4)PV Author 引擎:驱动PVAuthor 运行。

rtsp协议,c语言

rtsp协议,c语言

竭诚为您提供优质文档/双击可除rtsp协议,c语言篇一:Rtsp协议学习笔记第一部分:总体概述一、流媒体概念流媒体包含广义和狭义两种内涵:广义上的流媒体指的是使音频和视频形成稳定和连续的传输流和回放流的一系列技术、方法和协议的总称,即流媒体技术;狭义上的流媒体是相对于传统的下载-回放方式而言的,指的是一种从internet上获取音频和视频等多媒体数据的新方法,它能够支持多媒体数据流的实时传输和实时播放。

通过运用流媒体技术,服务器能够向客户机发送稳定和连续的多媒体数据流,客户机在接收数据的同时以一个稳定的速率回放,而不用等数据全部下载完之后再进行回放。

二、流媒体协议实时传输协议(Real-timetransportprotocol,Rtp)是在internet上处理多媒体数据流的一种网络协议,利用它能够在一对一(unicast,单播)或者一对多(multicast,多播)的网络环境中实现传流媒体数据的实时传输。

Rtp通常使用udp来进行多媒体数据的传输,但如果需要的话可以使用tcp或者atm等其它协议,整个Rtp协议由两个密切相关的部分组成:Rtp数据协议和Rtp控制协议。

实时流协议(Realtimestreamingprotocol,Rtsp)最早由Realnetworks 和netscape公司共同提出,它位于Rtp和Rtcp之上,其目的是希望通过ip网络有效地传输多媒体数据。

实时流传输协议Rtsp(Real-timestreamingprotocol,RFc2326)、实时传输协议(RtpReal-timetransferprotocol,RFc3550)、实时传输控制协议(RtcpReal-timetransportcontrolprotocol,RFc1889)、会话描述协议(sdpsessiondescriptionprotocol,RFc2327)。

目前在流媒体传输技术中使用最多的就是基于Rtsp/Rtp的流媒体传输。

rfc相关设置及使用

rfc相关设置及使用

rfc相关设置及使用RFC(Request for Comments)是一种用于定义互联网协议、标准和相关问题的文档。

RFC的格式由互联网工程任务组(IETF)统一规定,它们记录了网络技术的发展和演进过程。

在本文中,我们将介绍RFC相关的设置和使用。

1. 了解RFC的作用和历史:RFC是由IETF组织制定的一种标准化文档,它记录了互联网协议的设计、开发和演化过程。

RFC起源于20世纪60年代的ARPANET,是一种社区驱动的文档,通过共享和讨论来推动互联网技术的发展。

RFC文档旨在提供指南、建议和最佳实践,帮助网络技术人员解决问题。

2. 寻找和阅读RFC文档:RFC文档可以在互联网上免费获取,IETF的官方网站和其他资源库都有存档。

这些文档按照顺序编号,并且以RFC开头,比如RFC 791定义了IPv4协议。

通过搜索引擎或在IETF网站上使用关键词搜索,可以找到特定主题的RFC文档。

阅读RFC文档时,应该注意文档的状态,有一些可能已经被更新或废弃。

3. 使用RFC文档:RFC文档在网络技术的发展过程中起着重要的指导作用。

它们提供了协议规范、算法实现、安全性和隐私等方面的建议。

网络管理员、网络工程师和开发人员可以使用RFC文档来了解和理解特定协议或标准的设计原理和要求。

此外,RFC文档还常用于进行互联网协议的实现、编程和配置。

4. 参与RFC的制定过程:RFC并不是静止的文件,而是一个持续演进的过程。

任何人都可以参与到RFC的制定过程中。

要参与RFC的制定,可以加入IETF并参与相关的工作组或邮件列表。

通过这种方式,个人可以提出改进建议,参与讨论和标准化的制定。

5. 遵循RFC的指导原则:在网络技术领域,遵循RFC的指导原则是至关重要的。

这些指导原则包括设计原则、协议分层、安全性和互操作性等要求。

遵循RFC的指导原则可以确保网络协议的正确性、稳定性和可靠性,同时也可以促进网络技术的发展和创新。

总结起来,RFC在互联网技术领域起着重要的作用,它们记录了互联网协议的发展历程和指导原则。

rfc3984.RTP Payload Format for H.264 Video

rfc3984.RTP Payload Format for H.264 Video

Network Working Group S. Wenger Request for Comments: 3984 M.M. Hannuksela Category: Standards Track T. Stockhammer M. Westerlund D. Singer February 2005 RTP Payload Format for H.264 VideoStatus of This MemoThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol. Distribution of this memo is unlimited.Copyright NoticeCopyright (C) The Internet Society (2005).AbstractThis memo describes an RTP Payload format for the ITU-TRecommendation H.264 video codec and the technically identicalISO/IEC International Standard 14496-10 video codec. The RTP payload format allows for packetization of one or more Network AbstractionLayer Units (NALUs), produced by an H.264 video encoder, in each RTP payload. The payload format has wide applicability, as it supportsapplications from simple low bit-rate conversational usage, toInternet video streaming with interleaved transmission, to high bit- rate video-on-demand.Table of Contents1. Introduction (3)1.1. The H.264 Codec (3)1.2. Parameter Set Concept (4)1.3. Network Abstraction Layer Unit Types (5)2. Conventions (6)3. Scope (6)4. Definitions and Abbreviations (6)4.1. Definitions (6)5. RTP Payload Format (8)5.1. RTP Header Usage (8)5.2. Common Structure of the RTP Payload Format (11)5.3. NAL Unit Octet Usage (12)Wenger, et al. Standards Track [Page 1]5.4. Packetization Modes (14)5.5. Decoding Order Number (DON) (15)5.6. Single NAL Unit Packet (18)5.7. Aggregation Packets (18)5.8. Fragmentation Units (FUs) (27)6. Packetization Rules (31)6.1. Common Packetization Rules (31)6.2. Single NAL Unit Mode (32)6.3. Non-Interleaved Mode (32)6.4. Interleaved Mode (33)7. De-Packetization Process (Informative) (33)7.1. Single NAL Unit and Non-Interleaved Mode (33)7.2. Interleaved Mode (34)7.3. Additional De-Packetization Guidelines (36)8. Payload Format Parameters (37)8.1. MIME Registration (37)8.2. SDP Parameters (52)8.3. Examples (58)8.4. Parameter Set Considerations (60)9. Security Considerations (62)10. Congestion Control (63)11. IANA Considerations (64)12. Informative Appendix: Application Examples (65)12.1. Video Telephony according to ITU-T Recommendation H.241Annex A (65)12.2. Video Telephony, No Slice Data Partitioning, No NALUnit Aggregation (65)12.3. Video Telephony, Interleaved Packetization Using NALUnit Aggregation (66)12.4. Video Telephony with Data Partitioning (66)12.5. Video Telephony or Streaming with FUs and ForwardError Correction (67)12.6. Low Bit-Rate Streaming (69)12.7. Robust Packet Scheduling in Video Streaming (70)13. Informative Appendix: Rationale for Decoding Order Number (71)13.1. Introduction (71)13.2. Example of Multi-Picture Slice Interleaving (71)13.3. Example of Robust Packet Scheduling (73)13.4. Robust Transmission Scheduling of Redundant CodedSlices (77)13.5. Remarks on Other Design Possibilities (77)14. Acknowledgements (78)15. References (78)15.1. Normative References (78)15.2. Informative References (79)Authors’ Addresses (81)Full Copyright Statement (83)Wenger, et al. Standards Track [Page 2]1. Introduction1.1. The H.264 CodecThis memo specifies an RTP payload specification for the video coding standard known as ITU-T Recommendation H.264 [1] and ISO/IECInternational Standard 14496 Part 10 [2] (both also known as Advanced Video Coding, or AVC). Recommendation H.264 was approved by ITU-T on May 2003, and the approved draft specification is available forpublic review [8]. In this memo the H.264 acronym is used for thecodec and the standard, but the memo is equally applicable to theISO/IEC counterpart of the coding standard.The H.264 video codec has a very broad application range that covers all forms of digital compressed video from, low bit-rate Internetstreaming applications to HDTV broadcast and Digital Cinemaapplications with nearly lossless coding. Compared to the currentstate of technology, the overall performance of H.264 is such thatbit rate savings of 50% or more are reported. Digital Satellite TVquality, for example, was reported to be achievable at 1.5 Mbit/s,compared to the current operation point of MPEG 2 video at around 3.5 Mbit/s [9].The codec specification [1] itself distinguishes conceptually between a video coding layer (VCL) and a network abstraction layer (NAL).The VCL contains the signal processing functionality of the codec;mechanisms such as transform, quantization, and motion compensatedprediction; and a loop filter. It follows the general concept ofmost of today’s video codecs, a macroblock-based coder that usesinter picture prediction with motion compensation and transformcoding of the residual signal. The VCL encoder outputs slices: a bit string that contains the macroblock data of an integer number ofmacroblocks, and the information of the slice header (containing the spatial address of the first macroblock in the slice, the initialquantization parameter, and similar information). Macroblocks inslices are arranged in scan order unless a different macroblockallocation is specified, by using the so-called Flexible MacroblockOrdering syntax. In-picture prediction is used only within a slice. More information is provided in [9].The Network Abstraction Layer (NAL) encoder encapsulates the sliceoutput of the VCL encoder into Network Abstraction Layer Units (NALunits), which are suitable for transmission over packet networks oruse in packet oriented multiplex environments. Annex B of H.264defines an encapsulation process to transmit such NAL units overbyte-stream oriented networks. In the scope of this memo, Annex B is not relevant.Wenger, et al. Standards Track [Page 3]Internally, the NAL uses NAL units. A NAL unit consists of a one-byte header and the payload byte string. The header indicates thetype of the NAL unit, the (potential) presence of bit errors orsyntax violations in the NAL unit payload, and information regarding the relative importance of the NAL unit for the decoding process.This RTP payload specification is designed to be unaware of the bitstring in the NAL unit payload.One of the main properties of H.264 is the complete decoupling of the transmission time, the decoding time, and the sampling orpresentation time of slices and pictures. The decoding processspecified in H.264 is unaware of time, and the H.264 syntax does not carry information such as the number of skipped frames (as is common in the form of the Temporal Reference in earlier video compressionstandards). Also, there are NAL units that affect many pictures and that are, therefore, inherently timeless. For this reason, thehandling of the RTP timestamp requires some special considerationsfor NAL units for which the sampling or presentation time is notdefined or, at transmission time, unknown.1.2. Parameter Set ConceptOne very fundamental design concept of H.264 is to generate self-contained packets, to make mechanisms such as the header duplication of RFC 2429 [10] or MPEG-4’s Header Extension Code (HEC) [11]unnecessary. This was achieved by decoupling information relevant to more than one slice from the media stream. This higher layer metainformation should be sent reliably, asynchronously, and in advancefrom the RTP packet stream that contains the slice packets.(Provisions for sending this information in-band are also availablefor applications that do not have an out-of-band transport channelappropriate for the purpose.) The combination of the higher-levelparameters is called a parameter set. The H.264 specificationincludes two types of parameter sets: sequence parameter set andpicture parameter set. An active sequence parameter set remainsunchanged throughout a coded video sequence, and an active pictureparameter set remains unchanged within a coded picture. The sequence and picture parameter set structures contain information such aspicture size, optional coding modes employed, and macroblock to slice group map.To be able to change picture parameters (such as the picture size)without having to transmit parameter set updates synchronously to the slice packet stream, the encoder and decoder can maintain a list ofmore than one sequence and picture parameter set. Each slice header contains a codeword that indicates the sequence and picture parameter set to be used.Wenger, et al. Standards Track [Page 4]This mechanism allows the decoupling of the transmission of parameter sets from the packet stream, and the transmission of them by external means (e.g., as a side effect of the capability exchange), or through a (reliable or unreliable) control protocol. It may even be possible that they are never transmitted but are fixed by an applicationdesign specification.1.3. Network Abstraction Layer Unit TypesTutorial information on the NAL design can be found in [12], [13],and [14].All NAL units consist of a single NAL unit type octet, which alsoco-serves as the payload header of this RTP payload format. Thepayload of a NAL unit follows immediately.The syntax and semantics of the NAL unit type octet are specified in [1], but the essential properties of the NAL unit type octet aresummarized below. The NAL unit type octet has the following format: +---------------+|0|1|2|3|4|5|6|7|+-+-+-+-+-+-+-+-+|F|NRI| Type |+---------------+The semantics of the components of the NAL unit type octet, asspecified in the H.264 specification, are described briefly below.F: 1 bitforbidden_zero_bit. The H.264 specification declares a value of1 as a syntax violation.NRI: 2 bitsnal_ref_idc. A value of 00 indicates that the content of the NAL unit is not used to reconstruct reference pictures for interpicture prediction. Such NAL units can be discarded withoutrisking the integrity of the reference pictures. Values greaterthan 00 indicate that the decoding of the NAL unit is required to maintain the integrity of the reference pictures.Type: 5 bitsnal_unit_type. This component specifies the NAL unit payload type as defined in table 7-1 of [1], and later within this memo. For a reference of all currently defined NAL unit types and theirsemantics, please refer to section 7.4.1 in [1].Wenger, et al. Standards Track [Page 5]This memo introduces new NAL unit types, which are presented insection 5.2. The NAL unit types defined in this memo are marked asunspecified in [1]. Moreover, this specification extends thesemantics of F and NRI as described in section 5.3.2. ConventionsThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [3]. This specification uses the notion of setting and clearing a bit when bit fields are handled. Setting a bit is the same as assigning that bit the value of 1 (On). Clearing a bit is the same as assigningthat bit the value of 0 (Off).3. ScopeThis payload specification can only be used to carry the "naked"H.264 NAL unit stream over RTP, and not the bitstream formatdiscussed in Annex B of H.264. Likely, the first applications ofthis specification will be in the conversational multimedia field,video telephony or video conferencing, but the payload format alsocovers other applications, such as Internet streaming and TV over IP.4. Definitions and Abbreviations4.1. DefinitionsThis document uses the definitions of [1]. The following terms,defined in [1], are summed up for convenience:access unit: A set of NAL units always containing a primary coded picture. In addition to the primary coded picture, an access unit may also contain one or more redundant coded pictures or other NAL units not containing slices or slice data partitions of a codedpicture. The decoding of an access unit always results in adecoded picture.coded video sequence: A sequence of access units that consists, in decoding order, of an instantaneous decoding refresh (IDR) access unit followed by zero or more non-IDR access units including allsubsequent access units up to but not including any subsequent IDR access unit.IDR access unit: An access unit in which the primary coded picture is an IDR picture.Wenger, et al. Standards Track [Page 6]IDR picture: A coded picture containing only slices with I or SIslice types that causes a "reset" in the decoding process. After the decoding of an IDR picture, all following coded pictures indecoding order can be decoded without inter prediction from anypicture decoded prior to the IDR picture.primary coded picture: The coded representation of a picture to be used by the decoding process for a bitstream conforming to H.264. The primary coded picture contains all macroblocks of the picture. redundant coded picture: A coded representation of a picture or a part of a picture. The content of a redundant coded picture shall not be used by the decoding process for a bitstream conforming to H.264. The content of a redundant coded picture may be used bythe decoding process for a bitstream that contains errors orlosses.VCL NAL unit: A collective term used to refer to coded slice andcoded data partition NAL units.In addition, the following definitions apply:decoding order number (DON): A field in the payload structure, or a derived variable indicating NAL unit decoding order. Values of DON are in the range of 0 to 65535, inclusive. After reaching the maximum value, the value of DON wraps around to 0.NAL unit decoding order: A NAL unit order that conforms to theconstraints on NAL unit order given in section 7.4.1.2 in [1].transmission order: The order of packets in ascending RTP sequence number order (in modulo arithmetic). Within an aggregationpacket, the NAL unit transmission order is the same as the orderof appearance of NAL units in the packet.media aware network element (MANE): A network element, such as amiddlebox or application layer gateway that is capable of parsing certain aspects of the RTP payload headers or the RTP payload and reacting to the contents.Informative note: The concept of a MANE goes beyond normalrouters or gateways in that a MANE has to be aware of thesignaling (e.g., to learn about the payload type mappings ofthe media streams), and in that it has to be trusted whenworking with SRTP. The advantage of using MANEs is that theyallow packets to be dropped according to the needs of the media coding. For example, if a MANE has to drop packets due tocongestion on a certain link, it can identify those packets Wenger, et al. Standards Track [Page 7]whose dropping has the smallest negative impact on the userexperience and remove them in order to remove the congestionand/or keep the delay low.AbbreviationsDON: Decoding Order NumberDONB: Decoding Order Number BaseDOND: Decoding Order Number DifferenceFEC: Forward Error CorrectionFU: Fragmentation UnitIDR: Instantaneous Decoding RefreshIEC: International Electrotechnical CommissionISO: International Organization for StandardizationITU-T: International Telecommunication Union,Telecommunication Standardization SectorMANE: Media Aware Network ElementMTAP: Multi-Time Aggregation PacketMTAP16: MTAP with 16-bit timestamp offsetMTAP24: MTAP with 24-bit timestamp offsetNAL: Network Abstraction LayerNALU: NAL UnitSEI: Supplemental Enhancement InformationSTAP: Single-Time Aggregation PacketSTAP-A: STAP type ASTAP-B: STAP type BTS: TimestampVCL: Video Coding Layer5. RTP Payload Format5.1. RTP Header UsageThe format of the RTP header is specified in RFC 3550 [4] andreprinted in Figure 1 for convenience. This payload format uses the fields of the header in a manner consistent with that specification. When one NAL unit is encapsulated per RTP packet, the RECOMMENDED RTP payload format is specified in section 5.6. The RTP payload (and the settings for some RTP header bits) for aggregation packets andfragmentation units are specified in sections 5.7 and 5.8,respectively.Wenger, et al. Standards Track [Page 8]0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | contributing source (CSRC) identifiers | | .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1. RTP header according to RFC 3550The RTP header information to be set according to this RTP payloadformat is set as follows:Marker bit (M): 1 bitSet for the very last packet of the access unit indicated by theRTP timestamp, in line with the normal use of the M bit in videoformats, to allow an efficient playout buffer handling. Foraggregation packets (STAP and MTAP), the marker bit in the RTPheader MUST be set to the value that the marker bit of the lastNAL unit of the aggregation packet would have been if it weretransported in its own RTP packet. Decoders MAY use this bit asan early indication of the last packet of an access unit, but MUST NOT rely on this property.Informative note: Only one M bit is associated with anaggregation packet carrying multiple NAL units. Thus, if agateway has re-packetized an aggregation packet into severalpackets, it cannot reliably set the M bit of those packets.Payload type (PT): 7 bitsThe assignment of an RTP payload type for this new packet formatis outside the scope of this document and will not be specifiedhere. The assignment of a payload type has to be performed either through the profile used or in a dynamic way.Sequence number (SN): 16 bitsSet and used in accordance with RFC 3550. For the single NALU and non-interleaved packetization mode, the sequence number is used to determine decoding order for the NALU.Timestamp: 32 bitsThe RTP timestamp is set to the sampling timestamp of the content.A 90 kHz clock rate MUST be used.Wenger, et al. Standards Track [Page 9]If the NAL unit has no timing properties of its own (e.g.,parameter set and SEI NAL units), the RTP timestamp is set to the RTP timestamp of the primary coded picture of the access unit inwhich the NAL unit is included, according to section 7.4.1.2 of[1].The setting of the RTP Timestamp for MTAPs is defined in section5.7.2.Receivers SHOULD ignore any picture timing SEI messages includedin access units that have only one display timestamp. Instead,receivers SHOULD use the RTP timestamp for synchronizing thedisplay process.RTP senders SHOULD NOT transmit picture timing SEI messages forpictures that are not supposed to be displayed as multiple fields. If one access unit has more than one display timestamp carried in a picture timing SEI message, then the information in the SEImessage SHOULD be treated as relative to the RTP timestamp, withthe earliest event occurring at the time given by the RTPtimestamp, and subsequent events later, as given by the difference in SEI message picture timing values. Let tSEI1, tSEI2, ...,tSEIn be the display timestamps carried in the SEI message of anaccess unit, where tSEI1 is the earliest of all such timestamps.Let tmadjst() be a function that adjusts the SEI messages timescale to a 90-kHz time scale. Let TS be the RTP timestamp. Then, the display time for the event associated with tSEI1 is TS. Thedisplay time for the event with tSEIx, where x is [2..n] is TS +tmadjst (tSEIx - tSEI1).Informative note: Displaying coded frames as fields is neededcommonly in an operation known as 3:2 pulldown, in which filmcontent that consists of coded frames is displayed on a display using interlaced scanning. The picture timing SEI messageenables carriage of multiple timestamps for the same codedpicture, and therefore the 3:2 pulldown process is perfectlycontrolled. The picture timing SEI message mechanism isnecessary because only one timestamp per coded frame can beconveyed in the RTP timestamp.Informative note: Because H.264 allows the decoding order to be different from the display order, values of RTP timestamps may not be monotonically non-decreasing as a function of RTPsequence numbers. Furthermore, the value for interarrivaljitter reported in the RTCP reports may not be a trustworthyindication of the network performance, as the calculation rules Wenger, et al. Standards Track [Page 10]for interarrival jitter (section 6.4.1 of RFC 3550) assume that the RTP timestamp of a packet is directly proportional to itstransmission time.5.2. Common Structure of the RTP Payload FormatThe payload format defines three different basic payload structures.A receiver can identify the payload structure by the first byte ofthe RTP payload, which co-serves as the RTP payload header and, insome cases, as the first byte of the payload. This byte is alwaysstructured as a NAL unit header. The NAL unit type field indicateswhich structure is present. The possible structures are as follows: Single NAL Unit Packet: Contains only a single NAL unit in thepayload. The NAL header type field will be equal to the original NAL unit type; i.e., in the range of 1 to 23, inclusive. Specified insection 5.6.Aggregation packet: Packet type used to aggregate multiple NAL units into a single RTP payload. This packet exists in four versions, the Single-Time Aggregation Packet type A (STAP-A), the Single-TimeAggregation Packet type B (STAP-B), Multi-Time Aggregation Packet(MTAP) with 16-bit offset (MTAP16), and Multi-Time Aggregation Packet (MTAP) with 24-bit offset (MTAP24). The NAL unit type numbersassigned for STAP-A, STAP-B, MTAP16, and MTAP24 are 24, 25, 26, and27, respectively. Specified in section 5.7.Fragmentation unit: Used to fragment a single NAL unit over multiple RTP packets. Exists with two versions, FU-A and FU-B, identifiedwith the NAL unit type numbers 28 and 29, respectively. Specified in section 5.8.Table 1. Summary of NAL unit types and their payload structuresType Packet Type name Section---------------------------------------------------------0 undefined -1-23 NAL unit Single NAL unit packet per H.264 5.624 STAP-A Single-time aggregation packet 5.7.125 STAP-B Single-time aggregation packet 5.7.126 MTAP16 Multi-time aggregation packet 5.7.227 MTAP24 Multi-time aggregation packet 5.7.228 FU-A Fragmentation unit 5.829 FU-B Fragmentation unit 5.830-31 undefined -Wenger, et al. Standards Track [Page 11]Informative note: This specification does not limit the size ofNAL units encapsulated in single NAL unit packets andfragmentation units. The maximum size of a NAL unit encapsulated in any aggregation packet is 65535 bytes.5.3. NAL Unit Octet UsageThe structure and semantics of the NAL unit octet were introduced in section 1.3. For convenience, the format of the NAL unit type octet is reprinted below:+---------------+|0|1|2|3|4|5|6|7|+-+-+-+-+-+-+-+-+|F|NRI| Type |+---------------+This section specifies the semantics of F and NRI according to thisspecification.F: 1 bitforbidden_zero_bit. A value of 0 indicates that the NAL unit type octet and payload should not contain bit errors or other syntaxviolations. A value of 1 indicates that the NAL unit type octetand payload may contain bit errors or other syntax violations.MANEs SHOULD set the F bit to indicate detected bit errors in the NAL unit. The H.264 specification requires that the F bit isequal to 0. When the F bit is set, the decoder is advised thatbit errors or any other syntax violations may be present in thepayload or in the NAL unit type octet. The simplest decoderreaction to a NAL unit in which the F bit is equal to 1 is todiscard such a NAL unit and to conceal the lost data in thediscarded NAL unit.NRI: 2 bitsnal_ref_idc. The semantics of value 00 and a non-zero valueremain unchanged from the H.264 specification. In other words, a value of 00 indicates that the content of the NAL unit is not used to reconstruct reference pictures for inter picture prediction.Such NAL units can be discarded without risking the integrity ofthe reference pictures. Values greater than 00 indicate that the decoding of the NAL unit is required to maintain the integrity of the reference pictures.In addition to the specification above, according to this RTPpayload specification, values of NRI greater than 00 indicate the relative transport priority, as determined by the encoder. MANEs Wenger, et al. Standards Track [Page 12]can use this information to protect more important NAL unitsbetter than they do less important NAL units. The highesttransport priority is 11, followed by 10, and then by 01; finally, 00 is the lowest.Informative note: Any non-zero value of NRI is handledidentically in H.264 decoders. Therefore, receivers need notmanipulate the value of NRI when passing NAL units to thedecoder.An H.264 encoder MUST set the value of NRI according to the H.264 specification (subclause 7.4.1) when the value of nal_unit_type is in the range of 1 to 12, inclusive. In particular, the H.264specification requires that the value of NRI SHALL be equal to 0for all NAL units having nal_unit_type equal to 6, 9, 10, 11, or12.For NAL units having nal_unit_type equal to 7 or 8 (indicating asequence parameter set or a picture parameter set, respectively), an H.264 encoder SHOULD set the value of NRI to 11 (in binaryformat). For coded slice NAL units of a primary coded picturehaving nal_unit_type equal to 5 (indicating a coded slicebelonging to an IDR picture), an H.264 encoder SHOULD set thevalue of NRI to 11 (in binary format).For a mapping of the remaining nal_unit_types to NRI values, thefollowing example MAY be used and has been shown to be efficientin a certain environment [13]. Other mappings MAY also bedesirable, depending on the application and the H.264/AVC Annex A profile in use.Informative note: Data Partitioning is not available in certain profiles; e.g., in the Main or Baseline profiles.Consequently, the nal unit types 2, 3, and 4 can occur only if the video bitstream conforms to a profile in which datapartitioning is allowed and not in streams that conform to the Main or Baseline profiles.Table 2. Example of NRI values for coded slices and coded slicedata partitions of primary coded reference picturesNAL Unit Type Content of NAL unit NRI (binary)----------------------------------------------------------------1 non-IDR coded slice 102 Coded slice data partition A 103 Coded slice data partition B 014 Coded slice data partition C 01 Wenger, et al. Standards Track [Page 13]。

rfc相关设置及使用

rfc相关设置及使用

rfc相关设置及使用摘要:一、RFC简介1.RFC的含义2.RFC的作用二、RFC相关设置1.RFC文件的存放位置2.RFC文件的命名规则3.RFC文件的权限设置三、RFC的使用方法1.RFC文件的查看2.RFC文件的编辑3.RFC文件的导入导出四、RFC的高级应用1.RFC模板的使用2.RFC文件的版本控制3.RFC与其他软件的协同工作正文:RFC(Request for Comments)是一种广泛应用于计算机领域的文档格式,它主要用于记录和共享各种计算机网络协议和技术规范。

作为一个重要的知识库,RFC对于网络工程师、程序员等IT从业者来说具有很高的参考价值。

本文将为您详细介绍RFC的相关设置及使用方法。

首先,我们需要了解RFC的基本概念。

RFC(Request for Comments)意为“请求评论”,是一种用于记录和共享计算机网络协议和技术规范的文档格式。

它起源于20世纪60年代的美国,如今已成为互联网领域最重要的知识库之一。

RFC文件通常由网络工程师、程序员等IT从业者编写,并经过专家评审和公开讨论,以确保其内容的准确性和可靠性。

接下来,我们来了解RFC相关设置。

RFC文件的存放位置通常在系统的“/etc/rfc”目录下。

文件的命名规则一般采用“RFC”加数字的形式,如“RFC1925”。

此外,文件的权限设置也很重要,一般来说,RFC文件应具有可读、可写和可执行的权限,以便于用户查看、编辑和执行。

在了解RFC的相关设置后,我们来学习RFC的使用方法。

首先,可以通过命令行或图形界面查看RFC文件的内容。

编辑RFC文件时,可以使用文本编辑器或专门的RFC编辑工具。

此外,RFC文件还可以导入导出,方便与其他软件协同工作。

在掌握RFC的基本使用方法后,我们可以进一步探索RFC的高级应用。

RFC模板可以帮助用户快速创建和编辑RFC文件。

此外,RFC文件还支持版本控制,可以方便地追踪文件的变更历史。

rfc中常用的测试协议

rfc中常用的测试协议

rfc中常用的测试协议摘要:1.RFC 简介2.RFC 中常用的测试协议a.网络协议测试1.网络数据包抓取和分析2.网络仿真和测试工具b.应用层协议测试1.HTTP 和HTTPS 测试2.FTP 和FTPS 测试3.SMTP 和SMTPS 测试c.安全协议测试1.TLS 和SSL 测试2.IPsec 测试d.传输协议测试1.TCP 和UDP 测试e.无线网络协议测试1.802.11 无线网络测试正文:RFC(Request for Comments)是一个用于讨论和记录互联网协议的标准文档系列。

在RFC 中,有许多常用的测试协议,这些协议用于确保互联网协议在实际应用中能够正常工作。

本文将详细介绍这些测试协议。

首先,RFC 中包含了大量的网络协议测试。

网络数据包抓取和分析是网络协议测试的基础,这对于诊断网络问题和优化网络性能至关重要。

此外,网络仿真和测试工具也是必不可少的,例如,网络模拟器(如NS-3)和测试平台(如Ixia)可以帮助工程师在实验室环境中模拟实际网络状况,从而对协议进行更严格的测试。

其次,应用层协议测试在RFC 中也占据重要地位。

HTTP 和HTTPS 是Web 应用中最常用的协议,有许多测试工具可以对它们的性能和安全性进行测试,例如,JMeter 和Locust 等负载测试工具。

此外,FTP 和FTPS、SMTP 和SMTPS 等传输协议也是常用的测试对象。

在安全协议方面,RFC 中包含了TLS 和SSL、IPsec 等协议的测试方法。

这些协议对于保护互联网数据传输的安全至关重要,因此需要进行严格的测试以确保其性能和安全性。

传输协议方面,TCP 和UDP 是互联网中最常用的传输协议,它们的测试方法也是RFC 中的重要内容。

TCP 测试关注可靠性和流量控制等方面,而UDP 测试则更注重数据传输速率和丢包率等指标。

最后,无线网络协议测试在RFC 中也有一定的比重。

例如,802.11 无线网络测试是评估无线局域网性能的关键。

RFC3984中FU-A拆包方式

RFC3984中FU-A拆包方式
| Bytes 2..n of a Single NAL unit |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FU indicator| FU header | |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| :...OPTIONAL RTP padding |
29 FU-B Fragmentation unit
30-31 undefined -
3、拆包和解包
拆包:当编码器在编码时需要将原有一个NAL按照FU-A进行分片,原有的NAL的单元头与分片后的FU-A的单元头有如下关系:
E: 1 bit
当设置成1, 结束位指示分片NAL单元的结束,即, 荷载的最后字节也是分片NAL单元的最后一个字节。当跟随的FU荷载不是分片NAL单元的最后分片,结束位设置为0。
R: 1 bit
保留位必须设置为0,接收者必须忽略该位。
Type: 5 bits
NAL单元荷载类型定义见下表
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

RFC3984(中文部分)_可打印版

RFC3984(中文部分)_可打印版

RFC3984(中文部分)1. 介绍 (1)1.1. H.264 Codec (1)1.2. 参数集概念 (2)1.3. 网络抽象层单元类型 (2)4. 定义和缩写 (4)4.1. 定义 (4)5. RTP 荷载格式 (6)5.1. RTP头的使用 (6)5.2. RTP 荷载格式的公共结构 (8)5.3. NAL单元字节使用 (9)5.4. 打包方式 (11)5.5. 解码顺序号(DON) (12)5.6. 单个NAL单元包 (14)5.7. 聚合包 (15)5.7.1. 单时间聚合包 (17)5.7.2. 多时刻聚合包(MTAPs) (19)5.8. 分片单元(FUs) (23)6. 打包规则 (26)6.1. 公共打包规则 (26)6.2. 单个NAL单元模式 (27)6.3. 非交错方式 (27)6.4. 交错方式 (28)7. 打包过程(信息) (28)7.1. 单个NAL单元和非交错方式 (28)7.2. 交错方式 (29)7.2.1. 解交错缓冲区的大小 (29)7.2.2. 解交错过程 (29)7.3. 附加打包规则 (31)1. 介绍1.1. H.264 Codec本文指定一个RTP荷载规范用于ITU-T H.264 视频编码标准(ISO/IEC 14496 Part 10 [2])(两个都称为高级视频编码AVC). H.264建议在2005年5月被ITU-T采纳, 草案规范对于公共回顾可用[8]. 本文H.264 缩写用于codec和标准,但是本文等价于采纳 ISO/IEC相似的编码标准.H.264 视频 codec又非常广泛的应用覆盖所有格式的数字压缩视频格式,从低带宽的Internet流应用到HDTV广播和数字影院应用。

和当前的技术状态比较, 整个H.264的性能被报告节省50%的位率。

例如,数字卫星TV质量被报告在1.5 Mbit/s,就可以实现,而当前的MPEG 2的操作点在大约3.5 Mbit/s [9].该codec规范自己概念上区分[1]视频编码层(VCL)和网络抽象层(NAL). VCL包含Codec 的信令处理功能;以及如转换,量化,运动补偿预测机制;以及循环过滤器。

浙江电网视频监控系统统一技术组网建设实施方案

浙江电网视频监控系统统一技术组网建设实施方案

浙江电网视频监控系统统一技术组网建设方案设计说明书浙江电力信息通信设计所建设厅设证乙级A233006612二零一零年七月目录第一章需求分析....................................................................................... - 1 -1.1 项目背景........................................................................................ - 1 -1.2 项目现状........................................................................................ - 2 -1.2.1 浙江地区视频监控平台现状.................................................. - 2 -1.2.2 浙江地区视频监控前端现状.................................................. - 2 -1.3 业务需求分析................................................................................. - 3 - 第二章总体建设概述................................................................................ - 4 -2.1 总体建设要求................................................................................. - 4 -2.2 总体建设原则................................................................................. - 4 -2.3 总体建设目标................................................................................. - 6 -2.4 总体建设任务................................................................................. - 6 -2.4.1视频监控系统建设方案............................................................ - 6 -2.4.2 视频监控省级平台技术规范.................................................... - 7 -2.4.3 视频监控统一技术平台的工程实施 ......................................... - 7 -2.4.4 推动基于视频监控的电力业务系统的开发与使用.................... - 7 - 第三章系统建设方案................................................................................ - 8 -3.1 总体构架设计................................................................................. - 8 -3.2 视频监控平台功能设计 .................................................................. - 13 -3.3 视频监控平台互联解决方案........................................................... - 19 -3.3.1 外网视频监控平台的接入 ..................................................... - 19 -3.3.2 与地区局平台的互联 ............................................................ - 19 -3.3.3 与前端设备的互联................................................................ - 21 -3.4 与其它系统互联............................................................................. - 24 -3.4.1与应急指挥系统互联 ............................................................. - 24 -3.4.2与SCADA、PMS系统互联 .................................................. - 24 -3.4.3 其它应用系统 ....................................................................... - 26 -3.5 平台用户的接入............................................................................. - 26 -3.6 视频监控专用VPN网络 ................................................................ - 27 -3.6.1 网络带宽管理策略................................................................ - 28 -3.6.2按需传送原则 ........................................................................ - 29 -3.6.3承载网络带宽计算................................................................. - 29 -3.6.4 防火墙的NAT穿透............................................................... - 29 -3.6.5 地址规划与分配.................................................................... - 30 -3.7 地址编码规划 ................................................................................ - 36 - 第四章视频监控平台基本要求 ............................................................... - 38 -4.1主要功能 ....................................................................................... - 38 -4.1.1服务功能 ............................................................................... - 38 -4.1.2管理功能 ............................................................................... - 39 -4.2主要性能 ....................................................................................... - 40 -4.2.1 处理能力 .............................................................................. - 40 -4.2.2主备切换 ............................................................................... - 40 -4.2.3 数据备份 .............................................................................. - 40 -4.2.4 分布式部署........................................................................... - 40 -4.2.5 互联要求 .............................................................................. - 40 -4.2.6 多图像质量传输.................................................................... - 41 -4.2.7 性能要求 .............................................................................. - 41 -4.3设备要求 ....................................................................................... - 41 -4.4 系统的安全解决方案..................................................................... - 43 -4.4.1视频监控平台自身的安全性................................................... - 43 -4.4.2认证机制 ............................................................................... - 44 -4.4.3 权限管理 .............................................................................. - 44 -4.4.4视频流传输、存储的安全性................................................... - 44 -4.4.5客户端的安全 ........................................................................ - 45 -4.5 系统容量要求 ............................................................................... - 45 - 第五章本项目业务功能设计 ................................................................... - 45 -5.1三维地图与图像联动...................................................................... - 45 -5.2三遥告警与图像联动...................................................................... - 46 -第一章需求分析1.1 项目背景视频监控系统已经成为电网安全生产运行不可缺少的技术支持手段之一,电力生产企业已经有不少应用场合,如变电所、输电线路、营业厅、局大楼等,但各厂家的视频监控系统各自独立,有许多仅实现当地监控,且都缺乏统一的技术标准,不同厂家的视频监控系统还不能进行有效的互联通信以及组网,资源无法实现共享,视频监控系统的作用未能得到充分发挥及应用。

转H264实时编码及NALU,RTP传输续

转H264实时编码及NALU,RTP传输续

转H264实时编码及NALURTP传输续【转】对h.264压缩视频码流中i帧的提取firstime2010-06-30 0915转载自fandy586最终编辑fandy586这个问题要说清楚还是有点复杂首先判断NALU类型是否是5如果是那么以后连续出现的NALU类型为5的NALU就属于IDR帧一种特殊的I帧如果NALU不是5则要进一步判断slice_type是否是7如果是那么连续出现的slice_type7的slice就属于I帧如果slice_type2那么就要判断与当前slice同属一帧的slice是否都是I slice如果都是那么这些slice就属于一个I帧。

当然这必须是在码流没有错误的情况下才可行。

实际应用中码流中一般不会出现复杂的情况所以可以直接判断slice_type是否等于2或7就可以了。

H.264的NALURTP封包说明转自牛人2010-06-30 1628H.264 RTP payload格式H.264视频RTP负载格式 1.网络抽象层单元类型NALU NALU头由一个字节组成它的语法如下--- 01234567-------- FNRIType --- F1个比特. forbidden_zero_bit.在H.264规范中规定了这一位必须为0. NRI2个比特. nal_ref_idc.取0011似乎指示这个NALU的重要性如00的NALU解码器可以丢弃它而不影响图像的回放.不过一般情况下不太关心这个属性. Type5个比特. nal_unit_type.这个NALU单元的类型.简述如下0没有定义1-23 NAL单元单个NAL单元包. 24 STAP-A单一时间的组合包25 STAP-B单一时间的组合包26 MTAP16多个时间的组合包27 MTAP24多个时间的组合包28 FU-A分片的单元29 FU-B分片的单元30-31没有定义2.打包模式下面是RFC 3550中规定的RTP头的结构. 0 12 3 0 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 1 -------------------------------- V2PXCCMPTsequence number -------------------------------- timestamp-------------------------------- synchronization sourceSSRCidentifier contributing sourceCSRCidentifiers . -------------------------------- 负载类型Payload typePT7 bits 序列号Sequence numberSN16 bits 时间戳Timestamp32 bits H.264 Payload格式定义了三种不同的基本的负载Payload结构.接收端可能通过RTP Payload 的第一个字节来识别它们.这一个字节类似NALU头的格式而这个头结构的NAL单元类型字段则指出了代表的是哪一种结构这个字节的结构如下可以看出它和H.264的NALU头结构是一样的. --- 01234567 -------- FNRIType --- 字段Type这个RTP payload中NAL单元的类型.这个字段和H.264中类型字段的区别是当type 的值为2431表示这是一个特别格式的NAL单元而H.264中只取123是有效的值. 24 STAP-A单一时间的组合包25 STAP-B单一时间的组合包26 MTAP16多个时间的组合包27 MTAP24多个时间的组合包28 FU-A分片的单元29 FU-B分片的单元30-31没有定义可能的结构类型分别有 1.单一NAL单元模式即一个RTP包仅由一个完整的NALU组成.这种情况下RTP NAL头类型字段和原始的H.264的NALU头类型字段是一样的. 2.组合封包模式即可能是由多个NAL单元组成一个RTP包.分别有4种组合方式STAP-ASTAP-BMTAP16MTAP24. 那么这里的类型值分别是242526以及27. 3.分片封包模式用于把一个NALU单元封装成多个RTP包.存在两种类型FU-A和FU-B.类型值分别是28和29. 2.1单一NAL单元模式对于NALU的长度小于MTU大小的包一般采用单一NAL单元模式. 对于一个原始的H.264 NALU单元常由Start CodeNALU HeaderNALU Payload三部分组成其中Start Code用于标示这是一个NALU单元的开始必须是quot00 00 00 01quot或quot00 00 01quotNALU头仅一个字节其后都是NALU 单元内容. 打包时去除quot00 00 01quot或quot00 00 00 01quot的开始码把其他数据封包的RTP包即可. 0 12 3 0 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 1-------------------------------- FNRItype -------- Bytes 2.n of aSingle NAL unit---------------- .OPTIONAL RTP padding -------------------------------- 如有一个H.264的NALU是这样的00 00 00 01 67 42 A0 1E 23 56 0E 2F. 这是一个序列参数集NAL单元.00 00 00 01是四个字节的开始码67是NALU头42开始的数据是NALU内容. 封装成RTP包将如下RTP Header67 42 A0 1E 23 56 0E 2F 即只要去掉4个字节的开始码就可以了. 2.2组合封包模式其次当NALU的长度特别小时可以把几个NALU单元封在一个RTP包中. 0 12 3 0 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 1-------------------------------- RTP Header -------------------------------- STAP-A NAL HDRNALU 1SizeNALU 1HDR -------------------------------- NALU 1Data------------------------ NALU 2SizeNALU 2HDR -------------------------------- NALU 2Data ---------------- .OPTIONAL RTP padding -------------------------------- 2.3 Fragmentation UnitsFUs. 而当NALU的长度超过MTU时就必须对NALU单元进行分片封包.也称为Fragmentation UnitsFUs. 0 12 3 0 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 1-------------------------------- FU indicatorFU header ---------------- FU payload---------------- .OPTIONAL RTP padding -------------------------------- Figure 14.RTP payload format for FU-A The FU indicator octet has the following format --- 01234567 -------- FNRIType --- The FU header has the following format --- 01234567 -------- SERType --- 3.SDP参数下面描述了如何在SDP中表示一个H.264流.quotmquot行中的媒体名必须是quotvideoquot .quotartpmapquot行中的编码名称必须是quotH264quot. .quotartpmapquot行中的时钟频率必须是90000. .其他参数都包括在quotafmtpquot行中. 如mvideo 49170 RTP/AVP 98 artpmap98 H264/90000 afmtp98 profile-level-id42A01Esprop-parameter-setsZ0IACpZTBYmIaMljiA 下面介绍一些常用的参数. 3.1 packetization-mode 表示支持的封包模式. 当packetization-mode的值为0时或不存在时必须使用单一NALU单元模式. 当packetization-mode的值为1时必须使用非交错non-interleaved封包模式. 当packetization-mode的值为2时必须使用交错interleaved封包模式. 这个参数不可以取其他的值. 3.2 sprop-parameter-sets 这个参数可以用于传输H.264的序列参数集和图像参数NAL单元.这个参数的值采用Base64进行编码.不同的参数集间用quotquot号隔开. 3.3 profile-level-id 这个参数用于指示H.264流的profile类型和级别.由Base16十六进制表示的3个字节.第一个字节表示H.264的Profile类型第三个字节表示H.264的Profile级别 3.4 max-mbps 这个参数的值是一个整型指出了每一秒最大的宏块处理速度. 【转】H264关于RTP协议的实现2010-07-22 1335完整的C/S架构的基于RTP/RTCP的H.264视频传输方案。

ANNEXB格式

ANNEXB格式

AnnexB格式:NALU数据+开始前缀(00000001或000001,此处注意为甚么是4bit或3bit,后面有描述);针对H.320电话会议RTP格式:NALU数据+20个字节的类似的并不符合RTP协议的RTP头。

针对IP网络的RTP打包方式H.264协议只规定了字节流格式,没有规定RTP格式。

可能也是因为这个原因,JM的RTP 格式没有被用到任何场合场合中,成为了摆设。

下图中的RTP格式是h.264乐园的firstime 从JM86中分析出来的。

实际包交换网络中必须按照RFC3984将NALU数据封装为RTP包,而不能使用JM的RTP格式。

下面引自“QUESTIONMARK”的博客下面说明3字节起始码和4字节起始码。

以下和leading_zero_8bits、trailing_zero_8bits已无关系,忘掉。

if(next_bits(24)!=0x000001)zero_bytef(8)start_code_prefix_one_3bytesf(24)根据B.1节,可以看到所谓的4字节起始码是(zero_byte+3字节起始码)。

那么看zero_byte 的说明,就可以明白zero_byte什么时候出现,也就能明白什么时候出现4字节起始码:1.SPS、PPSnalu是4字节起始码;2.AccessUnit的首个nalu是4字节起始码(参见7.4.1.2.3)。

这里举个例子说明,用JM可以生成这样一段码流(不要使用JM8.6,它在这部分与标准不符),这个码流可以见本楼附件:SPS(4字节头)PPS(4字节头)SEI(4字节头)I0(slice0)(4字节头)I0(slice1)(3字节头)P1(slice0)(4字节头)P1(slice1)(3字节头)P2(slice0)(4字节头)P2(slice1)(3字节头)I0(slice0)是序列第一帧(I帧)的第一个slice,是当前AccessUnit的首个nalu,所以是4字节头。

浙江大华DH650平台设备接入协议

浙江大华DH650平台设备接入协议

DH650平台设备接入协议1.概述DH650平台设备接入协议(后面简称本协议)描述DH650平台的设备接入协议,规定了设备接入DH650平台进行通信时的命令和数据交互的细节。

本协议引用到的相关规范:z IETF RFC 2616: "Hypertext Transfer Protocol – HTTP/1.1", Fielding R. et al., June 1999.z"Extensible Markup Language (XML) 1.0 Specification (Second Edition)", T. Bray, J. Paoli, C. M. Sperberg-McQueen, E. Maler, 6 October 2000.z IETF RFC 2326: "Real Time Streaming Protocol (RTSP)", Schulzrinne H., Rao A. and Lanphier R., April 1998.z IETF RFC 2327: "SDP: Session Description Protocol", Handley M., Jacobson V. and Perkins C., April 1998.z IETF RFC 3550: "RTP: A Transport Protocol for Real-Time Applications", Schulzrinne H. et al., January 1996.z IETF RFC 3016: "RTP Payload Format for MPEG-4 Audio/Visual Streams", Kikuchi Y. et al., November 2000.z IETF RFC 3984: "RTP Payload Format for H.264 Video", Wenger S. et al, February 2005.2.协议整体设计2.1. 通讯协议组成通讯协议由一个命令通道和零到多个数据通道组成。

浅析移动视频监控系统中的视频信息叠加和传输处理

浅析移动视频监控系统中的视频信息叠加和传输处理

浅析移动视频监控系统中的视频信息叠加和传输处理刘春林;王凌云【摘要】With the rapid development of wireless network communication technology, the application range of mobile video monitoring system is gradually expanded. With the increasing popularity and acceptance of video surveillance, mobile video surveillance has become one of the hot spots in the ifeld of surveillance at this stage. So the analysis of video overlay and transmission are of great signiifcance. Based on this, this article mainly carried on a brief analysis and discussion to this domain related question for reference.%当前无线网络通信技术正快速发展,移动视频监控系统的应用范围逐渐扩大,随着视频监控被越来越多人认可和接受,移动视频监控已经成了现阶段监控领域的热点之一,所以对视频信息叠加及传输处理进行分析意义重大。

基于此,文章主要针对该领域的相关问题进行了简要的分析和探讨,供大家参考。

【期刊名称】《无线互联科技》【年(卷),期】2017(000)001【总页数】2页(P10-11)【关键词】移动视频监控系统;视频信息叠加;传输处理【作者】刘春林;王凌云【作者单位】凯里学院,贵州凯里 556011;凯里学院,贵州凯里 556011【正文语种】中文随着社会经济的快速发展,人们的安全防范意识也在不断加强,对自己的生活、工作环境安全度的要求逐渐升高。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Network Working Group S. Wenger Request for Comments: 3984 M.M. Hannuksela Category: Standards Track T. Stockhammer M. Westerlund D. Singer February 2005 RTP Payload Format for H.264 VideoStatus of This MemoThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol. Distribution of this memo is unlimited.Copyright NoticeCopyright (C) The Internet Society (2005).AbstractThis memo describes an RTP Payload format for the ITU-TRecommendation H.264 video codec and the technically identicalISO/IEC International Standard 14496-10 video codec. The RTP payload format allows for packetization of one or more Network AbstractionLayer Units (NALUs), produced by an H.264 video encoder, in each RTP payload. The payload format has wide applicability, as it supportsapplications from simple low bit-rate conversational usage, toInternet video streaming with interleaved transmission, to high bit- rate video-on-demand.Table of Contents1. Introduction (3)1.1. The H.264 Codec (3)1.2. Parameter Set Concept (4)1.3. Network Abstraction Layer Unit Types (5)2. Conventions (6)3. Scope (6)4. Definitions and Abbreviations (6)4.1. Definitions (6)5. RTP Payload Format (8)5.1. RTP Header Usage (8)5.2. Common Structure of the RTP Payload Format (11)5.3. NAL Unit Octet Usage (12)Wenger, et al. Standards Track [Page 1]RFC 3984 RTP Payload Format for H.264 Video February 2005 5.4. Packetization Modes (14)5.5. Decoding Order Number (DON) (15)5.6. Single NAL Unit Packet (18)5.7. Aggregation Packets (18)5.8. Fragmentation Units (FUs) (27)6. Packetization Rules (31)6.1. Common Packetization Rules (31)6.2. Single NAL Unit Mode (32)6.3. Non-Interleaved Mode (32)6.4. Interleaved Mode (33)7. De-Packetization Process (Informative) (33)7.1. Single NAL Unit and Non-Interleaved Mode (33)7.2. Interleaved Mode (34)7.3. Additional De-Packetization Guidelines (36)8. Payload Format Parameters (37)8.1. MIME Registration (37)8.2. SDP Parameters (52)8.3. Examples (58)8.4. Parameter Set Considerations (60)9. Security Considerations (62)10. Congestion Control (63)11. IANA Considerations (64)12. Informative Appendix: Application Examples (65)12.1. Video Telephony according to ITU-T Recommendation H.241Annex A (65)12.2. Video Telephony, No Slice Data Partitioning, No NALUnit Aggregation (65)12.3. Video Telephony, Interleaved Packetization Using NALUnit Aggregation (66)12.4. Video Telephony with Data Partitioning (66)12.5. Video Telephony or Streaming with FUs and ForwardError Correction (67)12.6. Low Bit-Rate Streaming (69)12.7. Robust Packet Scheduling in Video Streaming (70)13. Informative Appendix: Rationale for Decoding Order Number (71)13.1. Introduction (71)13.2. Example of Multi-Picture Slice Interleaving (71)13.3. Example of Robust Packet Scheduling (73)13.4. Robust Transmission Scheduling of Redundant CodedSlices (77)13.5. Remarks on Other Design Possibilities (77)14. Acknowledgements (78)15. References (78)15.1. Normative References (78)15.2. Informative References (79)Authors’ Addresses (81)Full Copyright Statement (83)Wenger, et al. Standards Track [Page 2]RFC 3984 RTP Payload Format for H.264 Video February 2005 1. Introduction1.1. The H.264 CodecThis memo specifies an RTP payload specification for the video coding standard known as ITU-T Recommendation H.264 [1] and ISO/IECInternational Standard 14496 Part 10 [2] (both also known as Advanced Video Coding, or AVC). Recommendation H.264 was approved by ITU-T on May 2003, and the approved draft specification is available forpublic review [8]. In this memo the H.264 acronym is used for thecodec and the standard, but the memo is equally applicable to theISO/IEC counterpart of the coding standard.The H.264 video codec has a very broad application range that covers all forms of digital compressed video from, low bit-rate Internetstreaming applications to HDTV broadcast and Digital Cinemaapplications with nearly lossless coding. Compared to the currentstate of technology, the overall performance of H.264 is such thatbit rate savings of 50% or more are reported. Digital Satellite TVquality, for example, was reported to be achievable at 1.5 Mbit/s,compared to the current operation point of MPEG 2 video at around 3.5 Mbit/s [9].The codec specification [1] itself distinguishes conceptually between a video coding layer (VCL) and a network abstraction layer (NAL).The VCL contains the signal processing functionality of the codec;mechanisms such as transform, quantization, and motion compensatedprediction; and a loop filter. It follows the general concept ofmost of today’s video codecs, a macroblock-based coder that usesinter picture prediction with motion compensation and transformcoding of the residual signal. The VCL encoder outputs slices: a bit string that contains the macroblock data of an integer number ofmacroblocks, and the information of the slice header (containing the spatial address of the first macroblock in the slice, the initialquantization parameter, and similar information). Macroblocks inslices are arranged in scan order unless a different macroblockallocation is specified, by using the so-called Flexible MacroblockOrdering syntax. In-picture prediction is used only within a slice. More information is provided in [9].The Network Abstraction Layer (NAL) encoder encapsulates the sliceoutput of the VCL encoder into Network Abstraction Layer Units (NALunits), which are suitable for transmission over packet networks oruse in packet oriented multiplex environments. Annex B of H.264defines an encapsulation process to transmit such NAL units overbyte-stream oriented networks. In the scope of this memo, Annex B is not relevant.Wenger, et al. Standards Track [Page 3]RFC 3984 RTP Payload Format for H.264 Video February 2005 Internally, the NAL uses NAL units. A NAL unit consists of a one-byte header and the payload byte string. The header indicates thetype of the NAL unit, the (potential) presence of bit errors orsyntax violations in the NAL unit payload, and information regarding the relative importance of the NAL unit for the decoding process.This RTP payload specification is designed to be unaware of the bitstring in the NAL unit payload.One of the main properties of H.264 is the complete decoupling of the transmission time, the decoding time, and the sampling orpresentation time of slices and pictures. The decoding processspecified in H.264 is unaware of time, and the H.264 syntax does not carry information such as the number of skipped frames (as is common in the form of the Temporal Reference in earlier video compressionstandards). Also, there are NAL units that affect many pictures and that are, therefore, inherently timeless. For this reason, thehandling of the RTP timestamp requires some special considerationsfor NAL units for which the sampling or presentation time is notdefined or, at transmission time, unknown.1.2. Parameter Set ConceptOne very fundamental design concept of H.264 is to generate self-contained packets, to make mechanisms such as the header duplication of RFC 2429 [10] or MPEG-4’s Header Extension Code (HEC) [11]unnecessary. This was achieved by decoupling information relevant to more than one slice from the media stream. This higher layer metainformation should be sent reliably, asynchronously, and in advancefrom the RTP packet stream that contains the slice packets.(Provisions for sending this information in-band are also availablefor applications that do not have an out-of-band transport channelappropriate for the purpose.) The combination of the higher-levelparameters is called a parameter set. The H.264 specificationincludes two types of parameter sets: sequence parameter set andpicture parameter set. An active sequence parameter set remainsunchanged throughout a coded video sequence, and an active pictureparameter set remains unchanged within a coded picture. The sequence and picture parameter set structures contain information such aspicture size, optional coding modes employed, and macroblock to slice group map.To be able to change picture parameters (such as the picture size)without having to transmit parameter set updates synchronously to the slice packet stream, the encoder and decoder can maintain a list ofmore than one sequence and picture parameter set. Each slice header contains a codeword that indicates the sequence and picture parameter set to be used.Wenger, et al. Standards Track [Page 4]RFC 3984 RTP Payload Format for H.264 Video February 2005 This mechanism allows the decoupling of the transmission of parameter sets from the packet stream, and the transmission of them by external means (e.g., as a side effect of the capability exchange), or through a (reliable or unreliable) control protocol. It may even be possible that they are never transmitted but are fixed by an applicationdesign specification.1.3. Network Abstraction Layer Unit TypesTutorial information on the NAL design can be found in [12], [13],and [14].All NAL units consist of a single NAL unit type octet, which alsoco-serves as the payload header of this RTP payload format. Thepayload of a NAL unit follows immediately.The syntax and semantics of the NAL unit type octet are specified in [1], but the essential properties of the NAL unit type octet aresummarized below. The NAL unit type octet has the following format: +---------------+|0|1|2|3|4|5|6|7|+-+-+-+-+-+-+-+-+|F|NRI| Type |+---------------+The semantics of the components of the NAL unit type octet, asspecified in the H.264 specification, are described briefly below.F: 1 bitforbidden_zero_bit. The H.264 specification declares a value of1 as a syntax violation.NRI: 2 bitsnal_ref_idc. A value of 00 indicates that the content of the NAL unit is not used to reconstruct reference pictures for interpicture prediction. Such NAL units can be discarded withoutrisking the integrity of the reference pictures. Values greaterthan 00 indicate that the decoding of the NAL unit is required to maintain the integrity of the reference pictures.Type: 5 bitsnal_unit_type. This component specifies the NAL unit payload type as defined in table 7-1 of [1], and later within this memo. For a reference of all currently defined NAL unit types and theirsemantics, please refer to section 7.4.1 in [1].Wenger, et al. Standards Track [Page 5]RFC 3984 RTP Payload Format for H.264 Video February 2005 This memo introduces new NAL unit types, which are presented insection 5.2. The NAL unit types defined in this memo are marked asunspecified in [1]. Moreover, this specification extends thesemantics of F and NRI as described in section 5.3.2. ConventionsThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [3]. This specification uses the notion of setting and clearing a bit when bit fields are handled. Setting a bit is the same as assigning that bit the value of 1 (On). Clearing a bit is the same as assigningthat bit the value of 0 (Off).3. ScopeThis payload specification can only be used to carry the "naked"H.264 NAL unit stream over RTP, and not the bitstream formatdiscussed in Annex B of H.264. Likely, the first applications ofthis specification will be in the conversational multimedia field,video telephony or video conferencing, but the payload format alsocovers other applications, such as Internet streaming and TV over IP.4. Definitions and Abbreviations4.1. DefinitionsThis document uses the definitions of [1]. The following terms,defined in [1], are summed up for convenience:access unit: A set of NAL units always containing a primary coded picture. In addition to the primary coded picture, an access unit may also contain one or more redundant coded pictures or other NAL units not containing slices or slice data partitions of a codedpicture. The decoding of an access unit always results in adecoded picture.coded video sequence: A sequence of access units that consists, in decoding order, of an instantaneous decoding refresh (IDR) access unit followed by zero or more non-IDR access units including allsubsequent access units up to but not including any subsequent IDR access unit.IDR access unit: An access unit in which the primary coded picture is an IDR picture.Wenger, et al. Standards Track [Page 6]RFC 3984 RTP Payload Format for H.264 Video February 2005 IDR picture: A coded picture containing only slices with I or SIslice types that causes a "reset" in the decoding process. After the decoding of an IDR picture, all following coded pictures indecoding order can be decoded without inter prediction from anypicture decoded prior to the IDR picture.primary coded picture: The coded representation of a picture to be used by the decoding process for a bitstream conforming to H.264. The primary coded picture contains all macroblocks of the picture. redundant coded picture: A coded representation of a picture or a part of a picture. The content of a redundant coded picture shall not be used by the decoding process for a bitstream conforming to H.264. The content of a redundant coded picture may be used bythe decoding process for a bitstream that contains errors orlosses.VCL NAL unit: A collective term used to refer to coded slice andcoded data partition NAL units.In addition, the following definitions apply:decoding order number (DON): A field in the payload structure, or a derived variable indicating NAL unit decoding order. Values of DON are in the range of 0 to 65535, inclusive. After reaching the maximum value, the value of DON wraps around to 0.NAL unit decoding order: A NAL unit order that conforms to theconstraints on NAL unit order given in section 7.4.1.2 in [1].transmission order: The order of packets in ascending RTP sequence number order (in modulo arithmetic). Within an aggregationpacket, the NAL unit transmission order is the same as the orderof appearance of NAL units in the packet.media aware network element (MANE): A network element, such as amiddlebox or application layer gateway that is capable of parsing certain aspects of the RTP payload headers or the RTP payload and reacting to the contents.Informative note: The concept of a MANE goes beyond normalrouters or gateways in that a MANE has to be aware of thesignaling (e.g., to learn about the payload type mappings ofthe media streams), and in that it has to be trusted whenworking with SRTP. The advantage of using MANEs is that theyallow packets to be dropped according to the needs of the media coding. For example, if a MANE has to drop packets due tocongestion on a certain link, it can identify those packets Wenger, et al. Standards Track [Page 7]RFC 3984 RTP Payload Format for H.264 Video February 2005 whose dropping has the smallest negative impact on the userexperience and remove them in order to remove the congestionand/or keep the delay low.AbbreviationsDON: Decoding Order NumberDONB: Decoding Order Number BaseDOND: Decoding Order Number DifferenceFEC: Forward Error CorrectionFU: Fragmentation UnitIDR: Instantaneous Decoding RefreshIEC: International Electrotechnical CommissionISO: International Organization for StandardizationITU-T: International Telecommunication Union,Telecommunication Standardization SectorMANE: Media Aware Network ElementMTAP: Multi-Time Aggregation PacketMTAP16: MTAP with 16-bit timestamp offsetMTAP24: MTAP with 24-bit timestamp offsetNAL: Network Abstraction LayerNALU: NAL UnitSEI: Supplemental Enhancement InformationSTAP: Single-Time Aggregation PacketSTAP-A: STAP type ASTAP-B: STAP type BTS: TimestampVCL: Video Coding Layer5. RTP Payload Format5.1. RTP Header UsageThe format of the RTP header is specified in RFC 3550 [4] andreprinted in Figure 1 for convenience. This payload format uses the fields of the header in a manner consistent with that specification. When one NAL unit is encapsulated per RTP packet, the RECOMMENDED RTP payload format is specified in section 5.6. The RTP payload (and the settings for some RTP header bits) for aggregation packets andfragmentation units are specified in sections 5.7 and 5.8,respectively.Wenger, et al. Standards Track [Page 8]RFC 3984 RTP Payload Format for H.264 Video February 2005 0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | contributing source (CSRC) identifiers | | .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1. RTP header according to RFC 3550The RTP header information to be set according to this RTP payloadformat is set as follows:Marker bit (M): 1 bitSet for the very last packet of the access unit indicated by theRTP timestamp, in line with the normal use of the M bit in videoformats, to allow an efficient playout buffer handling. Foraggregation packets (STAP and MTAP), the marker bit in the RTPheader MUST be set to the value that the marker bit of the lastNAL unit of the aggregation packet would have been if it weretransported in its own RTP packet. Decoders MAY use this bit asan early indication of the last packet of an access unit, but MUST NOT rely on this property.Informative note: Only one M bit is associated with anaggregation packet carrying multiple NAL units. Thus, if agateway has re-packetized an aggregation packet into severalpackets, it cannot reliably set the M bit of those packets.Payload type (PT): 7 bitsThe assignment of an RTP payload type for this new packet formatis outside the scope of this document and will not be specifiedhere. The assignment of a payload type has to be performed either through the profile used or in a dynamic way.Sequence number (SN): 16 bitsSet and used in accordance with RFC 3550. For the single NALU and non-interleaved packetization mode, the sequence number is used to determine decoding order for the NALU.Timestamp: 32 bitsThe RTP timestamp is set to the sampling timestamp of the content.A 90 kHz clock rate MUST be used.Wenger, et al. Standards Track [Page 9]RFC 3984 RTP Payload Format for H.264 Video February 2005 If the NAL unit has no timing properties of its own (e.g.,parameter set and SEI NAL units), the RTP timestamp is set to the RTP timestamp of the primary coded picture of the access unit inwhich the NAL unit is included, according to section 7.4.1.2 of[1].The setting of the RTP Timestamp for MTAPs is defined in section5.7.2.Receivers SHOULD ignore any picture timing SEI messages includedin access units that have only one display timestamp. Instead,receivers SHOULD use the RTP timestamp for synchronizing thedisplay process.RTP senders SHOULD NOT transmit picture timing SEI messages forpictures that are not supposed to be displayed as multiple fields. If one access unit has more than one display timestamp carried in a picture timing SEI message, then the information in the SEImessage SHOULD be treated as relative to the RTP timestamp, withthe earliest event occurring at the time given by the RTPtimestamp, and subsequent events later, as given by the difference in SEI message picture timing values. Let tSEI1, tSEI2, ...,tSEIn be the display timestamps carried in the SEI message of anaccess unit, where tSEI1 is the earliest of all such timestamps.Let tmadjst() be a function that adjusts the SEI messages timescale to a 90-kHz time scale. Let TS be the RTP timestamp. Then, the display time for the event associated with tSEI1 is TS. Thedisplay time for the event with tSEIx, where x is [2..n] is TS +tmadjst (tSEIx - tSEI1).Informative note: Displaying coded frames as fields is neededcommonly in an operation known as 3:2 pulldown, in which filmcontent that consists of coded frames is displayed on a display using interlaced scanning. The picture timing SEI messageenables carriage of multiple timestamps for the same codedpicture, and therefore the 3:2 pulldown process is perfectlycontrolled. The picture timing SEI message mechanism isnecessary because only one timestamp per coded frame can beconveyed in the RTP timestamp.Informative note: Because H.264 allows the decoding order to be different from the display order, values of RTP timestamps may not be monotonically non-decreasing as a function of RTPsequence numbers. Furthermore, the value for interarrivaljitter reported in the RTCP reports may not be a trustworthyindication of the network performance, as the calculation rules Wenger, et al. Standards Track [Page 10]RFC 3984 RTP Payload Format for H.264 Video February 2005 for interarrival jitter (section 6.4.1 of RFC 3550) assume that the RTP timestamp of a packet is directly proportional to itstransmission time.5.2. Common Structure of the RTP Payload FormatThe payload format defines three different basic payload structures.A receiver can identify the payload structure by the first byte ofthe RTP payload, which co-serves as the RTP payload header and, insome cases, as the first byte of the payload. This byte is alwaysstructured as a NAL unit header. The NAL unit type field indicateswhich structure is present. The possible structures are as follows: Single NAL Unit Packet: Contains only a single NAL unit in thepayload. The NAL header type field will be equal to the original NAL unit type; i.e., in the range of 1 to 23, inclusive. Specified insection 5.6.Aggregation packet: Packet type used to aggregate multiple NAL units into a single RTP payload. This packet exists in four versions, the Single-Time Aggregation Packet type A (STAP-A), the Single-TimeAggregation Packet type B (STAP-B), Multi-Time Aggregation Packet(MTAP) with 16-bit offset (MTAP16), and Multi-Time Aggregation Packet (MTAP) with 24-bit offset (MTAP24). The NAL unit type numbersassigned for STAP-A, STAP-B, MTAP16, and MTAP24 are 24, 25, 26, and27, respectively. Specified in section 5.7.Fragmentation unit: Used to fragment a single NAL unit over multiple RTP packets. Exists with two versions, FU-A and FU-B, identifiedwith the NAL unit type numbers 28 and 29, respectively. Specified in section 5.8.Table 1. Summary of NAL unit types and their payload structuresType Packet Type name Section---------------------------------------------------------0 undefined -1-23 NAL unit Single NAL unit packet per H.264 5.624 STAP-A Single-time aggregation packet 5.7.125 STAP-B Single-time aggregation packet 5.7.126 MTAP16 Multi-time aggregation packet 5.7.227 MTAP24 Multi-time aggregation packet 5.7.228 FU-A Fragmentation unit 5.829 FU-B Fragmentation unit 5.830-31 undefined -Wenger, et al. Standards Track [Page 11]RFC 3984 RTP Payload Format for H.264 Video February 2005 Informative note: This specification does not limit the size ofNAL units encapsulated in single NAL unit packets andfragmentation units. The maximum size of a NAL unit encapsulated in any aggregation packet is 65535 bytes.5.3. NAL Unit Octet UsageThe structure and semantics of the NAL unit octet were introduced in section 1.3. For convenience, the format of the NAL unit type octet is reprinted below:+---------------+|0|1|2|3|4|5|6|7|+-+-+-+-+-+-+-+-+|F|NRI| Type |+---------------+This section specifies the semantics of F and NRI according to thisspecification.F: 1 bitforbidden_zero_bit. A value of 0 indicates that the NAL unit type octet and payload should not contain bit errors or other syntaxviolations. A value of 1 indicates that the NAL unit type octetand payload may contain bit errors or other syntax violations.MANEs SHOULD set the F bit to indicate detected bit errors in the NAL unit. The H.264 specification requires that the F bit isequal to 0. When the F bit is set, the decoder is advised thatbit errors or any other syntax violations may be present in thepayload or in the NAL unit type octet. The simplest decoderreaction to a NAL unit in which the F bit is equal to 1 is todiscard such a NAL unit and to conceal the lost data in thediscarded NAL unit.NRI: 2 bitsnal_ref_idc. The semantics of value 00 and a non-zero valueremain unchanged from the H.264 specification. In other words, a value of 00 indicates that the content of the NAL unit is not used to reconstruct reference pictures for inter picture prediction.Such NAL units can be discarded without risking the integrity ofthe reference pictures. Values greater than 00 indicate that the decoding of the NAL unit is required to maintain the integrity of the reference pictures.In addition to the specification above, according to this RTPpayload specification, values of NRI greater than 00 indicate the relative transport priority, as determined by the encoder. MANEs Wenger, et al. Standards Track [Page 12]RFC 3984 RTP Payload Format for H.264 Video February 2005 can use this information to protect more important NAL unitsbetter than they do less important NAL units. The highesttransport priority is 11, followed by 10, and then by 01; finally, 00 is the lowest.Informative note: Any non-zero value of NRI is handledidentically in H.264 decoders. Therefore, receivers need notmanipulate the value of NRI when passing NAL units to thedecoder.An H.264 encoder MUST set the value of NRI according to the H.264 specification (subclause 7.4.1) when the value of nal_unit_type is in the range of 1 to 12, inclusive. In particular, the H.264specification requires that the value of NRI SHALL be equal to 0for all NAL units having nal_unit_type equal to 6, 9, 10, 11, or12.For NAL units having nal_unit_type equal to 7 or 8 (indicating asequence parameter set or a picture parameter set, respectively), an H.264 encoder SHOULD set the value of NRI to 11 (in binaryformat). For coded slice NAL units of a primary coded picturehaving nal_unit_type equal to 5 (indicating a coded slicebelonging to an IDR picture), an H.264 encoder SHOULD set thevalue of NRI to 11 (in binary format).For a mapping of the remaining nal_unit_types to NRI values, thefollowing example MAY be used and has been shown to be efficientin a certain environment [13]. Other mappings MAY also bedesirable, depending on the application and the H.264/AVC Annex A profile in use.Informative note: Data Partitioning is not available in certain profiles; e.g., in the Main or Baseline profiles.Consequently, the nal unit types 2, 3, and 4 can occur only if the video bitstream conforms to a profile in which datapartitioning is allowed and not in streams that conform to the Main or Baseline profiles.Table 2. Example of NRI values for coded slices and coded slicedata partitions of primary coded reference picturesNAL Unit Type Content of NAL unit NRI (binary)----------------------------------------------------------------1 non-IDR coded slice 102 Coded slice data partition A 103 Coded slice data partition B 014 Coded slice data partition C 01 Wenger, et al. Standards Track [Page 13]。

相关文档
最新文档