2017-03-23 22 views
1

현재 Jitsi를 SFU로 테스트하고 있습니다. COLIBRI REST API를 사용하여 간단한 테스트를 작성하려고합니다. 현재 테스트는 두 개의 탭으로 열리는 JavaScript 클라이언트입니다. 각 탭은 REST API를 통해 Jitsi Videobridge (JVB)에 연결하고 JVB를 통해 다른 클라이언트를 통해 전송 된 비디오를 표시합니다.Jitsi Video Bridge COLIBRI REST API - webrtc-internals에 ssrc_recv 항목이 없습니다.

먼저, 좋은 소식입니다. REST API를 통해 JVB에 연결하고 다른 피어의 비디오 피드를 표시하도록 클라이언트를 구성했습니다. 그러나 chrome : // webrtc-internals는 두 개의 ssrc_send 항목과 ssrc_recv 항목 만 표시합니다. 왜 우리가 비디오를보고 webrtc-internals에 ssrc_recv 항목이 없는지 궁금합니다.

SDP 제안에 다음 ssrc 행을 추가하면 webrtc-internals에 src_recv 항목을 표시 할 수 있음을 알게되었습니다. 그러나 통계에는 ssrc_recvs를 통해 흐르는 미디어가 없습니다. 우리는ssrc 행없이 보았던 비디오 스트림을 잃습니다. 우리가 어떤 ssrc_recv 항목이 표시되지 않는 이유

a=ssrc:${info.contents[0].channels[0].sources[0]} cname:mixed 
a=ssrc:${info.contents[0].channels[0].sources[0]} label:mixedlabelaudio0${sessionId} 
a=ssrc:${info.contents[0].channels[0].sources[0]} msid:mixedmslabel${sessionId} mixedlabelaudio0${sessionId} 

a=ssrc:${info.contents[0].channels[0].sources[0]} mslabel:mixedmslabel${sessionId} 

a=ssrc:${info.contents[1].channels[0].sources[0]} cname:mixed 
a=ssrc:${info.contents[1].channels[0].sources[0]} label:mixedlabelvideo0${sessionId} 
a=ssrc:${info.contents[1].channels[0].sources[0]} msid:mixedmslabel mixedlabelvideo0${sessionId} 
a=ssrc:${info.contents[1].channels[0].sources[0]} mslabel:mixedmslabel${sessionId} 

우리의 주요 질문은 - 우리가 수정하는 방법/WebRTC에-내부에서 그 ssrc_recv 항목을 표시하기 위해 코드를 수정 - 우리는 비디오 스트림이 흐르는 볼 수 있지만. 우리는이 항목이 표시되지 않는다고 생각합니다. 은 구현시 누락 된 더 큰 표시입니다. 그러나 Chrome 버그 인 을 실행하고 있습니까?

이 문제에 대한 도움을 주시면 대단히 감사하겠습니다.

채널 할당 호출

PATCH 아래/콜리 브리/회의에

초기 회의 생성 전화

POST {} :

나는 아래의 관련 코드 조각을 포함했다 ~/colibri/conference/9ad7d1fe11a85c1a

/콜리 브리/회의/9ad7d1fe11a85c1a

{ 
    "id": "9ad7d1fe11a85c1a", 
    "contents": [ 
    { 
     "name": "audio", 
     "channels": [ 
     { 
      "id": "b2c29ad1f4555d04", 
      "expire": 30, 
      "initiator": true, 
      "endpoint": "1490294249498", 
      "direction": "sendrecv", 
      "channel-bundle-id": "1490294249498", 
      "sources": [ 
      1274366703 
      ], 
      "ssrc-groups": [ 
      { 
       "semantics": "SIM", 
       "sources": [ 
       1274366703 
       ] 
      } 
      ], 
      "rtp-level-relay-type": "translator", 
      "payload-types": [ 
      { 
       "id": 111, 
       "name": "opus", 
       "clockrate": 48000, 
       "channels": 2, 
       "parameters": { 
       "fmtp": [ 
        "minptime=10;useinbandfec=1" 
       ] 
       } 
      }, 
      { 
       "id": 103, 
       "name": "ISAC", 
       "clockrate": 16000, 
       "channels": 1 
      }, 
      { 
       "id": 104, 
       "name": "ISAC", 
       "clockrate": 32000, 
       "channels": 1 
      }, 
      { 
       "id": 126, 
       "name": "telephone-event", 
       "clockrate": 8000, 
       "channels": 1 
      } 
      ], 
      "rtp-hdrexts": [ 
      { 
       "id": 1, 
       "uri": "urn:ietf:params:rtp-hdrext:ssrc-audio-level" 
      }, 
      { 
       "id": 3, 
       "uri": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time" 
      } 
      ], 
      "transport": { 
      "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", 
      "rtcp-mux": true, 
      "pwd": "2u1eHOiv1Sc3dF4bEeVM0CP4", 
      "ufrag": "NJe9", 
      "fingerprints": [ 
       { 
       "fingerprint": "71:05:78:40:20:F0:F7:AD:DA:89:D6:F6:22:17:AC:FC:97:2B:1C:25:9A:D1:B6:E7:80:91:C7:72:A6:DE:2C:D3", 
       "hash": "sha-256", 
       "setup": "active" 
       } 
      ], 
      "candidates": [ 
       { 
       "foundation": 3031090232, 
       "component": 1, 
       "transport": "udp", 
       "priority": 2122260223, 
       "ip": "192.168.1.20", 
       "port": 53868, 
       "type": "host", 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 3031090232, 
       "network": 1, 
       "protocol": "udp" 
       }, 
       { 
       "foundation": 1119534572, 
       "component": 1, 
       "transport": "udp", 
       "priority": 1686052607, 
       "ip": "71.229.240.22", 
       "port": 53868, 
       "type": "srflx", 
       "raddr": "192.168.1.20", 
       "rport": 53868, 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 1119534572, 
       "network": 1, 
       "protocol": "udp" 
       }, 
       { 
       "foundation": 4197005512, 
       "component": 1, 
       "transport": "tcp", 
       "priority": 1518280447, 
       "ip": "192.168.1.20", 
       "port": 9, 
       "type": "host", 
       "tcptype": "active", 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 4197005512, 
       "network": 1, 
       "protocol": "tcp" 
       } 
      ] 
      } 
     } 
     ], 
     "sctpconnections": [] 
    }, 
    { 
     "name": "video", 
     "channels": [ 
     { 
      "id": "d4782a7f74565a42", 
      "expire": 30, 
      "initiator": true, 
      "endpoint": "1490294249498", 
      "direction": "sendrecv", 
      "channel-bundle-id": "1490294249498", 
      "sources": [ 
      1305961943 
      ], 
      "rtp-level-relay-type": "translator", 
      "ssrc-groups": [ 
      { 
       "semantics": "SIM", 
       "sources": [ 
       1305961943 
       ] 
      } 
      ], 
      "last-n": 2, 
      "payload-types": [ 
      { 
       "id": 100, 
       "name": "VP8", 
       "clockrate": 90000, 
       "channels": 2, 
       "parameters": { 
       "rtcp-fb": [ 
        "ccm fir", 
        "nack", 
        "nack pli", 
        "goog-remb" 
       ] 
       } 
      } 
      ], 
      "rtp-hdrexts": [ 
      { 
       "id": 3, 
       "uri": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time" 
      } 
      ], 
      "transport": { 
      "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", 
      "rtcp-mux": true, 
      "pwd": "2u1eHOiv1Sc3dF4bEeVM0CP4", 
      "ufrag": "NJe9", 
      "fingerprints": [ 
       { 
       "fingerprint": "71:05:78:40:20:F0:F7:AD:DA:89:D6:F6:22:17:AC:FC:97:2B:1C:25:9A:D1:B6:E7:80:91:C7:72:A6:DE:2C:D3", 
       "hash": "sha-256", 
       "setup": "active" 
       } 
      ], 
      "candidates": [ 
       { 
       "foundation": 3031090232, 
       "component": 1, 
       "transport": "udp", 
       "priority": 2122260223, 
       "ip": "192.168.1.20", 
       "port": 53868, 
       "type": "host", 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 3031090232, 
       "network": 1, 
       "protocol": "udp" 
       }, 
       { 
       "foundation": 1119534572, 
       "component": 1, 
       "transport": "udp", 
       "priority": 1686052607, 
       "ip": "71.229.240.22", 
       "port": 53868, 
       "type": "srflx", 
       "raddr": "192.168.1.20", 
       "rport": 53868, 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 1119534572, 
       "network": 1, 
       "protocol": "udp" 
       }, 
       { 
       "foundation": 4197005512, 
       "component": 1, 
       "transport": "tcp", 
       "priority": 1518280447, 
       "ip": "192.168.1.20", 
       "port": 9, 
       "type": "host", 
       "tcptype": "active", 
       "generation": 0, 
       "network-id": 1, 
       "network-cost": 10, 
       "id": 4197005512, 
       "network": 1, 
       "protocol": "tcp" 
       } 
      ] 
      } 
     } 
     ], 
     "sctpconnections": [] 
    } 
    ], 
    "channel-bundles": [ 
    { 
     "id": "1490294224066", 
     "transport": { 
     "candidates": [ 
      { 
      "generation": 0, 
      "component": 1, 
      "protocol": "tcp", 
      "port": 4443, 
      "ip": "172.31.54.51", 
      "tcptype": "passive", 
      "foundation": "1", 
      "id": "9ad7d1fe11a85c1a5ec5e04d36669ed805534db8", 
      "priority": 2130706431, 
      "type": "host", 
      "network": 0 
      }, 
      { 
      "generation": 0, 
      "component": 1, 
      "protocol": "udp", 
      "port": 10000, 
      "ip": "172.31.54.51", 
      "foundation": "3", 
      "id": "9ad7d1fe11a85c1a5ec5e04d36669ed80553636d", 
      "priority": 2130706431, 
      "type": "host", 
      "network": 0 
      }, 
      { 
      "generation": 0, 
      "rel-port": 4443, 
      "ip": "52.90.200.113", 
      "foundation": "2", 
      "rel-addr": "172.31.54.51", 
      "priority": 1694498815, 
      "type": "srflx", 
      "network": 0, 
      "component": 1, 
      "protocol": "tcp", 
      "port": 4443, 
      "tcptype": "passive", 
      "id": "9ad7d1fe11a85c1a5ec5e04d36669ed80ffffffff8d8edff6" 
      }, 
      { 
      "generation": 0, 
      "rel-port": 10000, 
      "component": 1, 
      "protocol": "udp", 
      "port": 10000, 
      "ip": "52.90.200.113", 
      "foundation": "4", 
      "id": "9ad7d1fe11a85c1a5ec5e04d36669ed80ffffffff8d8ef5ab", 
      "rel-addr": "172.31.54.51", 
      "priority": 1677724415, 
      "type": "srflx", 
      "network": 0 
      } 
     ], 
     "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", 
     "ufrag": "8hvaa1bbu7airb", 
     "rtcp-mux": true, 
     "pwd": "187sh2bf3dl0lfola6goifb988", 
     "fingerprints": [ 
      { 
      "fingerprint": "C2:FF:06:CD:0D:6C:EF:6E:CC:54:CE:2D:F1:68:34:DB:06:B8:79:6A", 
      "setup": "actpass", 
      "hash": "sha-1" 
      } 
     ] 
     } 
    }, 
    { 
     "id": "1490294249498", 
     "transport": { 
     "candidates": [ 
      { 
      "generation": 0, 
      "component": 1, 
      "protocol": "tcp", 
      "port": 4443, 
      "ip": "172.31.54.51", 
      "tcptype": "passive", 
      "foundation": "1", 
      "id": "9ad7d1fe11a85c1a70d346f625a464501524626b", 
      "priority": 2130706431, 
      "type": "host", 
      "network": 0 
      }, 
      { 
      "generation": 0, 
      "component": 1, 
      "protocol": "udp", 
      "port": 10000, 
      "ip": "172.31.54.51", 
      "foundation": "3", 
      "id": "9ad7d1fe11a85c1a70d346f625a4645015247820", 
      "priority": 2130706431, 
      "type": "host", 
      "network": 0 
      }, 
      { 
      "generation": 0, 
      "rel-port": 4443, 
      "ip": "52.90.200.113", 
      "foundation": "2", 
      "rel-addr": "172.31.54.51", 
      "priority": 1694498815, 
      "type": "srflx", 
      "network": 0, 
      "component": 1, 
      "protocol": "tcp", 
      "port": 4443, 
      "tcptype": "passive", 
      "id": "9ad7d1fe11a85c1a70d346f625a46450ffffffff9d5ff4a9" 
      }, 
      { 
      "generation": 0, 
      "rel-port": 10000, 
      "component": 1, 
      "protocol": "udp", 
      "port": 10000, 
      "ip": "52.90.200.113", 
      "foundation": "4", 
      "id": "9ad7d1fe11a85c1a70d346f625a46450ffffffff9d600a5e", 
      "rel-addr": "172.31.54.51", 
      "priority": 1677724415, 
      "type": "srflx", 
      "network": 0 
      } 
     ], 
     "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", 
     "ufrag": "ere4l1bbu7bbf8", 
     "rtcp-mux": true, 
     "pwd": "79r5i3snbhbrca0735vs3v30q4", 
     "fingerprints": [ 
      { 
      "fingerprint": "C2:FF:06:CD:0D:6C:EF:6E:CC:54:CE:2D:F1:68:34:DB:06:B8:79:6A", 
      "setup": "actpass", 
      "hash": "sha-1" 
      } 
     ] 
     } 
    } 
    ], 
    "channel-bundlesFOO": [ 
    { 
     "id": 1490294249498, 
     "transport": { 
     "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", 
     "rtcp-mux": true, 
     "pwd": "2u1eHOiv1Sc3dF4bEeVM0CP4", 
     "ufrag": "NJe9", 
     "fingerprints": [ 
      { 
      "fingerprint": "71:05:78:40:20:F0:F7:AD:DA:89:D6:F6:22:17:AC:FC:97:2B:1C:25:9A:D1:B6:E7:80:91:C7:72:A6:DE:2C:D3", 
      "hash": "sha-256", 
      "setup": "actpass" 
      } 
     ], 
     "candidates": [ 
      { 
      "foundation": 3031090232, 
      "component": 1, 
      "transport": "udp", 
      "priority": 2122260223, 
      "ip": "192.168.1.20", 
      "port": 53868, 
      "type": "host", 
      "generation": 0, 
      "network-id": 1, 
      "network-cost": 10, 
      "id": 3031090232, 
      "network": 1, 
      "protocol": "udp" 
      }, 
      { 
      "foundation": 1119534572, 
      "component": 1, 
      "transport": "udp", 
      "priority": 1686052607, 
      "ip": "71.229.240.22", 
      "port": 53868, 
      "type": "srflx", 
      "raddr": "192.168.1.20", 
      "rport": 53868, 
      "generation": 0, 
      "network-id": 1, 
      "network-cost": 10, 
      "id": 1119534572, 
      "network": 1, 
      "protocol": "udp" 
      }, 
      { 
      "foundation": 4197005512, 
      "component": 1, 
      "transport": "tcp", 
      "priority": 1518280447, 
      "ip": "192.168.1.20", 
      "port": 9, 
      "type": "host", 
      "tcptype": "active", 
      "generation": 0, 
      "network-id": 1, 
      "network-cost": 10, 
      "id": 4197005512, 
      "network": 1, 
      "protocol": "tcp" 
      } 
     ] 
     } 
    } 
    ] 
} 

크롬의 WebRTC 내부 구조에 아래는

{ "id": "9ad7d1fe11a85c1a", "contents": [ { "name": "audio", "channels": [ { "expire": 60, "initiator": true, "endpoint": 1490294249498, "direction": "sendrecv", "channel-bundle-id": 1490294249498, "rtp-level-relay-type": "mixer" } ] }, { "name": "video", "channels": [ { "expire": 60, "initiator": true, "endpoint": 1490294249498, "direction": "sendrecv", "channel-bundle-id": 1490294249498, "last-n": 2 } ] } ], "channel-bundles": [ { "id": 1490294249498, "transport": { "xmlns": "urn:xmpp:jingle:transports:ice-udp:1", "rtcp-mux": true, "fingerprint": { "xmlns": "urn:xmpp:jingle:apps:dtls:0", "required": false } } } ] } 

SDP의 제공

v=0 
o=- 1490294249719 2 IN IP4 0.0.0.0 
s=- 
t=0 0 
a=group:BUNDLE audio video 
m=audio 1 RTP/SAVPF 111 103 104 126 
c=IN IP4 0.0.0.0 
a=rtpmap:111 opus/48000/2 
a=rtpmap:103 ISAC/16000 
a=rtpmap:104 ISAC/32000 
a=rtpmap:126 telephone-event/8000 
a=fmtp:111 minptime=10; useinbandfec=1 
a=rtcp:1 IN IP4 0.0.0.0 
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level 
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time 
a=setup:actpass 
a=mid:audio 
a=sendrecv 
a=ice-ufrag:ere4l1bbu7bbf8 
a=ice-pwd:79r5i3snbhbrca0735vs3v30q4 
a=fingerprint:sha-1 C2:FF:06:CD:0D:6C:EF:6E:CC:54:CE:2D:F1:68:34:DB:06:B8:79:6A 
a=candidate:9ad7d1fe11a85c1a70d346f625a464501524626b 1 tcp 2130706431 172.31.54.51 4443 typ host generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a4645015247820 1 udp 2130706431 172.31.54.51 10000 typ host generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a46450ffffffff9d5ff4a9 1 tcp 1694498815 52.90.200.113 4443 typ srflx raddr 172.31.54.51 rport 4443 generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a46450ffffffff9d600a5e 1 udp 1677724415 52.90.200.113 10000 typ srflx raddr 172.31.54.51 rport 10000 generation 0 
a=rtcp-mux 
m=video 1 RTP/SAVPF 100 
c=IN IP4 0.0.0.0 
a=rtpmap:100 VP8/90000 
a=fmtp:100 x-google-start-bitrate=800 
a=rtcp:1 IN IP4 0.0.0.0 
a=rtcp-fb:100 ccm fir 
a=rtcp-fb:100 nack 
a=rtcp-fb:100 nack pli 
a=rtcp-fb:100 goog-remb 
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time 
a=setup:actpass 
a=mid:video 
a=sendrecv 
a=ice-ufrag:ere4l1bbu7bbf8 
a=ice-pwd:79r5i3snbhbrca0735vs3v30q4 
a=fingerprint:sha-1 C2:FF:06:CD:0D:6C:EF:6E:CC:54:CE:2D:F1:68:34:DB:06:B8:79:6A 
a=candidate:9ad7d1fe11a85c1a70d346f625a464501524626b 1 tcp 2130706431 172.31.54.51 4443 typ host generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a4645015247820 1 udp 2130706431 172.31.54.51 10000 typ host generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a46450ffffffff9d5ff4a9 1 tcp 1694498815 52.90.200.113 4443 typ srflx raddr 172.31.54.51 rport 4443 generation 0 
a=candidate:9ad7d1fe11a85c1a70d346f625a46450ffffffff9d600a5e 1 udp 1677724415 52.90.200.113 10000 typ srflx raddr 172.31.54.51 rport 10000 generation 0 
a=rtcp-mux 

JSON/COLIBRI 대답

PATCH

Chrome WebRTC Internals

테스트 브라우저 탭

enter image description here

답변

1

우리가 Jitsi의 videobridge에서 제안을 얻을 때, 그것은 몇 가지 기본/함께 제공하기 때문에 아니오 ssrc_recv을 볼 수없는 이유 ssrc. 제안 SDP에서 들어오는 스트림에 대한 ssrc가 없음을 알 수 있습니다. 기본적으로 Jitsi는 올바른 ssrc 정보가 들어있는 다른 메시지 (source-add)를 보냅니다. 그래서, 우리는 수신 스트림에 대한 통계를 생성하고 webrtc-internal에도 나타날 수 있도록 webrtc stack이 수신 스트림에 해당하는 실제 ssrc를 알 수 있도록 해당 ssrc 값과 함께 setRemoteDescription을 수행해야합니다.

+0

응답 해 주셔서 감사합니다. Jitsi가 소스 추가 메시지를 보내는 방법은 무엇입니까? 현재 REST API를 사용 중입니다. 내가 칠 수있는 엔드 포인트가 있습니까? 데이터 채널을 통해 전송됩니까? –

+0

transport-info (후보자), sesion-initiate (Offer) 등과 같은 다른 징글 메시지를 어떻게 받습니까? 이상적으로, 같은 방법으로 소스 추가를해야합니다. 클라이언트와 jitsi간에 사용하는 신호 메커니즘이 무엇이든간에 말입니다. –

+0

흠, 시그널링을 위해 REST API를 사용했습니다 (https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md). API가 전송 정보 등을 반환했습니다. . 우리가 초기 채널 요청 등을 할 때 GET/conference/: conference-id를 호출하고 응답에서 채널과 업데이트 된 채널 ssrcs를 얻을 수 있지만 응답에 포함 된 전송 정보는 없습니다. –

0

@ Harish의 답변에 조금 추가 : 브릿지 레스트 API를 사용하는 경우 Jicofo를 사용하지 않고 자신의 신호 엔티티를 사용하고 있다고 가정합니다. 그렇다면, 당신은 당신 자신의 모든 어플리케이션 시그널링을 할 필요가있을 것입니다. 이미 고객에게 제공하기 위해 이미이 작업 중 일부를 수행하고 있습니다. 따라서 첫 번째 클라이언트가 가입하면 브리지의 채널 할당 응답을 기반으로 구축 된 기본 오퍼링을 얻게됩니다. 다른 클라이언트가 가입하면 일부 구성 요소 (시그널링 서버)는 ssrcs를 누적하여 발신 제안에 추가해야합니다.