rtp头部的完整解释---Wikipedia

本文详细介绍了实时传输协议(RTP)的头部结构及其字段含义。包括版本号、填充位、扩展位、贡献源计数、标记位、载荷类型、序列号、时间戳等关键字段的作用与使用方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://en.wikipedia.org/wiki/Real-time_Transport_Protocol

 

bit offset0-1234-789-1516-31
0Ver.PXCCMPTSequence Number
32Timestamp
64SSRC identifier
96CSRC identifiers (optional)
...
96+(CC×32)Extension header (optional).
96+(CC×32)
+ (X×((EHL+1)×32))
 
Data

 

The RTP header has a minimum size of 12 octets.

Ver.
(2 bits) Indicates the version of the protocol. Current version is 2.
P (Padding)
(1 bit) Used to indicate if there are extra padding bytes at the end of the RTP packet.
X (Extension)
(1 bit) Indicates presence of an Extension header between standard header and payload data.
CC (CSRC Count)
(4 bits) Contains the number of CSRC identifiers that follow the fixed header.
M (Marker)
(1 bit) Used at the application level and is defined by a profile. If it is set, it means that the current data has some special relevance for the application.
PT (Payload Type)
(7 bits) Indicates the format of the payload and determines its interpretation by the application. See RTP profiles for the defined types.
Sequence Number 
(16 bits) The sequence number increments by one for each RTP data packet sent, and may be used by the receiver to detect packet loss and to restore packet sequence.
Timestamp 
(32 bits) The timestamp reflects the sampling instant of the first data in the RTP data packet. The sampling instant MUST be derived from a clock that increments monotonically and linearly in time to allow synchronization and jitter calculations. The resolution of the clock MUST be sufficient for the desired synchronization accuracy and for measuring packet arrival jitter (one tick per video frame is typically not sufficient). The clock frequency is dependent on the format of data carried as payload and is specified statically in the profile or payload format specification that defines the format, or MAY be specified dynamically for payload formats defined through non-RTP means. If RTP packets are generated periodically, the nominal sampling instant as determined from the sampling clock is to be used, not a reading of the system clock.By default the value is 0 which means it is infinite
SSRC 
(32 bits) Synchronization source identifier uniquely identifies the source of a stream.
CSRC 
Contributing source IDs enumerate contributing sources to a stream which has been generated from multiple sources.
Extension header 
The first 32-bit word contains a profile specific identifier (16 bits) and a length specifier (16 bits) that indicates the length of the extension (EHL=extension header length) in 32-bit units, excluding the 32 bits of the extension header.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值