2016-11-25 233 views
1

我開發一個三星智能電視應用程序與三星的TOAST和Caph角。我在Windows 10上。Kurento RTSP到webRTC

當我打電話給我們的服務器時,我得到一個使用H264編碼的RSRP URL,但在智能電視上,不支持RSRP。然後,我必須將RSRP網址「轉換」爲某個webRTC網址(我對這一切知之甚少,所以很抱歉,如果條款不正確)。

我在這裏和那裏搜索,發現Kurento似乎能夠回答我的需求。

在我的應用程序中嘗試Kurento之前,我想在幾個演示中測試它。 我能夠測試one2many示例沒有任何問題,但我無法運行rtsp2webrtc演示。

我git克隆kms窗口和https://github.com/lulop-k/kurento-rtsp2webrtc並試圖運行演示,但播放器不顯示任何東西。

1)我雙擊公里-WINDOWS \ BIN \ kurento媒體服務器

2)我啓動HTTP服務器在kurento-rtsp2webrtc

3)我到http://localhost:8080/,鍵入我的樣本RTSP URL(RTSP://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov),點擊 「開始」

沒有錯誤似乎發生,看到控制檯日誌:

Local icecandidate {"candidate":"candidate:4033732497 1 udp 2113937151 192.168.0.104 62879 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"audio","sdpMLineIndex":0} 
Local icecandidate {"candidate":"candidate:4033732497 2 udp 2113937150 192.168.0.104 62881 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"audio","sdpMLineIndex":0} 
Local icecandidate {"candidate":"candidate:4033732497 1 udp 2113937151 192.168.0.104 62883 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"video","sdpMLineIndex":1} 
Local icecandidate {"candidate":"candidate:4033732497 2 udp 2113937150 192.168.0.104 62885 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"video","sdpMLineIndex":1} 
PlayerEndpoint-->WebRtcEndpoint connection established 
oniceconnectionstatechange -> checking 
icegatheringstate -> gathering 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.0.104 61810 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.0.104 61810 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 TCP 1019216127 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 TCP 1019216127 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 TCP 1015021823 192.168.0.104 52180 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 TCP 1015021823 192.168.0.104 52180 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 1 UDP 2013266431 fe80::6403:eba1:c2a3:9605 61812 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 1 UDP 2013266431 fe80::6403:eba1:c2a3:9605 61812 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 1 TCP 1019217663 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 1 TCP 1019217663 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 1 TCP 1015023359 fe80::6403:eba1:c2a3:9605 52182 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 1 TCP 1015023359 fe80::6403:eba1:c2a3:9605 52182 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 1 UDP 2013266431 fe80::f99b:72cd:cb28:1424 61814 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 1 UDP 2013266431 fe80::f99b:72cd:cb28:1424 61814 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 1 TCP 1019217663 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 1 TCP 1019217663 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 1 TCP 1015023359 fe80::f99b:72cd:cb28:1424 52184 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 1 TCP 1015023359 fe80::f99b:72cd:cb28:1424 52184 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 1 UDP 2013266431 192.168.56.1 61816 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 1 UDP 2013266431 192.168.56.1 61816 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 1 TCP 1019216895 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 1 TCP 1019216895 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 1 TCP 1015022591 192.168.56.1 52186 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 1 TCP 1015022591 192.168.56.1 52186 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.0.104 61811 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.0.104 61811 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 2 TCP 1019216126 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 2 TCP 1019216126 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 2 TCP 1015021822 192.168.0.104 52181 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 2 TCP 1015021822 192.168.0.104 52181 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 2 UDP 2013266430 fe80::6403:eba1:c2a3:9605 61813 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 2 UDP 2013266430 fe80::6403:eba1:c2a3:9605 61813 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 2 TCP 1019217662 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 2 TCP 1019217662 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 2 TCP 1015023358 fe80::6403:eba1:c2a3:9605 52183 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 2 TCP 1015023358 fe80::6403:eba1:c2a3:9605 52183 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 2 UDP 2013266430 fe80::f99b:72cd:cb28:1424 61815 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 2 UDP 2013266430 fe80::f99b:72cd:cb28:1424 61815 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 2 TCP 1019217662 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 2 TCP 1019217662 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 2 TCP 1015023358 fe80::f99b:72cd:cb28:1424 52185 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 2 TCP 1015023358 fe80::f99b:72cd:cb28:1424 52185 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 2 UDP 2013266430 192.168.56.1 61817 typ host","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 2 UDP 2013266430 192.168.56.1 61817 typ host","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 2 TCP 1019216894 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 2 TCP 1019216894 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 2 TCP 1015022590 192.168.56.1 52187 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"} 
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 2 TCP 1015022590 192.168.56.1 52187 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"} 
Player playing ... 
oniceconnectionstatechange -> connected 
icegatheringstate -> complete 
oniceconnectionstatechange -> completed 
icegatheringstate -> complete 

但玩家不顯示任何東西。我仍然看到微調。

我嘗試添加一個STUN服務器(不知道它是什麼,或者我更需要一個,只要看到這個在文檔或其他計算器的問題)並沒有解決任何問題。

你能幫我嗎? 我做錯了什麼或忘記了什麼嗎? 而且,在將來,當我想將這個功能應用於我的電視網絡應用程序時,我是否只需要包含kurento-client.js和kurento-utils.js文件,或者是否還有其他事情需要處理?

在此先感謝

+0

如果你Kurento服務器位於NAT - 你需要使用TURN服務器它。 –

+0

這是解決方案,謝謝! – Kerhael

+0

如果我幫你,請將我的答案設置爲已解決。謝謝 –

回答

2

STUN服務器無法穿越對稱NAT的使爲此目的,如果你的服務器是NAT後面,那麼你應該嘗試使用TURN服務器

+0

這就是它,非常感謝! – Kerhael

+0

你好艾麗西亞,我面臨同樣的問題。當我開始得到這些消息 - 玩家玩.... oniceconnectionstatechange - >失敗 icegatheringstate - >完整 所以,oniceconnectionstatechange是越來越失敗。 – vishwakarma09

1

如果你Kurento服務器位於NAT - 你需要使用TURN服務器爲它