跳到主要内容
uencoder

SDP (Session Description Protocol) Reference

Reference 为 SDP 格式化 used 为 multimedia 会话 description 在 WebRTC 和 SIP.

Format Structure

SDP (RFC 8866) is a text-based format with lines of key=value pairs. Required fields: version (v=), origin (o=), session name (s=), timing (t=). Media descriptions start with m= lines followed by attribute (a=) lines. The origin field includes username, session ID, version, net type, addr type, and address. Attributes carry codec, payload type, and direction info. SDP is used in SIP/SDP offer/answer and WebRTC.

v=
Protocol version
v=0
m=
Media description
m=audio 5004 RTP/AVP 0
a=
Attributes
a=rtpmap:0 PCMU/8000

WebRTC Usage

WebRTC uses SDP for offer/answer exchange of media capabilities. The SDP includes ICE candidates, DTLS fingerprints, and SSRCs. Codec preferences are expressed in rtpmap and rtcp-fb attributes. The m= line indicates media type, port, protocol, and payload types. SDP munging (direct modification) is deprecated in favor of WebRTC APIs. BUNDLE groups multiple media into one transport. SDP is verbose but human-readable for debugging.

offer/answer
Capability exchange
WebRTC, SIP
ICE candidates
In SDP or trickled
a=candidate lines
BUNDLE
Single transport
a=group:BUNDLE

相关工具

参考链接