RFC3605_RTCP(免费)
RFC3550_RTP中文版

RFC3550RTP:实时应用程序传输协议摘要本文描述RTP(real-time transport protocol),实时传输协议。
RTP在多点传送(多播)或单点传送(单播)的网络服务上,提供端对端的网络传输功能,适合应用程序传输实时数据,如:音频,视频或者仿真数据。
RTP没有为实时服务提供资源预留的功能,也不能保证QoS(服务质量)。
数据传输功能由一个控制协议(RTCP)来扩展,通过扩展,可以用一种方式对数据传输进行监测控制,该协议(RTCP)可以升级到大型的多点传送(多播)网络,并提供最小限度的控制和鉴别功能。
RTP和RTCP被设计成和下面的传输层和网络层无关。
协议支持RTP标准的转换器和混合器的使用。
本文的大多数内容和旧版的RFC1889相同。
在线路里传输的数据包格式没有改变,唯一的改变是使用协议的规则和控制算法。
为了最小化传输,发送RTCP数据包时超过了设定的速率,而在这时,很多的参与者同时加入了一个会话,在这样的情况下,一个新加入到(用于计算的可升级的)计时器算法中的元素是最大的改变。
目录(Table of Contents)1. 引言 (Introduction)1 1 术语(Terminology)2 RTP使用场景(RTP Use Scenarios)2 1 简单多播音频会议( Simple Multicast Audio Conference)2 2 音频和视频会议(Audio and Video Conference)2 3 混频器和转换器(Mixers and Translators)2 4 分层编码(Layered Encodings)3 定义(Definitions)4 字节序,校正和时间格式(Byte Order, Alignment, and Time Format)5 RTP数据传输协议(RTP Data Transfer Protocol)5 1 RTP固定头域(RTP Fixed Header Fields)5 2 多路复用RTP会话(Multiplexing RTP Sessions)5 3 RTP头的配置文件详细变更(Profile-Specific Modifications to the RTP Header)5 3 1 RTP报头扩展(RTP Header Extension)6 RTP控制协议(RTP Control Protocol) -- RTCP6 1 RTCP包格式(RTCP Packet Format)6 2 RTCP传输间隔(RTCP Transmission Interval)6 2 1 维护会话成员数目(Maintaining the number of session members)6 3 RTCP包的发送与接收规则(RTCP Packet Send and Receive Rules)6 3 1 计算RTCP传输间隔(Computing the RTCP Transmission Interval)6 3 2 初始化(Initialization)6 3 3 接收RTP或RTCP(非BYE)包(Receiving an RTP or Non-BYE RTCP Packet)6 3 4 接收RTCP(BYE)包(Receiving an RTCP BYE Packet)6 3 5 SSRC计时失效(Timing Out an SSRC)6 3 6 关于传输计时器的到期(Expiration of Transmission Timer)6 37 传输一个 BYE 包(Transmitting a BYE Packet)6 3 8 更新we_sent(Updating we_sent)6 3 9 分配源描述带宽(Allocation of Source Description Bandwidth)6 4 发送方和接收方报告(Sender and Receiver Reports)6 4 1 SR:发送方报告的RTCP包(SR: Sender report RTCP packet)6 4 2 RR:接收方报告的RTCP包(RR: Receiver Report RTCP Packet)6 4 3 扩展发送方和接收方报告(Extending the Sender and Receiver Reports )6 4 4 分析发送方和接收方报告(Analyzing Sender and Receiver Reports )6 5 SDES:源描述RTCP包(SDES: Source description RTCP packet)6 5 1 CNAME:规范终端标识符的SDES数据项(CNAME: Canonical End-Point Identifier SDES Item)6 5 2 NAME:用户名的SDES数据项(NAME: User name SDES item)6 5 3 EMAIL:电子邮件地址的SDES数据项(EMAIL: Electronic Mail Address SDES Item) 6 5 4 PHONE:电话号码的SDES数据项(PHONE: Phone Number SDES Item)6 5 5 LOC:地理用户地址的SDES数据项(LOC: Geographic User Location SDES Item)6 5 6 TOOL:应用程序或工具名字的SDES数据项(TOOL: Application or Tool Name SDES Item) 6 57 NOTE:通知/状态的SDES数据项(NOTE: Notice/Status SDES Item)6 5 8 PRIV:私有扩展的SDES数据项(PRIV: Private Extensions SDES Item)6 6 BYE:Goodbye RTCP包(BYE: Goodbye RTCP packet)6 7 APP:定义应用程序的RTCP包(APP: Application-Defined RTCP Packet)7 RTP转换器和混频器(RTP Translators and Mixers)7 1 概述(General Description )7 2 在转换器中的RTCP数据处理(RTCP Processing in Translators)7 3 在混频器中的RTCP数据处理(RTCP Processing in Mixers )7 4 级联混频器(Cascaded Mixers)8 SSRC标识符的分配和使用(SSRC Identifier Allocation and Use)8 1 冲突概率(Probability of Collision )8 2 冲突解决和循环检测(Collision Resolution and Loop Detection)8 3 在分层编码中使用(Use with Layered Encodings)9 安全(Security )9 1 机密性(Confidentiality)9 2 身份验证和消息完整性(Authentication and Message Integrity)10 拥塞控制(Congestion Control)11 网络和传输协议之上的RTP(RTP over Network and Transport Protocols)12 协议常量摘要(Summary of Protocol Constants)12 1 RTCP 包类型(RTCP Packet Types)12 2 SDES 类型(SDES Types)13 RTP概况和负载格式详细说明(RTP Profiles and Payload Format Specifications)14 安全考虑(Security Considerations)15 IANA考虑(IANA Considerations)16 知识产权声明(Intellectual Property Rights Statement)17 鸣谢(Acknowledgments)附录 A 算法(Algorithms)附录 A 1 RTP数据头有效性检查(RTP Data Header Validity Checks )附录 A 2 RTCP数据头有效性检查(RTCP Header Validity Checks)附录 A 3 确定RTP包预期数目和丢失数目(Determining Number of Packets Expected and Lost) 附录 A 4 生成SDES RTCP包(Generating RTCP SDES Packets)附录 A 5 解析RTCP SDES包(Parsing RTCP SDES Packets)附录 A 6 生成32位随机标识符(Generating a Random 32-bit Identifier附录 A 7 计算RTCP传输间隔(Computing the RTCP Transmission Interval)附录 A 8 估测两次到达间隔的抖动(Estimating the Interarrival Jitter)附录 B 与RFC1889不同之外(Changes from RFC 1889)参考书目(References)标准化引用(Normative References )资料性引用(Informative References)作者地址完整的版权声明1.绪论本文详细的介绍实时传输协议RTP,RTP提供带有实时特性的端对端数据传输服务,传输的数据如:交互式的音频和视频。
视频分析仪功能说明

智慧网络 深度业务感知
9
视频分析仪功能说明
支持多种视频流获取方式:被动方式(镜像口接入,分光器接入),主动方式 (IGMP加入组播)
智慧网络 深度业务感知
目录
视频分析仪概述 视频分析仪功能介绍 视频分析仪指标介绍
智慧网络 深度业务感知
11
视频分析仪指标介绍
视频质量自动化监测分析流程图
智慧网络 深度业务感知
视频分析仪指标介绍
视频质量体系分层
视频 内容
原始像素矩阵 RGB 像素矩阵 YUV(由RGB变换得到) 宏块集合(像素矩阵做宏块划分)
视 频 编 码
宏块残差信息(帧内/帧间预测) 残差信息变换结果(DCT变换) 变换信息的量化结果(量化)
熵编码数据(熵编码进一步压缩)
智慧网络 深度业务感知
所选内容的PCR精度不在 +/-500ns之间
严重时可能引起机顶盒偶尔跳帧,或图象停顿。但如果间隔 超时不严重可能不会有什么影响 PCR抖动如果均值偏差很大会引起解码器的节目参考时钟和编 码参考时钟严重误差,造成图象偶尔跳帧或者停顿。如果抖 动均值不大,在机顶盒的容忍范围则对解码影响不大。另外 PCR精度可能引起机顶盒色度载波生成不良,从而导致部分品 牌电视机只能显示黑白图象
智慧网络 深度业务感知
16
视频分析仪指标介绍
RTP/RTSP层质量监测(流传输控制层) RTP/RTSP层参数列表 RTP:RTP报文丢失率、RTP报文到达时延、RTP报文到达抖动、RTP报文乱 序率、RTP报文重传率 RTSP:RTSP会话次数、RTSP心跳间隔 RTP/RTSP层相关标准 RTP协议由RFC 3550定义。RTSP则由RFC 2326定义。同时作为补充RFC 3605定义了RTCP标准以通过交互的方式实现RTP实时流传输控制(RTP延时的测量 依赖于该协议)。 而RTP重传率3550中没有直接定义,一般使用RFC 2890中对于乱序的定 义。中对于乱序的定义,而丢包被定义为:期望得到的包数-实际得到的包数 RTP/RTSP层参数实现 RFC 3550 定义了RTP流的抖动定义,重传与延时需要依赖于RTCP协议获取, 在某一个报文被判定为丢失后,终端会发起一个RTCP请求重传该报文。这一交互 可以以和网络层相同的方式通过交互得到网络延时的信息和重传次数的信息。
实时传输协议——RTP协议详细介绍

实时传输协议——RTP协议详细介绍随着以太网音视频桥接(AVB)技术的引入,汽车可支持各种基于音频、视频的流媒体服务。
在流媒体数据传输过程中,为保障音视频流的实时传输,需采用RTP和RTCP协议。
接下来,我们一起来了解下实时传输协议吧!1、什么是RTP?RTP定义:Real-time Transport Protocol,是由IETF的多媒体传输工作小组于1996年在RFC 1889中公布的。
RTP为IP 上的语音、图像等需要实时传输的多媒体数据提供端对端的传输服务,但本身无法保证服务质量(QoS),因此,需要配合实时传输控制协议(RTCP)一起使用。
RTCP定义:Real-time Transport Control Protocol,监控服务质量并传送会话参与者信息,服务器可利用RTCP数据包信息改变传输速率、负载数据类型。
2、RTP相关概念介绍流媒体:使用流式传输技术的连续时基媒体。
使用流式传输可以边下载边播放,无需等待音频或视频数据信息全部下载完成后再播放。
混频器(Mixer):一种中间系统,将一个或多个源的RTP数据包合成一个新的RTP数据包,然后转发出去。
混频器可能会改变数据包的数据格式,并对各个流组合的新数据包生成一个新SSRC。
转换器(Translator):一种中间系统,转发RTP数据包但不改变数据包的同步源标识符,可用于通过IP多播无法直接到达的用户区,如在防火墙两端使用转换器,外侧转换器通过安全连接将数据传输到内侧转换器。
RTP利用混频器和转换器完成实时数据传输,混频器接收来自一个或多个发送方的RTP数据包,并把它们组合成一个新的RTP 数据包继续转发。
这个组合数据包使用新的SSRC标识,组合数据包将作为新的发送方加入到RTP传输中。
混频器将不同的媒体流组合在一起,需要通过转换器来对单个媒体流进行操作,可进行编码转换或协议翻译。
典型的RTP数据包传输流程如下图所示,其中S1、S2、S3、S4是数据源的发送端,R4是RTP 数据包的接收端。
培训_GB28181中的视频流

浅论GB28181平台视频流武汉烽火众智数字技术有限责任公司目录一、概述 (4)二、国标媒体流简介 (4)2.1视频流的数据要求 (4)2.2视频流编解码要求 (5)2.2.1基于H.264的视频编、解码技术要求 (5)2.2.2基于MPEG-4的视频编/、解码技术要求 (7)2.2.3 SIP信令中的SDP内容规范 (9)2. 3国标视频流示例 (11)三、实际问题浅析 (13)3.1 客户端解码花屏 (13)3.2 解码器无法解码 (15)3.3 画面出现卡顿 (18)四、小论总结 (19)4.1码流的不确定性 (19)4.2以国标为本 (20)一、概述GB/T 28181-2011是2011年由中华人民共和国公安部提出,中国国家标准化管理委员会发布的国家标准。
GB/T 28181-2011的正式实施规定了安全防范影像视频监控联网系统中信息传输、交换、控制的互联结构、通信协议结构,传输、交换、控制的基本要求和安全性要求,以及控制、传输流程和协议接口等技术要求。
适用于安全防范视频监控联网系统及城市监控报警联网系统的方案设计、系统检测、验收以及与之相关的设备研发、生产。
虽然该标准不可能一次性解决视频监控联网系统中的所有技术规定,但是比较清晰地定义了建议的通讯模型,重要的数据格式,和既有系统的兼容性方案,以及子系统和外部系统之间的通讯模式。
对大型系统建设,尤其是联网的社会共享性系统建设给出了明确的、可实施的技术标准。
本文主要结合贵州省国标平台项目的实施经验介绍并讨论GB/T 28181-2011中媒体流相关知识。
二、国标媒体流简介下面通过GB28181-2011中的媒体传输和编解码协议两方面,简单介绍下国标对媒体流的技术要求1:2.1视频流的数据要求GB/T 28181-2011中规定媒体流在联网系统IP网络上传输时应采用RFC 3550规定的RTP协议,提供实时数据传输中的时间戳信息及各数据流的同步;应采用RFC 3550规定的RTCP协议,为按序传输数据包提供可靠保证,提供流量控制和拥塞控制。
RTP与RTCP协议介绍

RTP与RTCP协议介绍转⾃:/113473/25481/本⽂主要介绍RTP与RTCP协议。
author: ZJ 06-11-17Blog:1.流媒体( Streaming Media)1.1流媒体概念流媒体技术是⽹络技术和多媒体技术发展到⼀定阶段的产物。
术语流媒体既可以指在⽹上传输连续时基媒体的流式技术,也可以指使⽤流式技术的连续时基媒体本⾝。
在⽹上传输⾳频、视频等多媒体信息⽬前主要有两种⽅式:下载和流式传输。
采⽤下载⽅式,⽤户需要先下载整个媒体⽂件,然后才能进⾏播放。
由于⽹络带宽的限制,下载常常要花很长时间,所以这种处理⽅式延迟很⼤。
⽽流媒体实现的关键技术是流式传输。
传输之前⾸先对多媒体进⾏预处理(降低质量和⾼效压缩) ,然后使⽤缓存系统来保证数据连续正确地进⾏传输。
使⽤流式传输⽅式,⽤户不必像采⽤下载⽅式那样要等到整个⽂件全部下载完毕,⽽是只需经过⼏秒到⼏⼗秒的启动延时即可在客户端进⾏播放和观看。
此时媒体⽂件的剩余部分将在后台继续下载。
与单纯的下载⽅式相⽐,这种对多媒体⽂件边下载边播放的流式传输⽅式不仅使启动延时⼤幅度地缩短,⽽且对系统缓存容量的需求也⼤⼤降低。
使⽤流式传输的另⼀个好处是使传输那些事先不知道或⽆法知道⼤⼩的媒体数据(如⽹上直播、视频会议等) 成为可能。
到⽬前为⽌,Internet 上使⽤较多的流式视频格式主要有以下三种:RealNetworks 公司的RealMedia ,Apple 公司的QuickTime 以及Microsoft 公司的Advanced Streaming Format (ASF) 。
1.2⽀持流媒体的协议多媒体应⽤的⼀个显著特点是数据量⼤,并且许多应⽤对实时性要求⽐较⾼。
传统的TCP 协议是⼀个⾯向连接的协议,它的重传机制和拥塞控制机制都是不适⽤于实时多媒体传输的。
RTP 是⼀个应⽤型的传输层协议,它并不提供任何传输可靠性的保证和流量的拥塞控制机制。
RTP 位于UDP(User Datagram Protocol) 之上。
IPTV机顶盒技术规范V2.2_修订版_090622

文件编号:SHDX/ZS/CZ/JG/005/B/2009中国电信上海公司IPTV机顶盒技术规范V2.2(修订版)1目的本规范是在中国电信集团公司发布的《IPTV机顶盒技术规范V2.0》的基础上,根据中国电信上海公司IPTV业务发展的需求以及IPTV运营的实际情况,进一步调整修订而成的。
本技术规范的增补、修订和解释权归中国电信上海公司所有。
如中国电信上海公司在此之前的文件与本技术规范有矛盾,按此技术规范执行。
本技术规范自发布之日起实施。
2适用范围本技术规范规定了IPTV终端的应用功能、操作要求、终端管理和接口要求等方面的内容。
本规范供中国电信上海公司引入机顶盒终端设备时参照执行。
同时,本规范也为终端厂商进行机顶盒终端设备开发制造提供依据。
3引用文件/标准下列标准所包含的条文,通过本技术要求的引用而构成本技术要求的条文。
在本技术要求出版时,所示版本均为有效。
所有标准都可能推出更新版本,使用本技术要求的各方应探讨使用下列标准最新版本的可能性。
GB13837-2003: 声音和电视广播接收机及有关设备无线电干扰特性限值和测量方法GB8898-2001: 音频、视频及类似电子设备安全要求RFC1889: A Transport Protocol for Real-Time ApplicationsSJ/T10730:电视广播接收机测量方法TR069:CPE WAN Management ProtocolYD/T 965-1998:电信终端设备的安全要求和试验方法YD/T 993-1998: 电信终端设备防雷技术要求及试验方法4定义/术语DHCP Dynamic Host Configuration Protocol 动态主机配置协议DNS Domain Name System 域名系统DRM Digital Rights Management 数字版权管理EPG Electronic Programmer Guide 电子节目单FTP File Transfer Protocol 文件传输协议HTML Hypertext Markup Language 超文本标记语言HTTP Hypertext Transfer Protocol 超文本传输协议HTTPS Hypertext Transfer Protocol Secure 安全超文本传输协议IGMP Internet Group Management Protocol 互连网组管理协议IP Internet Protocol 网络协议MAC Media Access Control 媒体访问控制层MPEG-4 Moving Picture Exp-erts Group 移动图像专家组定义NTP Network Time Protocol 网络时间协议OSD On-screen Display 屏幕视控系统OSS Operation Support System 运营支撑系统PPPoE PPP over Ethernet 基于以太网点对点协议RTCP Real-time Transport Control Protocol 实时传输控制协议RTP Real-time Transport Protocol 实时传输协议RTSP Real-time Transport Streaming Protocol 实时传输流媒体协议SIP Session Initiation Protocol 起始会话协议S/N Signal/Noise 信噪比SOAP imple Object Access Protocol 简单对象访问协议SSL Secure Socket Layer安全套接字层STB Set Top Box 机顶盒TCP Transmission Control Protocol 传输控制协议TFTP Trivial File Transfer Protocol 简单文件传输协议TS Transport Stream 传输流UDP User Datagram Protocol 用户数据报协议UPnP Universal Plug and Play 通用即插即用USB Universal Serial Bu 通用串行总线XML Extensible Markup Language 可扩展标记语言5机顶盒定义IPTV机顶盒终端是指具备网络接入和页面信息浏览、视音频播放等交互式应用功能,可直接连接电视机音响等播放设备的多媒体终端。
RTCP协议详解

RTCP协议详解RTCP协议介绍RTCP概要实时传输控制协议(Real-time ControlProtocol,RTCP)与RTP 共同定义在1996年提出的RFC 1889中,是和 RTP一起工作的控制协议。
RTCP单独运行在低层协议上,由低层协议提供数据与控制包的复用。
在RTP会话期间,每个会话参与者周期性地向所有其他参与者发送RTCP控制信息包,如下图所示。
对于RTP会话或者广播,通常使用单个多目标广播地址,属于这个会话的所有RTP和RTCP信息包都使用这个多目标广播地址,通过使用不同的端口号可把RTP信息包和RTCP信息包区分开来。
图每个参与者周期性地发送RTCP控制信息包RTCP功能1、为应用程序提供会话质量或者广播性能质量的信息RTCP的主要功能是为应用程序提供会话质量或者广播性能质量的信息。
每个RTCP信息包不封装声音数据或者电视数据,而是封装发送端(和/ 或者)接收端的统计报表。
这些信息包括发送的信息包数目、丢失的信息包数目和信息包的抖动等情况,这些反馈信息反映了当前的网络状况,对发送端、接收端或者网络管理员都非常有用。
RT CP规格没有指定应用程序应该使用这些反馈信息做什么,这完全取决于应用程序开发人员。
例如,发送端可以根据反馈信息来调整传输速率,接收端可以根据反馈信息判断问题是本地的、区域性的还是全球性的,网络管理员也可以使用RTCP信息包中的信息来评估网络用于多目标广播的性能。
2、确定 RTP用户源RTCP为每个RTP用户提供了一个全局唯一的规范名称 (Canonic al Name)标志符CNAME,接收者使用它来追踪一个RTP进程的参加者。
当发现冲突或程序重新启动时,RTP中的同步源标识符SSRC 可能发生改变,接收者可利用CNAME来跟踪参加者。
同时,接收者也需要利用CNAME在相关RTP连接中的几个数据流之间建立联系。
当 RTP需要进行音视频同步的时候,接受者就需要使用 CNAME来使得同一发送者的音视频数据相关联,然后根据RTCP包中的计时信息(Network time protocol)来实现音频和视频的同步。
RTPRTCP协议

Southwest university of science and technology视频信息处置与传输实验报告报告名称RTP-RTCP协议专业班级电子1002班学生姓名学号指导教师实验四RTP-RTCP协议一、实验目的一、了解实时传输协议RTP和实时传输操纵协议RTCP的大体原理;二、学习利用RTP数据报发送实时数据,并接收重组;3、学会利用Wireshark进行抓包,并分析数据。
二、实验内容一、RTP协议报文段的说明语句RTP(Real-time Transport Protocol,实时传输协议)是一个网络传输协议。
RTP报文由两部份组成:报头和有效载荷。
RTP报头格式如图1所示,其中:图1 RTP报头格式V:RTP协议的版本号,占2位,当前协议版本号为2。
P:填充标志,占1位,假设是P=1,那么在该报文的尾部填充一个或多个额外的八位组,它们不是有效载荷的一部份。
X:扩展标志,占1位,假设是X=1,那么在RTP报头后跟有一个扩展报头。
CC:CSRC计数器,占4位,指示CSRC 标识符的个数。
M: 标记,占1位,不同的有效载荷有不同的含义,关于视频,标记一帧的终止;关于音频,标记会话的开始。
PT: 有效载荷类型,占7位,用于说明RTP报文中有效载荷的类型,如GSM音频、JPEM图像等。
序列号:占16位,用于标识发送者所发送的RTP报文的序列号,每发送一个报文,序列号增1。
接收者通过序列号来检测报文丢失情形,从头排序报文,恢复数据。
时戳(Timestamp):占32位,时戳反映了该RTP报文的第一个八位组的采样时刻。
接收者使历时戳来计算延迟和延迟抖动,并进行同步操纵。
同步信源(SSRC)标识符:占32位,用于标识同步信源。
该标识符是随机选择的,参加同一视频会议的两个同步信源不能有相同的SSRC。
特约信源(CSRC)标识符:每一个CSRC标识符占32位,能够有0~15个。
每一个CSRC标识了包括在该RTP报文有效载荷中的所有特约信源。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Network Working Group C. Huitema Request for Comments: 3605 Microsoft Category: Standards Track October 2003Real Time Control Protocol (RTCP) attribute inSession Description Protocol (SDP)Status 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 "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.Copyright NoticeCopyright (C) The Internet Society (2003). All Rights Reserved. AbstractThe Session Description Protocol (SDP) is used to describe theparameters of media streams used in multimedia sessions. When asession requires multiple ports, SDP assumes that these ports have consecutive numbers. However, when the session crosses a network address translation device that also uses port mapping, the ordering of ports can be destroyed by the translation. To handle this, we propose an extension attribute to SDP.1. IntroductionThe session invitation protocol (SIP, [RFC3261]) is often used to establish multi-media sessions on the Internet. There are oftencases today in which one or both ends of the connection are hidden behind a network address translation device [RFC2766]. In this case, the SDP text must document the IP addresses and UDP ports as theyappear on the "public Internet" side of the NAT. In this memo, we will suppose that the host located behind a NAT has a way to obtain these numbers. A possible way to learn these numbers is brieflyoutlined in section 3, however, just learning the numbers is notenough.The SIP messages use the encoding defined in SDP [RFC2327] todescribe the IP addresses and TCP or UDP ports used by the various media. Audio and video are typically sent using RTP [RFC3550], which requires two UDP ports, one for the media and one for the control protocol (RTCP). SDP carries only one port number per media, andHuitema Standards Track [Page 1] RFC 3605 RTCP attribute in SDP October 2003states that "other ports used by the media application (such as the RTCP port) should be derived algorithmically from the base mediaport." RTCP port numbers were necessarily derived from the basemedia port in older versions of RTP (such as [RFC1889]), but now that this restriction has been lifted, there is a need to specify RTCP ports explicitly in SDP. Note, however, that implementations of RTP adhering to the earlier [RFC1889] specification may not be able to make use of the SDP attributes specified in this document.When the NAT device performs port mapping, there is no guarantee that the mappings of two separate ports reflects the sequencing and the parity of the original port numbers; in fact, when the NAT manages a pool of IP addresses, it is even possible that the RTP and the RTCP ports may be mapped to different addresses. In order to successfully establish connections despite the misordering of the port numbers and the possible parity switches caused by the NAT, we propose to use a specific SDP attribute to document the RTCP port and optionally the RTCP address.The 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 [RFC2119].2. Description of the SolutionThe main part of our solution is the declaration of an SDP attribute for documenting the port used by RTCP.2.1. The RTCP AttributeThe RTCP attribute is used to document the RTCP port used for media stream, when that port is not the next higher (odd) port numberfollowing the RTP port described in the media line. The RTCPattribute is a "value" attribute, and follows the general syntaxspecified page 18 of [RFC2327]: "a=<attribute>:<value>". For the RTCP attribute:* the name is the ascii string "rtcp" (lower case),* the value is the RTCP port number and optional address.The formal description of the attribute is defined by the following ABNF [RFC2234] syntax:rtcp-attribute = "a=rtcp:" port [nettype space addrtype spaceconnection-address] CRLFHuitema Standards Track [Page 2] RFC 3605 RTCP attribute in SDP October 2003In this description, the "port", "nettype", "addrtype" and"connection-address" tokens are defined as specified in "Appendix A: SDP Grammar" of [RFC2327].Example encodings could be:m=audio 49170 RTP/AVP 0a=rtcp:53020m=audio 49170 RTP/AVP 0a=rtcp:53020 IN IP4 126.16.64.4m=audio 49170 RTP/AVP 0a=rtcp:53020 IN IP6 2001:2345:6789:ABCD:EF01:2345:6789:ABCDThe RTCP attribute MAY be used as a media level attribute; it MUST NOT be used as a session level attribute. Though the examples below relate to a method that will return only unicast addresses, bothunicast and multicast values are valid.3. Discussion of the SolutionThe implementation of the solution is fairly straightforward. The questions that have been most often asked regarding this solution are whether this is useful, i.e., whether a host can actually discover port numbers in an unmodified NAT, whether it is sufficient, i.e., whether or not there is a need to document more than one ancillary port per media type, and whether why should not change the mediadefinition instead of adding a new attribute.3.1. How do we Discover Port Numbers?The proposed solution is only useful if the host can discover the "translated port numbers", i.e., the value of the ports as theyappear on the "external side" of the NAT. One possibility is to ask the cooperation of a well connected third party that will act as a server according to STUN [RFC3489]. We thus obtain a four stepprocess:1 - The host allocates two UDP ports numbers for an RTP/RTCP pair,2 - The host sends a UDP message from each port to the STUN server,3 - The STUN server reads the source address and port of the packet,and copies them in the text of a reply,Huitema Standards Track [Page 3] RFC 3605 RTCP attribute in SDP October 20034 - The host parses the reply according to the STUN protocol andlearns the external address and port corresponding to each of the two UDP ports.This algorithm supposes that the NAT will use the same translation for packets sent to the third party and to the "SDP peer" with which the host wants to establish a connection. There is no guarantee that all NAT boxes deployed on the Internet have this characteristic.Implementers are referred to the STUN specification [RFC3489] for an extensive discussion of the various types of NAT.3.2. Do we need to Support Multiple Ports?Most media streams are transmitted using a single pair of RTP and RTCP ports. It is possible, however, to transmit a single media over several RTP flows, for example using hierarchical encoding. In this case, SDP will encode the port number used by RTP on the first flow, and the number of flows, as in:m=video 49170/2 RTP/AVP 31In this example, the media is sent over 2 consecutive pairs of ports, corresponding respectively to RTP for the first flow (even number, 49170), RTCP for the first flow (odd number, 49171), RTP for thesecond flow (even number, 49172), and RTCP for the second flow (odd number, 49173).In theory, it would be possible to modify SDP and document the many ports corresponding to the separate encoding layers. However,layered encoding is not much used in practice, and when used ismostly used in conjunction with multicast transmission. Thetranslation issues documented in this memo apply uniquely to unicast transmission, and thus there is no short term need for the support of multiple port descriptions. It is more convenient and more robust to focus on the simple case in which a media is sent over exactly one RTP/RTCP stream.3.3. Why not Expand the Media Definition?The RTP ports are documented in the media description line, and it would seem convenient to document the RTCP port at the same place, rather than create an RTCP attribute. We considered this designalternative and rejected it for two reasons: adding an extra port number and an option address in the media description would beawkward, and more importantly it would create problems with existing applications, which would have to reject the entire media description if they did not understand the extension. On the contrary, adding an attribute has a well defined failure mode: implementations that don'tHuitema Standards Track [Page 4] RFC 3605 RTCP attribute in SDP October 2003understand the "a=rtcp" attribute will simply ignore it; they will fail to send RTCP packets to the specified address, but they will at least be able to receive the media in the RTP packets.4. UNSAF ConsiderationsThe RTCP attribute in SDP is used to enable establishment of RTP/RTCP flows through NAT. This mechanism can be used in conjunction with an address discovery mechanism such as STUN [RFC3489]. STUN is a short term fix to the NAT traversal problem, which requires thusconsideration of the general issues linked to "Unilateral self-address fixing" [RFC3424].The RTCP attribute addresses a very specific problem, thedocumentation of port numbers as they appear after addresstranslation by a port-mapping NAT. The RTCP attribute SHOULD NOT be used for other applications.We expect that, with time, one of two exit strategies can bedeveloped. The IETF may develop an explicit "middlebox control"protocol that will enable applications to obtain a pair of portnumbers appropriate for RTP and RTCP. Another possibility is the deployment of IPv6, which will enable use of "end to end" addressingand guarantee that the two hosts will be able to use appropriateports. In both cases, there will be no need for documenting a "non standard" RTCP port with the RTCP attribute.5. Security ConsiderationsThis SDP extension is not believed to introduce any significantsecurity risk to multi-media applications. One could conceive that a malevolent third party would use the extension to redirect the RTCP fraction of an RTP exchange, but this requires intercepting andrewriting the signaling packet carrying the SDP text; if aninterceptor can do that, many more attacks are available, including a wholesale change of the addresses and port numbers at which the media will be sent.In order to avoid attacks of this sort, when SDP is used in asignaling packet where it is of the form application/sdp, end-to-end integrity using S/MIME [RFC3369] is the technical method to beimplemented and applied. This is compatible with SIP [RFC3261].6. IANA ConsiderationsThis document defines a new SDP parameter, the attribute field"rtcp", which per [RFC2327] has been registered by IANA. Thisattribute field is designed for use at media level only.Huitema Standards Track [Page 5]RFC 3605 RTCP attribute in SDP October 2003 7. Intellectual Property StatementThe IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed topertain to the implementation or use other technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track andstandards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of suchproprietary rights by implementers or users of this specification can be obtained from the IETF Secretariat.The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietaryrights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.8. AcknowledgementsThe original idea for using the "rtcp" attribute was developed by Ann Demirtjis. The document was reviewed by the MMUSIC and AVT working groups of the IETF.9. References9.1. Normative References[RFC1889] Schulzrinne, H., Casner, S., Frederick, R. and V.Jacobson. "RTP: A Transport Protocol for Real-TimeApplications", RFC 1889, January 1996.[RFC2119] Bradner, S., "Key words for use in RFCs to IndicateRequirement Levels", BCP 14, RFC 2119, March 1997.[RFC2234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.[RFC2327] Handley, M. and V. Jacobson, "SDP: Session DescriptionProtocol", RFC 2327, April 1998.Huitema Standards Track [Page 6] RFC 3605 RTCP attribute in SDP October 2003[RFC3489] Rosenberg, J., Weinberger, J., Huitema, C. and R. Mahy."STUN - Simple Traversal of User Datagram Protocol (UDP)Through Network Address Translators (NATs)", RFC 3489,March 2003.[RFC3550] Schulzrinne, H., Casner, S., Frederick, R. and V.Jacobson. "RTP: A Transport Protocol for Real-TimeApplications", RFC 3550, July 2003.9.2. Informative References[RFC2766] Tsirtsis, G. and P. Srisuresh. "Network AddressTranslation - Protocol Translation (NAT-PT)", RFC 2766,February 2000.[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,A., Peterson, J., Sparks, R., Handley, M. and E. Schooler,"SIP: Session Initiation Protocol", RFC 3261, June 2002.[RFC3369] Housley, R., "Cryptographic Message Syntax (CMS)", RFC3369, August 2002.[RFC3424] Daigle, L., "IAB considerations for UNilateral Self-Address Fixing (UNSAF) across network addresstranslation", RFC 3424, November 2002.10. Author's AddressChristian HuitemaMicrosoft CorporationOne Microsoft WayRedmond, WA 98052-6399EMail: huitema@Huitema Standards Track [Page 7] RFC 3605 RTCP attribute in SDP October 2003 11. Full Copyright StatementCopyright (C) The Internet Society (2003). All Rights Reserved.This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of anykind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, thisdocument itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose ofdeveloping Internet standards in which case the procedures forcopyrights defined in the Internet Standards process must befollowed, or as required to translate it into languages other than English.The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERINGTASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATIONHEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OFMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. AcknowledgementFunding for the RFC Editor function is currently provided by theInternet Society.Huitema Standards Track [Page 8]。