Skip to content
Search

SDP:Example:ChromeToAiortc

lastmod 2024-11-06created 2021-11-0912 edits

Analysis of the SDP exchanged during communication between Chrome and aiortc.

offer SDP

The offer information: the Local Description generated by Chrome and sent to aiortc.

Session description

v=0

Protocol version. Fixed at 0

o=- 4623683867849772311 2 IN IP4 127.0.0.1

Indicates the Owner/Creator that generated the SDP message. In order:

  1. Username: -
  2. Session-ID: 4623683867849772311
  3. Session Version: 2
  4. Network Type: IN
  5. Address Type: IP4
  6. Unicast Address: 127.0.0.1
s=-

Session name: required, with one or more UTF-8 encoded characters. Here it is "-".

t=0 0

Timing, in order:

  1. start-time: 0
  2. stop-time: 0

Note that "0 0" means a fixed session. This means the session is permanent and does not expire.

a=group:BUNDLE 0 1

Media bundle group user-defined in the SDP. The list after a=group:BUNDLE later maps 1:1 to a=mid:. In the case above, they map to

  1. a=mid:0
  2. a=mid:1

respectively.

a=extmap-allow-mixed

See RTCConfiguration.offerExtmapAllowMixed 1. Allows backward interoperability with systems that do not support mixing one-byte and two-byte header extensions. <- what does this even mean...

a=msid-semantic: WMS

The abbreviations are as follows:

  • WMS: short for WebRTC Media Stream
  • msid: MediaStream ID

A session-level attribute is defined to signal the semantics associated with msid grouping. This allows msid groups with different semantics to coexist. 2 3

Media descriptions (video)

m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 122 102 121 127 120 125 107 108 109 35 36 124 119 123 37

Defines attributes and information about the media stream, in order:

  1. Media type, one of audio, video, application. In the case above, video
  2. Media port number. In the case above, 9
  3. Protocol. In the case above, UDP/TLS/RTP/SAVPF
  4. Order of RTP payload formats. In the case above, 96, 97, 98, 99 ...

During negotiation between peers, the preferred profile numbers are tried in order. For example, it checks whether the codec for 96 is mutually supported, and if not, negotiates again with 97. Multiple media lines can be declared, and each defines only the negotiation details for that media beneath it. That is, order matters. Detailed information about the formats is specified further below after a=rtpmap:.

c=IN IP4 0.0.0.0

Exposes a reachable address for the peer connection. Usually reachable addresses are tested separately from the ICE candidates, so the address on the c line is not used. <- needs verification.

a=rtcp:9 IN IP4 0.0.0.0

Specifies the address and port for the RTCP connection. When rtcp-mux is used, it is the same port as RTP.

a=candidate:1211725180 1 udp 2113937151 c030213c-b605-4f44-b8fe-32cfc6f4976c.local 53986 typ host generation 0 network-cost 999

ICE candidate list. After a=candidate:, in order: 4 5

  1. Foundation, a string that identifies the candidate. Here, 1211725180
  2. Component-id, a string indicating whether the candidate is an RTP or RTCP candidate. If the candidate has RTP and RTCP multiplexed together, it is reported as an RTP candidate. Either "rtp" or "rtcp". (Note: 1 is rtp, 2 is rtcp) In the case above, 1
  3. Transport. Either tcp or udp. In the case above, udp (if a Transport Extension is included, it is written like udp/token)
  4. If there are multiple candidates, the User Agent always prefers the Candidate with the highest or equal Priority. In the case above, 2113937151
  5. Candidate address. In the case above, c030213c-b605-4f44-b8fe-32cfc6f4976c.local
  6. Port number. In the case above, 53986
  7. Candidate type (Candidate-Type), prefixed with the string "typ". One of "host", "srflx", "prflx", "relay". In the case above, host (see ICE for details)
  8. (Optional) rel-addr: if the string "raddr" is present, the next value is the connection-address. (Together with "rport", it is a transport address related to the candidate, useful for diagnostics and other purposes. If the candidate type is "host", <rel-addr> and <rel-port> must be omitted)
  9. (Optional) rel-port: if the string "rport" is present, the next value is the port.
  10. (Optional) Extension attributes. Pairs of "attribute name" and "attribute value" can be added repeatedly.
    1. generation 0
    2. network-cost 999
a=ice-ufrag:yHMA
a=ice-pwd:un22hWsJE+nP3Pu6HrAFBwIb
a=ice-options:trickle

Defines ICE attribute values. Once ICE candidates are exchanged, a process of verifying each other begins; these are used then, and protect against potential attacks unrelated to the session.

a=fingerprint:sha-256 86:9F:86:FB:D3:D0:B2:A4:B1:57:B5:F9:2D:8E:4A:91:B4:DD:71:0D:71:F6:7A:F9:C2:2C:FB:4F:01:85:B3:CA

Defines the DTLS attribute value. Contains the cryptographic hash of the certificate used for DTLS-SRTP negotiation.

a=setup:actpass

Defines that this is a peer that can start DTLS negotiation. Defined by RFC4145 and updated by RFC4572.

a=mid:0

Media identifier used in the BUNDLE group.

a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 urn:3gpp:video-orientation
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly

Indicates the direction of media exchange. It can be changed to sendonly, recvonly, or inactive through the options of the createOffer and createAnswer functions used to generate the SDP.

a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli

Definition of the payload format (RTP payload formats) declared in the m= line above. In the case above, the VP8 codec with 90000 sampling.

a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96

a=fmtp: is the format parameter.

a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:122 VP9/90000
a=rtcp-fb:122 goog-remb
a=rtcp-fb:122 transport-cc
a=rtcp-fb:122 ccm fir
a=rtcp-fb:122 nack
a=rtcp-fb:122 nack pli
a=fmtp:122 profile-id=1
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:35 AV1X/90000
a=rtcp-fb:35 goog-remb
a=rtcp-fb:35 transport-cc
a=rtcp-fb:35 ccm fir
a=rtcp-fb:35 nack
a=rtcp-fb:35 nack pli
a=rtpmap:36 rtx/90000
a=fmtp:36 apt=35
a=rtpmap:124 red/90000
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=124
a=rtpmap:123 ulpfec/90000
a=rtpmap:37 flexfec-03/90000
a=rtcp-fb:37 goog-remb
a=rtcp-fb:37 transport-cc
a=fmtp:37 repair-window=10000000

Media descriptions (application)

m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:1211725180 1 udp 2113937151 c030213c-b605-4f44-b8fe-32cfc6f4976c.local 52603 typ host generation 0 network-cost 999
a=ice-ufrag:yHMA
a=ice-pwd:un22hWsJE+nP3Pu6HrAFBwIb
a=ice-options:trickle
a=fingerprint:sha-256 86:9F:86:FB:D3:D0:B2:A4:B1:57:B5:F9:2D:8E:4A:91:B4:DD:71:0D:71:F6:7A:F9:C2:2C:FB:4F:01:85:B3:CA
a=setup:actpass
a=mid:1
a=sctp-port:5000
a=max-message-size:262144

answer SDP

The answer: the Local Description of aiortc returned to Chrome

v=0
o=- 3845429721 3845429721 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 96 97 102 121 125 107
c=IN IP4 0.0.0.0
a=sendonly
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=mid:0
a=msid:ec29882c-357a-4dce-a797-9b20f68ed1d5 2d6f27ca-0dd7-47f4-b089-0ad430485d55
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-mux
a=ssrc-group:FID 3689124642 1310541881
a=ssrc:3689124642 cname:1c972f97-f02f-4a45-a95d-df25119fd62a
a=ssrc:1310541881 cname:1c972f97-f02f-4a45-a95d-df25119fd62a
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:102 H264/90000
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=rtcp-fb:102 goog-remb
a=fmtp:102 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
a=rtpmap:125 H264/90000
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=rtcp-fb:125 goog-remb
a=fmtp:125 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=ice-ufrag:5wOb
a=ice-pwd:qBARVN71ab8u3leGyyvupb
a=fingerprint:sha-256 6E:B5:F0:49:CD:CF:4E:3B:C2:FA:BB:47:4A:8B:4F:6A:C2:8F:07:C9:0F:38:D5:83:C1:C7:7C:E3:E3:65:6B:B0
a=setup:active
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=mid:1
a=sctp-port:5000
a=max-message-size:65536
a=ice-ufrag:5wOb
a=ice-pwd:qBARVN71ab8u3leGyyvupb
a=fingerprint:sha-256 6E:B5:F0:49:CD:CF:4E:3B:C2:FA:BB:47:4A:8B:4F:6A:C2:8F:07:C9:0F:38:D5:83:C1:C7:7C:E3:E3:65:6B:B0
a=setup:active

See also

Favorite site

References

author Zer0 sitemap