RtpEndpoint one2many-call

711 views
Skip to first unread message

d.me...@glowbl.com

unread,
Aug 14, 2015, 5:53:30 AM8/14/15
to kurento
Hello,

I'm trying to edit the node tutorial one2many-call replacing the WebRtcEndpoint with a RtpEndPoint. I want something like WebRtcEndpoint -> RtpEndpoint -> Rtmp server.

So I just changed the WebRtcEndpoint to a RtpEndpoint in the startViewer() function. But it prints this error:

TypeError: Object #<RtpEndpoint> has no method 'addIceCandidate'

What should I edit to make it work ?

I'm using Kurento 6.0, with the latest node tutorials.

Thank you.

Ivan Gracia

unread,
Aug 20, 2015, 3:02:54 PM8/20/15
to Kurento Public
Don't replace the webrtc endpoint, otherwise you won't get the viewer won't get the video in the client page. RTP won't replace webrtc. RTMP will. For that, you'll need to use something like Flowplayer or JWplayer.

Have a look at this post, as it will throw some light on this, and how other users have got this to work. We can guide you from there, but first you need to carefully study what role each piece plays, and what protocol is used where.

Cheers,

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.

d.me...@glowbl.com

unread,
Aug 21, 2015, 3:31:23 AM8/21/15
to kurento
Hello, and thank you for the answer.

I want to use the master as WebRTC, and then generate a RTP sdp file that Wowza can connect to, in order to broadcast it with RTMP. So I could have one WebRTC broadcaster, and x client from every browser, even if WebRTC is not supported.

Is it the way to go ? In the one2many example, it's only WebRTC to WebRTC, and it looks like the sdp generated on the viewer side can't be used in Wowza.

Ivan Gracia

unread,
Aug 21, 2015, 8:21:32 AM8/21/15
to Kurento Public
Yes, that's the way to go. About SDPs, you are mixing couple of concepts here. Though both RTP and WebRTC use session description protocol (SDP) exchange, that doesn't mean they are the same and interchangeable. Actually, if you are going to broadcast through RTMP+Wowza to non-webrtc clients, there is no SDP sent from the browser, as there is no RTCPeerConnection capability (that's why you'll be doing the fallback in the first place, right?) You need to mangle an SDP that Wowza will use to know where the KMS will send the video to. That thread has info as to how the SDP has to look like, and here is how you can stream with Wowza from SDP files.

Once you have all that, you'll need an RTMP client for Wowza, and you'll be all set!

Cheers,

Ivan Gracia


d.me...@glowbl.com

unread,
Aug 21, 2015, 9:58:32 AM8/21/15
to kurento
So, maybe the hello-world example tutorial is better to start with. It generates an SDP that I edit in order to fit Wowza media server, as this post suggest ? Or should I have to create myself an SDP ?
I don't really understand how can the SDP create a "link" between KMS and Wowza, if this SDP is the same for both parts.

Ivan Gracia

unread,
Aug 22, 2015, 6:02:26 AM8/22/15
to Kurento Public

The SDP from webrtc has nothing to do with the one you use in wowza. The latter is “created” by you, with the template that looks more or less like this.

v=0
o=- 0 0 IN IP4 <wowza-ip>
s=
c=IN IP4 <wowza-ip>
t=0 0
m=video <wowza-port> RTP/AVP 100
a=rtpmap:100 H264/90000
a=recvonly

You need to read the whole thread, as the first post’s SDP was not right. Please also have a look at the other link I provided from the Wowza site to learn how to configure Wowza.


Ivan Gracia


d.me...@glowbl.com

unread,
Aug 24, 2015, 3:49:17 AM8/24/15
to kurento
I think I begin to better understand ;-)

So now, in the hello-world example, I replaced the WebRTC endpoint by a RTP endpoint, hardcoded the SDP as suggested (replacing wowza ip and port of course), and processing offer with this SDP.
But I get the following error inside the browser's console:

Failed to set remote answer sdp: Called with SDP without DTLS fingerprint.
Uncaught (in promise) Failed to set remote answer sdp: Called with SDP without DTLS fingerprint.

On the wowza's log, I see that there is communication between Kurento and Wowza:

UDPTransport.firstPacket: 
bind:/<wowza-ip>:<wowza-port> 
msg:/<kurento-ip>:<kurento-video-port>

So maybe the DTLS error prevent me to see the stream while using the test player ?
Where is my mistake ?

Thanks for your patience

Ivan Gracia

unread,
Aug 24, 2015, 5:08:09 AM8/24/15
to Kurento Public
If you are sending the RTP's SDP that you give to wowza to the browser also, you got it all wrong :-P Clients that connect to Wowza don't need an SDP at all. You'll need to adapt the tutorials and change the viewer's part to show an RTMP viewer (flowplayer, JWPlayer...) You can't use RTCPeerConenction with RTMP.

Ivan Gracia


d.me...@glowbl.com

unread,
Aug 24, 2015, 9:10:26 AM8/24/15
to kurento
I already have the RTMP viewer part. I just want a master WebRTC to send his video/audio to Wowza, that will generate the RTMP url that I will give to my RTMP viewer.
Wowza seems to use RTP to connect with SDP file, that's why I'm trying to processOffer the SDP inside a RTP endpoint. What I'm doing is:
  • Create RTP endpoint
  • Hardcode a SDP file that looks like your example
  • ProcessOffer with this SDP
  • Connect
The SDP is the same inside this server.js on the Kurento side, and inside the contents folder on the Wowza side.
Maybe it's more clear now.

Ivan Gracia

unread,
Aug 24, 2015, 9:49:12 AM8/24/15
to Kurento Public

In order to do that, you need to create an RTP endpoint a invoke webrtc.connect(rtp). You don’t need to do anything else on the presenter’s part. Your mangled SDP should by no means arrive at the client. It’s something that stays server-side, between your Wowza instance and the RTP endpoint.

If you are getting that message in the browser, it seems that you are passing the Wowza SDP to the RTCPeerconnection or the WebRTC.

Ivan Gracia

d.me...@glowbl.com

unread,
Aug 24, 2015, 10:56:09 AM8/24/15
to kurento
Yes I was passing the Wowza SDP inside my RtpEndpoint, because in the other post, it was said:
"hardcode this same sdp in kurento app code and process this sdp in rtpEndpoint. it should work then"
So I'm a bit lost. Starting from the hello-world tutorial, I have nothing more to do than creating an RtpEndpoint, and connect it to the existing WebrtcEndpoint ? But when should I use the SDP created in Wowza's side ? When I'm trying to processOffer it in my RtpEndpoint, it brings me to the DTLS fingerprint error.

Ivan Gracia

unread,
Aug 24, 2015, 12:08:10 PM8/24/15
to Kurento Public
I'm lost too... Which SDP are you passing to the RTP endpoint? How did you get that error in the browser then? Is that error also in the KMS log? I think you probably were doing it right, but we got tangled up a bit.

Perhaps if you could you share the code where you are setting up your pipeline, that would be self explanatory :-)

Ivan Gracia


gaurav mishra

unread,
Aug 24, 2015, 12:50:11 PM8/24/15
to kur...@googlegroups.com
 make sure once you are not hitting this issue - 

you can check kurento logs.

d.me...@glowbl.com

unread,
Aug 25, 2015, 4:10:16 AM8/25/15
to kurento
It wasn't a problem with ip6.
I make it works now ! Here is what I did:

Starting with the hello-world node.js tutorial.
  • Adding a hardcoded SDP that fit the IP of Wowza
  • Creating an RTP endpoint
  • Connecting the WebRTC endpoint to the RTP endpoint
  • Add a process offer on the RTP endpoint, with the hardcoded SDP.
My mystake was to replace the webrtc process offer by the rtp process offer, instead of having both, I believe.

Thanks for your help, and keep doing the great job ;)

r...@wtftv.com

unread,
Jan 10, 2016, 1:31:19 AM1/10/16
to kurento, d.me...@glowbl.com
Can you please post or email me the finished code.  I'm trying to do the same thing and am completely lost after trying for about 30 hours of work.

Thanks,

Randy

ph...@paradigmstudios.com.au

unread,
Apr 13, 2016, 9:14:56 PM4/13/16
to kurento, d.me...@glowbl.com
Do you have an example of the code used to make this happen. i'm attempting to do something similar and having a nightmare of a time.

Cheers,
Phil
Reply all
Reply to author
Forward
0 new messages