2017-03-23 24 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行。

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} 

我們的主要問題是,爲什麼我們沒有看到任何ssrc_recv條目 - 即使我們可以看到視頻流流 - 以及我們如何 可以修改/修復我們的代碼顯示的WebRTC,內部那些ssrc_recv條目。我們擔心沒有看到這些條目 是一個更大的跡象,我們在實施中缺少一些東西。然而,是否有可能我們只是遇到Chrome bug的 ?

在這個問題上的任何幫助,不勝感激。

我已經包含以下相關的代碼片段:

首次會議創建電話

POST {}到/ COLIBRI /會議

通道分配調用

PATCH下方到/ COLIBRI /會議/ 9ad7d1fe11a85c1a

{ 
    "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以下/ COLIBRI /會議/ 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內幕

Chrome WebRTC Internals

測試的瀏覽器標籤

enter image description here

回答

1

你是不是能夠看到ssrc_recv因爲當我們從Jitsi videobridge要約,它帶有一些默認的/無原因SSRC。在您提供的SDP中,您可以看到傳入流沒有ssrc。基本上,Jitsi發送另一個包含正確ssrc信息的消息(source-add)。所以,你需要做的setRemoteDescription與SSRC值讓的WebRTC棧知道對應的接收流的實際SSRC,因此,它可以產生輸入數據流的統計信息,並出現在的WebRTC內部也是如此。

+0

感謝您的答覆! Jitsi如何發送源添加消息?我們目前正在使用REST API。有沒有我能打的端點?它是通過數據通道發送的嗎? –

+0

你是如何讓你像傳送信息(候選人),會話發起(提供)等其他叮噹消息?理想情況下,您應該以相同的方式獲得源代碼添加,我指的是您在客戶端和jitsi之間使用的任何信號機制。 –

+0

嗯,我們一直在使用REST API信令(https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md) - 的API已經恢復交通信息等。當我們使我們的初始信道的要求,等等。我可以調用GET /會議/:會議ID和取回響應渠道和更新的頻道的SSRC,但包括在響應沒有交通工具的信息。 –

0

添加上有點@ Harish的回答是:如果你使用的橋樑休息API,我你不使用Jicofo和您使用的是自己的信令實體承擔。如果是這樣,那麼你需要自己做所有的應用程序信號。大概你已經在做一些這個(把這個提議發給客戶)。所以當第一個客戶端加入時,它會從橋的信道分配響應中獲得基礎報價。一旦其他客戶端加入,一些組件(可能是信令服務器)將需要積累它們的ssr並將它們添加到傳出的提議中。