Coder Social home page Coder Social logo

lulop-k / kurento-rtsp2webrtc Goto Github PK

View Code? Open in Web Editor NEW
565.0 565.0 155.0 177 KB

This example shows how to transform a RTSP feed or an HTTP feed into a low latency WebRTC stream in a simple and seamless manner.

CSS 10.48% HTML 26.27% JavaScript 63.25%

kurento-rtsp2webrtc's People

Contributors

igracia avatar lulop-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kurento-rtsp2webrtc's Issues

low resolution issue

Hi, I tried kurento-rtsp2webrtc in LAN and then found that the video has very low resolution.
By the way, CPU consumes very low.

Bower components not found? Demo wont work

Hello,
Just downloaded this demo to try out. I get an infinite loading bar on the web player. I have tried both firefox and chrome. I get some output errors from my http-server such as....

"GET /bower_components/adapter.js/adapter.js" Error (404): "Not found"
"GET /bower_components/kurento-client/js/kurento-client.js" Error (404): "Not found"
"GET /bower_components/kurento-utils/js/kurento-utils.js" Error (404): "Not found"

What am i missing? Thanks!

Simple question

I dont understand this line of the readme document:

"Then, in each demo folder execute this command:"

Can anyone help me?

High server load

I think the kurento-media-server must be transcoding because the CPU load is 50% - is there any way to show the original H.264 video from the rtsp camera over webRTC without transcoding?

EDIT: Adding pipeline.create("PlayerEndpoint", {uri: address.value, useEncodedMedia: false} seems to have no effect :(

Is it possible to show loader during video stutter?

I need to show a loader while stream form ip cam is buffering as video quality degrades too much and video starts to stutter.
I have googled a lot but found nothing. Please suggest any method to show loader before video stutter.

Player stuck at loading gif, Console message - Player playing..

Browser not receiving the video stream and player remains stuck in loading gif state.

Tried to setup TURN server (Node-turn & coturn) and ice server as follows -

ws_uri: 'ws://' + '107.108.207.92' + ':8888/kurento',
ice_servers: '[{"urls": "turn:107.122.13.15:3478", "username": "optional-username", "credential": "auth-token"}]'

Master branch throws below exception with ice_server.
urentoUtils.WebRtcPeer.prototype.server.iceServers = JSON.parse(args.ice_servers);

"cannot find server of undefined"

Release 5.1 accepts TURN config but RTCPeerConnection doesn't return any object

this.pc = new RTCPeerConnection(server, options);

Console shows below message -

Created SDP offer
Local description set
ICE negotiation completed
SDP answer received, setting remote description
PlayerEndpoint-->WebRtcEndpoint connection established
Player playing ..

Kurento media server examples based on MAVEN and spring boot are working on my system but rtsp2webrtc fails.

Queries -

  1. Is TURN server needed ? Is TURN server supposed to be installed on the same system as KMS. (MY KMS is installed on remote)
  2. What will be ws-uri. Is it supposed to be same as KMS ? (ws://' + '107.108.207.92' + ':8888/kurento',)
  3. What all configuration needed for TURN (config coturn/node-turn, ICE server on client, KMS config file)

Please help to resolve the issue. Thanks

Complex question

Hi, I am new in this world and I need help to start this demo.

Running in Ubuntu 16.04 I has KMS running (checked with ps and netstat, it is ok) and I has the http-server running from the kurento-rtsp2webrtc folder.
The web app is running fine, using this url

http://localhost:8080/index.html?ws_uri=ws://192.168.19.173:8888/kurento

But when I click START I get the follow console result

`Local icecandidate {"candidate":"candidate:0 1 UDP 2122252543 192.168.19.173 55667 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:3 1 TCP 2105524479 192.168.19.173 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:0 2 UDP 2122252542 192.168.19.173 43966 typ host","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:3 2 TCP 2105524478 192.168.19.173 9 typ host tcptype active","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:0 1 UDP 2122252543 192.168.19.173 45953 typ host","sdpMid":"sdparta_1","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:3 1 TCP 2105524479 192.168.19.173 9 typ host tcptype active","sdpMid":"sdparta_1","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:0 2 UDP 2122252542 192.168.19.173 50243 typ host","sdpMid":"sdparta_1","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:3 2 TCP 2105524478 192.168.19.173 9 typ host tcptype active","sdpMid":"sdparta_1","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:1 1 UDP 1686052863 200.69.204.19 55667 typ srflx raddr 192.168.19.173 rport 55667","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:1 2 UDP 1686052862 200.69.204.19 43966 typ srflx raddr 192.168.19.173 rport 43966","sdpMid":"sdparta_0","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:1 1 UDP 1686052863 200.69.204.19 45953 typ srflx raddr 192.168.19.173 rport 45953","sdpMid":"sdparta_1","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:1 2 UDP 1686052862 200.69.204.19 50243 typ srflx raddr 192.168.19.173 rport 50243","sdpMid":"sdparta_1","sdpMLineIndex":1}
PlayerEndpoint-->WebRtcEndpoint connection established
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 fe80::e57b:7942:183d:3acb 24430 typ host","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 fe80::e57b:7942:183d:3acb 24430 typ host","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:2 1 TCP 1015022847 fe80::e57b:7942:183d:3acb 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:2 1 TCP 1015022847 fe80::e57b:7942:183d:3acb 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:3 1 TCP 1010828543 fe80::e57b:7942:183d:3acb 50052 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:3 1 TCP 1010828543 fe80::e57b:7942:183d:3acb 50052 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:4 1 UDP 2013266430 192.168.19.173 52267 typ host","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:4 1 UDP 2013266430 192.168.19.173 52267 typ host","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:5 1 TCP 1015022079 192.168.19.173 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:5 1 TCP 1015022079 192.168.19.173 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:6 1 TCP 1010827775 192.168.19.173 13760 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:6 1 TCP 1010827775 192.168.19.173 13760 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 fe80::e57b:7942:183d:3acb 65154 typ host","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 fe80::e57b:7942:183d:3acb 65154 typ host","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:2 2 TCP 1015022846 fe80::e57b:7942:183d:3acb 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:2 2 TCP 1015022846 fe80::e57b:7942:183d:3acb 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:3 2 TCP 1010828542 fe80::e57b:7942:183d:3acb 20350 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:3 2 TCP 1010828542 fe80::e57b:7942:183d:3acb 20350 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:4 2 UDP 2013266429 192.168.19.173 4450 typ host","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:4 2 UDP 2013266429 192.168.19.173 4450 typ host","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
oniceconnectionstatechange -> checking
icegatheringstate -> complete
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:5 2 TCP 1015022078 192.168.19.173 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:5 2 TCP 1015022078 192.168.19.173 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"sdparta_1"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:6 2 TCP 1010827774 192.168.19.173 62129 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"sdparta_0"}
Remote icecandidate {"module":"kurento","type":"IceCandidate","candidate":"candidate:6 2 TCP 1010827774 192.168.19.173 62129 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"sdparta_1"}

reconnect to server
reconnect to server
. . .
reconnect to server

oniceconnectionstatechange -> failed
icegatheringstate -> complete

reconnect to server
Error: Request has timed out

reconnect to server
reconnect to server
. . .
reconnect to server`

I will be working on that, but I wonder if any can help me :)

it doesn't work

it doesn't work when rtsp like 'rtsp://ip:554/pag://ip:cameraid:0:MAIN:TCP'.
test in hiKvison iVMS-8600.
who can help me?

Set source URL

What to input on set source URL?
example i put: rtsp://admin:[email protected]/37777
On console it keeps showing "reconnect server"

Thank before hand

websocket issue

I have a problem with websocket connection

I don't understand why .

I have clone the project in visual sudio

install all the dependecy

the local server work well I load the HTML page on local server 192.168.1.4:8086

when when i put a stream url in the imput

kurento-client.js:51421 WebSocket connection to 'ws://192.168.1.4:8081/' failed: Error during WebSocket handshake: Unexpected response code: 200
ws @ kurento-client.js:51421
WebsocketStream @ kurento-client.js:51311
WebsocketStream @ kurento-client.js:51294
(anonymous) @ kurento-client.js:48028
attempt @ kurento-client.js:47932
emitTwo @ kurento-client.js:19855
emit @ kurento-client.js:19926
Backoff.onBackoff_ @ kurento-client.js:5058
18:15:48.291

or when i keep original ws port

WebSocket connection to 'ws://192.168.1.4:8888/kurento' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Question of consultation

I want to display a few IP cameras in my web project. I understand that I need PlayerEndpoint for each one of them, buy am I need to create a new WebRtcEndpoint to each one? or can I use only one WebRtcEndpoint for all the PlayerEndpoints? (just to clarify, I want to display video per camera)

Latency Issue

Hi,

This looks very promising and I wanted to look into it more.
I got about 1-2 seconds delay compared to the original rtsp stream(when viewed by VLC).
Is it possible to improve this? Maybe reduce the buffer somehow?
I want to get to latency that is below 1 second.

I looked at the kurento-media-server logs and I got this exception:
** (kurento-media-server:835): CRITICAL **: gst_video_encoder_set_latency: assertion 'GST_CLOCK_TIME_IS_VALID (min_latency)' failed

Maybe it has something to do with the latency issue that I have?

Thanks!

autoplay

How to open the page and play it automatically?

player playing not worked

everything prepared, and no error. but no remote picture. the console log:

......
console.js:77 oniceconnectionstatechange -> checking
console.js:77 icegatheringstate -> gathering
console.js:77 oniceconnectionstatechange -> connected
console.js:77 icegatheringstate -> complete

kurento 6.15.

Untitled

we have to access out side of local network but not working.

in local network working fine and for outside network we have to used turn server

source url

how can i install ice server on windows.
reconnect to server
how can i fix it

README fix: ws_url -> ws_uri

Readme.md currently mentions parameter ws_url, while the code actually requires ws_uri.

Please, fix this. This might cause some trouble to unaware users.

my IP camera URL

Dear all,
I have an IP camera connected to my eth0 and I can see the UDP packets streaming by using Wireshark. Is there any way to know the source URL by means of Wireshark information?
I have tried rtsp://dest_IP (with dest_IP being the destination address of UDP packets that camera sends), but it does not work... I also tried rtsp://dest_IP/dest_port.

Any idea?

[HELP]

I have everything running and working but when I enter my rtsp url (which works in VLC) it says reconnect to server on a loop in the console. Can anyone help me fix this issue?

Accessintg the stream from a different machine

I have setup this project and the Kurento Media Server on a linux machine on my network (10.0.11.72)
When I try to connect this project with another camera, I'm actually getting the stream on the browser.

However, when I have tried to access the webpage of this project from my windows machine running on 10.0.10.230, I can connect to the webpage of this project when I access it using 10.0.11.72:8080.

However when I try to connect to the same camera, the camera stream doesn't appear on the browser. Are there any other config that was require for this implementation to work?

I have also tried

  1. Disabling the Firewall of the Linux machine
  2. Enabling the Firewall of the Linux machine and allow ports 8080, 8888, 9090, 9091
  3. Added a proper set of TURN and STUN servers
  4. Changed the config file of the Kurento Media Server with the following settings.
  "HttpEndpoint" : {
     "serverAddress" : "10.0.11.76",
    "port" : 9091
  },

Are there any other steps that I need to follow?

Doesn't work - WebSocket connection error

WebSocket connection to 'ws://localhost:8888/kurento' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Tried both default URL and URL from my own IP-camera that works fine in VLC.

Edge support

Fyi, getting this javascript error when running in Edge.
SCRIPT438: Object doesn't support property or method 'addEventListener'
kurento-utils.js (208,4)
Thanks
--Andy

no suitable plugins found:

I am trying to play this rtsp stream to webRTC
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov

i get below error at server, installed Gstreamer, still the same issue, any ideas?

gstrtspsrc.c(6413): gst_rtspsrc_setup_streams (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3/GstRTSPSrc:source

0:03:53.124006000 1 0x7f293c0afb70 ERROR rtspsrc gstrtspsrc.c:6664:gst_rtspsrc_open_from_sdp: setup failed

0:03:53.124796300 1 0x7f293c0afb70 WARN glib GStreamer:0:: Element 'udpsrc1' is not in bin 'source'

0:03:53.124967600 1 0x7f293c0afb70 WARN glib GStreamer:0:: Element 'udpsrc2' is not in bin 'source'

0:03:53.125044300 1 0x7f293c0afb70 WARN glib GStreamer:0:: Element 'udpsrc4' is not in bin 'source'

0:03:53.125098500 1 0x7f293c0afb70 WARN glib GStreamer:0:: Element 'udpsrc5' is not in bin 'source'

0:03:53.125138000 1 0x7f293c0afb70 WARN rtspsrc gstrtspsrc.c:6880:gst_rtspsrc_open: can't setup streaming from sdp

0:03:53.126501400 1 0x55800b658270 ERROR KurentoMediaPipelineImpl MediaPipelineImpl.cpp:69:processBusMessage: Error code 12: 'Your GStreamer installation is missing a plug-in.', element: kmsplayerendpoint3, parent: pipeline3

0:03:53.126560400 1 0x55800b658270 ERROR KurentoMediaPipelineImpl MediaPipelineImpl.cpp:72:processBusMessage: Debugging info: gsturidecodebin.c(1006): no_more_pads_full (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3:

no suitable plugins found:

gstrtspsrc.c(6413): gst_rtspsrc_setup_streams (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3/GstRTSPSrc:source

0:03:53.126637300 1 0x55800b658270 ERROR KurentoMediaElementImpl MediaElementImpl.cpp:281:processBusMessage: Error code 12: 'Your GStreamer installation is missing a plug-in.', element: kmsplayerendpoint3, parent: kmsplayerendpoint3

0:03:53.126659200 1 0x55800b658270 ERROR KurentoMediaElementImpl MediaElementImpl.cpp:284:processBusMessage: Debugging info: gsturidecodebin.c(1006): no_more_pads_full (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3:

no suitable plugins found:

gstrtspsrc.c(6413): gst_rtspsrc_setup_streams (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3/GstRTSPSrc:source

0:03:53.126707900 1 0x55800b658270 ERROR playerendpoint kmsplayerendpoint.c:1338:process_bus_message: Error code 12: 'Your GStreamer installation is missing a plug-in.', element: uridecodebin3, parent: internalpipeline

0:03:53.126728800 1 0x55800b658270 ERROR playerendpoint kmsplayerendpoint.c:1341:process_bus_message: Debugging info: gsturidecodebin.c(1006): no_more_pads_full (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3:

no suitable plugins found:

gstrtspsrc.c(6413): gst_rtspsrc_setup_streams (): /GstPipeline:internalpipeline/GstURIDecodeBin:uridecodebin3/GstRTSPSrc:source

0:04:00.330589600 1 0x7f293001b6f0 INFO KurentoWebSocketTransport WebSocketTransport.cpp:346:keepAliveSessions: Keep alive b9b89de2-44d0-47fd-94ec-725cb8bd6adc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.