SDP:Example:ChromeToAiortc
Chrome 과 aiortc 통신 때 주고받은 SDP 분석.
offer SDP
Chrome 에서 생성한 Local Description 을 aiortc 로 전송한 offer 정보.
Session description
| 프로토콜 버전. 0으로 고정 |
o=- 4623683867849772311 2 IN IP4 127.0.0.1
| SDP 메시지를 생성한 Owner/Creator 표시. 순서대로 - Username: -
- Session-ID: 4623683867849772311
- Session Version: 2
- Network Type: IN
- Address Type: IP4
- Unicast Address: 127.0.0.1
|
| 세션 이름: 하나 이상의 UTF-8 인코딩 문자와 함께 필수. 여기에선 "-" 이다. |
| Timing 순서대로, - start-time: 0
- stop-time: 0
참고로, "0 0" 은 고정 세션을 의미합니다. 이는 세션이 만료되지 않는 영구적임을 의미한다. |
| SDP에 사용-정의한 미디어 번들 그룹. a=group:BUNDLE 이 후에 나오는 목록이 차 후, a=mid: 와 1:1로 대응된다. 위의 경우 각각 -
a= mid:0 -
a= mid:1 과 대응된다. |
| RTCConfiguration.offerExtmapAllowMixed 항목 참조. 1바이트 및 2바이트 헤더 확장의 혼합을 지원하지 않는 시스템과의 역방향 상호 운용성을 허용. <- 뭔말이여... |
| 약자는 다음과 같다: - WMS: WebRTC Media Stream 의 약자
- msid: MediaStream ID
세션 수준 속성은 msid 그룹화와 관련된 의미 체계를 시그널링하기 위해 정의됩니다. 이를 통해 서로 다른 의미 체계를 가진 msid 그룹이 공존할 수 있습니다. |
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
| 미디어 스트림에 관한 속성과 정보들을 정의 순서대로: - 미디어 타입, audio, video, application 중 하나. 위의 경우 video
- 미디어 포트 번호. 위의 경우 9
- 프로토콜. 위의 경우 UDP/TLS/RTP/SAVPF
- RTP payload formats 순서. 위의 경우 96, 97, 98, 99 ... 이다.
피어 간의 협상 과정에서 우선되는 프로파일 번호를 순서대로 시험한다. 예를 들어 96번에 해당하는 코덱이 상호간에 가능한지 확인하고 가능하지 않다면 97번으로 다시 협상한다. 미디어라인은 복수개로 선언 가능하며, 하위에는 해당 미디어에 대한 협상 내용만 정의한다. 즉, 순서가 중요하다. 또한 포맷에 대한 상세 정보는 하단에 a=rtpmap: 이후로 명시된다. |
| 피어 연결을 위한 접근 가능한 주소를 노출한다. 일반적으로 ICE 후보군에서 접근 가능한 주소를 별도로 시험하게 되므로 c 라인의 주소는 사용되지 않는다. <- 확인 필요. |
| RTCP 연결을 위한 주소 및 포트를 지정한다. rtcp-mux를 사용하는 경우, RTP와 동일한 포트가 된다. |
a=candidate:1211725180 1 udp 2113937151 c030213c-b605-4f44-b8fe-32cfc6f4976c.local 53986 typ host generation 0 network-cost 999
| ICE 후보 목록. a=candidate: 이후, 순서대로 - Foundation, 후보를 식별하는 문자열입니다. 여기선 1211725180
- Component-id, 후보가 RTP 또는 RTCP 후보 인지 여부를 나타내는 문자열입니다. 후보가 RTP와 RTCP가 함께 다중화되어 있는 경우 RTP 후보로 보고한다. "rtp" 또는 "rtcp" 이다. (참고로 1은 rtp, 2는 rtcp 이다) 위의 경우 1
- Transport. tcp 또는 udp 중 하나. 위의 경우 udp (Transport Extension 이 포함된 경우
udp/token 이런 식으로 적는다) - 여러 후보(Candidate)가 있다면 User Agent는 항상 가장 높거나 같은 Priority 를 가진 Candidate를 선호한다. 위의 경우 2113937151
- 후보의 주소. 위의 경우 c030213c-b605-4f44-b8fe-32cfc6f4976c.local
- 포트번호. 위의 경우 53986
- 후보 유형(Candidate-Type), "typ" 문자가 앞에 붙는다. "host", "srflx", "prflx", "relay" 중 하나. 위의 경우 host (자세한 내용은 ICE 항목 참조)
- (Optional) rel-addr: 만약 "raddr" 문자가 있다면 다음 값은 connection-address 이다. ("rport" 와 함께, 진단 및 기타 목적에 유용한 후보자와 관련된 전송 주소이다. 후보 유형이 "host"인 경우 <rel-addr> 및 <rel-port>를 생략해야 한다)
- (Optional) rel-port: 만약 "rport" 문자가 있다면 다음 값은 port 이다.
- (Optional) 확장 속성. "속성 이름" 과 "속성 값" 이 쌍으로 반복적으로 추가될 수 있다.
- generation 0
- network-cost 999
|
a=ice-ufrag:yHMA
a=ice-pwd:un22hWsJE+nP3Pu6HrAFBwIb
a=ice-options:trickle
| ICE 속성 값들을 정의. ICE 후보가 교환되고 나면, 서로를 확인하는 프로세스가 시작되는데 이 때 사용되며 세션과 관련되지 않는 잠재적인 공격을 받지 않도록 한다. |
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
| DTLS 속성 값을 정의. DTLS-SRTP 협상에 사용되는 인증서의 암호화 해시를 포함. |
| DTLS 협상을 시작할 수 있는 피어임을 정의. RFC4145에 의해 정의 되었으며 RFC4572에 의해 갱신되었다. |
| BUNDLE 그룹에 사용되는 미디어 식별자. |
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
| |
| 미디어의 교환 방향을 표시한다. SDP 를 생성할 때 사용하는 createOffer, createAnswer 함수의 option 지정을 통해 sendonly, recvonly, inactive 형태로 변경할 수 있다. |
| |
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
| 위의 m= 라인에서 정의한 페이로드 포맷(RTP payload formats)에 대한 정의. 위의 경우 VP8 코덱의 90000 샘플링 이다. |
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
| a=fmtp: 는 포맷 파라미터 이다. |
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
| |
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
aiortc 의 Local Description 을 Chrome 으로 반환한 answer
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