节点教程一对多没有加载远程服务器Stream Spinner移动无穷无尽

时间:2016-03-10 11:45:34

标签: javascript node.js webrtc kurento

我是新手使用项目中需要的Kurrento,但是当我克隆在Kitnto的git hub上给出的教程并遵循one2Many调用的指令。首先,在我成功解决它们之后,已经有来自adapter.js的打包,但之后出现问题,即我的网络摄像头运行良好,我能够看到我的侧流,但无法看到那里的远程流旋转器是无止境的。

还有两个错误,就像我在我的铬牌控制台上看到的那样: -

var baseAddress = new Uri("http://www.cloudflare.com");
var cookieContainer = new CookieContainer();
using (var client = new HttpClient(new HttpClientHandler() { CookieContainer = cookieContainer } , true) { BaseAddress = baseAddress })
{
    var message = new HttpRequestMessage(HttpMethod.Get, "/");
    //I've also copy-pasted all the headers from browser
    //some of those might be optional
    message.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0");
    message.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
    message.Headers.Add("Accept-Encoding", "gzip, deflate" });
    message.Headers.Add("Accept-Language", "en-US;q=0.5,en;q=0.3");
    //adding CloudFlare cookies
    cookieContainer.Add(new Cookie("__cfduid", "copy-pasted-cookie-value", "/", "cloudflare.com"));
    cookieContainer.Add(new Cookie("cf_clearance", "copy-pasted-cookie-value", "/", "cloudflare.com"));
    var result = await client.SendAsync(message);
    result.EnsureSuccessStatusCode();
}

现在解决了上述错误,我的控制台上没有任何错误

以下是我遵循的步骤 -

1)Failed to parse SessionDescription. m=audio 0 UDP/TLS/RTP/SAVPF
Expects at least 4 fields. 
2)Uncaught (in promise) Failed to parse
SessionDescription. m=audio 0 UDP/TLS/RTP/SAVPF Expects at least 4 fields.

现在kurento示例在端口号:8443上运行

之后我在Chrome浏览器版本上打开了该网址版本46.0.2490.86

之后我见过在HelloWorld示例中说。 屏幕截图位于以下URL中,请检查: -

https://www.evernote.com/shard/s574/sh/589ac65d-00ca-4611-8907-0646d5e0818a/bd2dc0297bde0181cf3271ecc6b7ac09

在消息文本区域中,它将显示: -

1)sudo git clone https://github.com/Kurento/kurento-tutorial-node.git 2)curl -sL https://deb.nodesource.com/setup | sudo bash -  
3)sudo apt-get install -y nodejs  
4)sudo npm install npm -g  
5)cd static 
6)bower install  
7)node server.js

在节点控制台中,我看到以下内容

Page loaded ...
Starting video call ...
Creating WebRtcPeer and generating local sdp offer ...
chrome: {"audio":true,"video":{"optional":[{"minWidth":640},{"maxWidth":640},{"minFramerate":15},{"maxFramerate":15}]}}
constraints: {"mandatory":{"OfferToReceiveAudio":true,"OfferToReceiveVideo":true},"optional":[{"DtlsSrtpKeyAgreement":true}]}
Created SDP offer
Local description set
'v=0
o=- 5127129914819809209 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:BNeugX+OQ8/t6pt3
a=ice-pwd:SXjhj3+kmcW4fSrKgUQE5W4r
a=fingerprint:sha-256 90:C8:D9:31:EC:61:2A:FD:A5:C0:9E:FA:96:04:05:4A:A1:0D:81:46:2B:03:8E:81:BB:B2:AC:23:ED:82:6B:10
a=setup:actpass
a=mid:audio
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=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10; useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
a=ssrc:524015682 cname:aXshARqNMIZF2d2q
a=ssrc:524015682 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk 84518c74-a89d-4e0d-91c6-aa89d3112443
a=ssrc:524015682 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk
a=ssrc:524015682 label:84518c74-a89d-4e0d-91c6-aa89d3112443
m=video 9 UDP/TLS/RTP/SAVPF 100 116 117 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:BNeugX+OQ8/t6pt3
a=ice-pwd:SXjhj3+kmcW4fSrKgUQE5W4r
a=fingerprint:sha-256 90:C8:D9:31:EC:61:2A:FD:A5:C0:9E:FA:96:04:05:4A:A1:0D:81:46:2B:03:8E:81:BB:B2:AC:23:ED:82:6B:10
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=sendrecv
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
a=ssrc-group:FID 390686982 668808432
a=ssrc:390686982 cname:aXshARqNMIZF2d2q
a=ssrc:390686982 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk b0dd89aa-6651-4534-90f6-facded136a0e
a=ssrc:390686982 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk
a=ssrc:390686982 label:b0dd89aa-6651-4534-90f6-facded136a0e
a=ssrc:668808432 cname:aXshARqNMIZF2d2q
a=ssrc:668808432 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk b0dd89aa-6651-4534-90f6-facded136a0e
a=ssrc:668808432 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk
a=ssrc:668808432 label:b0dd89aa-6651-4534-90f6-facded136a0e
'
Invoking SDP offer callback function 182.71.214.253:8443
Senging message: {"id":"start","sdpOffer":"v=0\r\no=- 5127129914819809209 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:BNeugX+OQ8/t6pt3\r\na=ice-pwd:SXjhj3+kmcW4fSrKgUQE5W4r\r\na=fingerprint:sha-256 90:C8:D9:31:EC:61:2A:FD:A5:C0:9E:FA:96:04:05:4A:A1:0D:81:46:2B:03:8E:81:BB:B2:AC:23:ED:82:6B:10\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10; useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:126 telephone-event/8000\r\na=maxptime:60\r\na=ssrc:524015682 cname:aXshARqNMIZF2d2q\r\na=ssrc:524015682 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk 84518c74-a89d-4e0d-91c6-aa89d3112443\r\na=ssrc:524015682 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk\r\na=ssrc:524015682 label:84518c74-a89d-4e0d-91c6-aa89d3112443\r\nm=video 9 UDP/TLS/RTP/SAVPF 100 116 117 96\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:BNeugX+OQ8/t6pt3\r\na=ice-pwd:SXjhj3+kmcW4fSrKgUQE5W4r\r\na=fingerprint:sha-256 90:C8:D9:31:EC:61:2A:FD:A5:C0:9E:FA:96:04:05:4A:A1:0D:81:46:2B:03:8E:81:BB:B2:AC:23:ED:82:6B:10\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:100 VP8/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtpmap:116 red/90000\r\na=rtpmap:117 ulpfec/90000\r\na=rtpmap:96 rtx/90000\r\na=fmtp:96 apt=100\r\na=ssrc-group:FID 390686982 668808432\r\na=ssrc:390686982 cname:aXshARqNMIZF2d2q\r\na=ssrc:390686982 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk b0dd89aa-6651-4534-90f6-facded136a0e\r\na=ssrc:390686982 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk\r\na=ssrc:390686982 label:b0dd89aa-6651-4534-90f6-facded136a0e\r\na=ssrc:668808432 cname:aXshARqNMIZF2d2q\r\na=ssrc:668808432 msid:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk b0dd89aa-6651-4534-90f6-facded136a0e\r\na=ssrc:668808432 mslabel:Y6etb6gLEIhpyR1SAVBocnsUnE2CwrYUJArk\r\na=ssrc:668808432 label:b0dd89aa-6651-4534-90f6-facded136a0e\r\n"}
Local candidate{"candidate":"candidate:3366644091 1 udp 2122260223 192.168.2.140 35246 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:3366644091 1 udp 2122260223 192.168.2.140 35246 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}}
Local candidate{"candidate":"candidate:1239609295 2 udp 1686052606 180.151.85.198 22889 typ srflx raddr 192.168.2.140 rport 49338 generation 0","sdpMid":"video","sdpMLineIndex":1}
Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1239609295 2 udp 1686052606 180.151.85.198 22889 typ srflx raddr 192.168.2.140 rport 49338 generation 0","sdpMid":"video","sdpMLineIndex":1}}
Local candidate{"candidate":"candidate:1239609295 2 udp 1686052606 180.151.85.198 13120 typ srflx raddr 192.168.2.140 rport 45775 generation 0","sdpMid":"audio","sdpMLineIndex":0}
Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1239609295 2 udp 1686052606 180.151.85.198 13120 typ srflx raddr 192.168.2.140 rport 45775 generation 0","sdpMid":"audio","sdpMLineIndex":0}}

我在我的ubuntu机器上使用Kurneto media sever版本:6.4.0

配置文件,即kurento.conf.json如下

Queueing candidate
Connection mj_op2LrzDzfqOCUojr3JJYjBpVxSlcT received message  { id: 'onIceCandidate',
  candidate: 
   { candidate: 'candidate:1239609295 1 udp 1686052607 180.151.85.198 25665 typ srflx raddr 192.168.2.140 rport 42447 generation 0',
     sdpMid: 'video',
     sdpMLineIndex: 1 } }
Queueing candidate
Connection mj_op2LrzDzfqOCUojr3JJYjBpVxSlcT received message  { id: 'onIceCandidate',
  candidate: 
   { candidate: 'candidate:1239609295 2 udp 1686052606 180.151.85.198 22889 typ srflx raddr 192.168.2.140 rport 49338 generation 0',
     sdpMid: 'video',
     sdpMLineIndex: 1 } }
Queueing candidate
Connection mj_op2LrzDzfqOCUojr3JJYjBpVxSlcT received message  { id: 'onIceCandidate',
  candidate: 
   { candidate: 'candidate:1239609295 2 udp 1686052606 180.151.85.198 13120 typ srflx raddr 192.168.2.140 rport 45775 generation 0',
     sdpMid: 'audio',
     sdpMLineIndex: 0 } }
Queueing candidate
reconnect to server 2 200 undefined
reconnect to server 3 300 undefined
reconnect to server 4 500 undefined
reconnect to server 5 800 undefined
reconnect to server 6 1300 undefined
reconnect to server 7 2100 undefined
reconnect to server 8 3400 undefined
reconnect to server 9 5500 undefined
reconnect to server 10 8900 undefined
reconnect to server 11 10000 undefined
reconnect to server 12 10000 undefined
reconnect to server 13 10000 undefined
reconnect to server 14 10000 undefined
reconnect to server 15 10000 undefined

这是无尽的微调器的快照

所以这就是我的代码,机器,版本和配置文件。enter image description here

我在所有教程示例中都遇到了这个问题。

请帮我解决这个问题。 任何帮助,将不胜感激。 感谢

4 个答案:

答案 0 :(得分:1)

我在不同的ubuntu机器上安装了kurento并且它为我工作,我按照以下步骤操作: -

我通过

升级我的dist
  

apt-get dist-upgrade

但在升级你的dist之前要小心,因为它会升级发行版,之后你的某些应用可能无效

然后安装

  

sudo apt-get install libglib2.0-0

之后我安装kurento

  

sudo apt-get install kurento-media-server-6.0

之后我明确安装 openJdk7

最后它对我有用。但之后我的一些应用程序没有在我的机器上工作,如skype等,所以我为那些而不是kurento远程端流问题安装依赖所以最后我从该机器中删除所有内容并仅运行kurento,毫无疑问,工作正常!

由于

答案 1 :(得分:0)

正如我在屏幕截图中看到的那样,您正在使用外部服务器,即。不是一切都是localhost。

在这种情况下,您可能需要根据网络拓扑配置STUN / TURN。有关详细信息,请参阅this链接。

答案 2 :(得分:0)

我遇到了同样的问题。我在端口8888和8433(wss)上的Docker容器内运行KMS。

如果我通过" npm start - --ws_uri = ws://192.168.99.100:8888 / kurento"来运行示例,那么它就可以了。

但是,如果我用" npm start - --ws_uri = wss://192.168.99.100:8433 / kurento"来运行它,那么我的问题和你的一样。而且,原因是在节点应用程序上我没有强迫它接受MKS的自签名证书。见https://github.com/coolaj86/node-ssl-root-cas/wiki/Painless-Self-Signed-Certificates-in-node.js

谢谢, 保

答案 3 :(得分:0)

我遇到了同样的问题:控制台记录了“重新连接到服务器...未定义”,浏览器中的流微调器无休止地移动。幸运的是我的问题很简单。我忘了在重新启动后使用以下命令运行KMS:

sudo service kurento-media-server-6.0 start