Streaming RTSP into Kurento Server using RtpEndpoint from VLC

3,555 views
Skip to first unread message

Travis James

unread,
Jan 13, 2016, 6:53:52 AM1/13/16
to kurento
I am trying to set up Kurento to receive and RTSP feed from a VLC application attached to a video camera.  My goal is to specify my Kurento instance as the endpoint in the setup of the VLC stream, but all the examples I have found work the other way around.  Kurento expects to PULL the feed from another address as opposed to exposing an endpoint that VLC (or some other app) can use to PUSH the feed into Kurento for redistribution via WebRTC, RTSP, or HTTP.

Does anyone have any sample code or examples of setting up this configuration?

Once again, the key is to have Kurento expose an RTP endpoint for an app to PUSH into--not pull.

Thanks,
Travis

Ivan Gracia

unread,
Jan 13, 2016, 7:48:38 AM1/13/16
to Kurento Public
Why don't you use the RTSP feed directly with the player endpoint? Have a look at this post, in case it suites your needs.

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Travis James

unread,
Jan 13, 2016, 12:02:54 PM1/13/16
to kurento
I saw that example, and it seems that would require Kurento to be on the same network with the computer running VLC (correct me if wrong).  VLC is hooked up to a camera that I want to feed to and instance of Kurento in my cloud, and this example would be trying to PULL the stream from VLC, which does not have a known IP address (once again correct me if I am wrong).

I am trying to stream church services in a low bandwidth area to the Internet for viewers at home to see.  That is the scenario.  A camera streaming to VLC, then VLC pushing that stream to Kurento, where users can attach to a WebRTC endpoint to view church services from home.

Does this article match that scenario and I am missing something?

Travis

Travis James

unread,
Jan 13, 2016, 5:19:27 PM1/13/16
to kurento
I am not sure I am answering my own question, but I found a way to get this done:

Instead of using Kurento to receive the feed directly, I am using Nginx with the nginx-rtmp-module to accept the feed over RTMP (from VLC/camera) and republishing it using FFMPEG.  Kurento will PULL the feed from FFMPEG and push it through the media pipeline.

Thoughts on this approach?  Is there an opportunity here to write a Kurento element module to provide endpoints that support RTSP listening, or is RtpEndpoint able to do this and I just missed something?

Travis

Ivan Gracia

unread,
Jan 18, 2016, 5:02:17 AM1/18/16
to Kurento Public
The player endpoint already supports consuming RTSP feeds. We've used it to get the feed from a city camera from a different place in Spain, so no need to be in the same network. Just the URI needs to be accessible by the KMS. This piece of code should do>

var pipeline = ...//Use Kurento Client API for obtaining your pipeline.

//Create the PlayerEndpoint for receiving from the IP camera. HTTP and RTSP uris are supportd
pipeline.create("PlayerEndpoint", {uri: "rtsp://your.rtsp.address"}, function(error, playerEndpoint){

    //Create the WebRtcEndpoint
    pipeline.create("WebRtcEndpoint", function(error, webRtcEndpoint){
    
    //If working with trickle ice, some code for candidate management is required here.
    
        //Connect playerEndpoint to webRtcEndpoint. This connection activates the agnostic media
        //capability and the appropriate transcodings are configured and activated.
  	playerEndpoint.connect(webRtcEndpoint, function(error){
        
                //Media starts flowing ... enjoy
  		player.play(function(error){
  		});
  	});
    });
});

Ivan Gracia


anton genis

unread,
May 31, 2020, 4:51:42 AM5/31/20
to kurento

Juan Navarro

unread,
Jun 1, 2020, 5:45:31 AM6/1/20
to kur...@googlegroups.com
On 31/5/20 10:51, anton genis wrote:
I am trying to set up Kurento to receive and RTSP feed from a VLC application

If VLC implements an RTSP server, Kurento can be made to consume it by using the PlayerEndpoint. Have a look at the Player tutorial to see it running.

Kurento uses the GStreamer library, which provides an RTSP client, so Kurento can consume an RTSP service: just create a PlayerEndpoint and configure it with the URI of the rtsp:// feed.

On the other hand, there is not any RTSP server available from GStreamer for Kurento to use, so Kurento cannot act as an RTSP server.
Reply all
Reply to author
Forward
0 new messages