Kurento and Wowza integration

2,445 views
Skip to first unread message

ki...@streaminggalicia.com

unread,
Nov 17, 2015, 6:05:14 AM11/17/15
to kurento
I´m trying to integrate Kurento and Wowza. My idea is to stream a video from the Kurento server to a publication point in Wowza, because of scalability reasons. Is this possible? 

I'm using group call example and I need to stream one video from one particular user to the Wowza server.

Ivan Gracia

unread,
Nov 17, 2015, 6:07:47 AM11/17/15
to Kurento Public
Yes, this is possible. Please search in the list for this topic, as it has been asked quite a number of times.

Ivan Gracia



On Tue, Nov 17, 2015 at 12:05 PM, <ki...@streaminggalicia.com> wrote:
I´m trying to integrate Kurento and Wowza. My idea is to stream a video from the Kurento server to a publication point in Wowza, because of scalability reasons. Is this possible? 

I'm using group call example and I need to stream one video from one particular user to the Wowza server.

--
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.

ya...@streaminggalicia.com

unread,
Nov 18, 2015, 6:32:54 AM11/18/15
to kurento
Hi!

I'm trying with the HelloWorld example. Here is the code:

MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
webRtcEndpoint.connect(webRtcEndpoint);

RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build();
rtpEndpoint.connect(rtpEndpoint);
UserSession user = new UserSession();
user.setMediaPipeline(pipeline);
user.setWebRtcEndpoint(webRtcEndpoint);
users.put(session.getId(), user);

String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);
JsonObject response = new JsonObject();
response.addProperty("id", "startResponse");
response.addProperty("sdpAnswer", sdpAnswer);
String rtp_sdp = "v=0\n" +
                    "o=- 0 3641150070 IN IP4 1.2.3.4\r\n" +
                    "s=Wowza Media Server\r\n" +
                    "c=IN IP4 1.2.3.4\r\n" +
                    "t=0 0\r\n" +
                    "m=audio 43684 RTP/AVP 0\r\n" +
                    "a=rtpmap:0 PCMU/8000\r\n" +
                    "a=ssrc:3610119879 cname:user3527564918@host-d993465d\r\n" +
                    "m=video 45752 RTP/AVP 101\r\n" +
                    "a=rtpmap:101 H264/90000\r\n" +
                    "a=ssrc:276641451 cname:user3527564918@host-d993465d";

String sdpOfferRTP = rtpEndpoint.processOffer(rtp_sdp);

but it doesn't work. I want to stream the video to the Wowza server. If my server's IP is 1.2.3.4 in the port 1935 and I want to stream the video to rtmp://1.2.3.4:1935/live/room1, How will I to generate my sdp file? Have I to put the .sdp file in the Wowza content folder?

What is wrong in the code?

Ivan Gracia

unread,
Nov 18, 2015, 6:46:24 AM11/18/15
to Kurento Public

@Yago The code is definitely not ok. This

rtpEndpoint.connect(rtpEndpoint);

doesn’t make sense at all, as you are connecting the rtpEndpoint with itself. The semantics of the connect method is quite straightforward: source.connect(sink). By doing that, you are connecting the rtp endpoint with itself.

Please do search in the list, as this topic is quite popular.


Ivan Gracia



ya...@streaminggalicia.com

unread,
Nov 18, 2015, 7:47:15 AM11/18/15
to kurento
I've changed the code and now it looks like that:

RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build();
   webRtcEndpoint.connect(rtpEndpoint);
    String rtp_sdp = "v=0\n" +
                   "o=- 0 3641150070 IN IP4 1.2.3.4\n" +
                   "s=Wowza Media Server\n" +
                   "c=IN IP4 1.2.3.4\n" +
                   "t=0 0\n" +
                   "m=audio 43684 RTP/AVP 0\n" +
                   "a=rtpmap:0 PCMU/8000\n" +
                   "a=ssrc:3610119879 cname:user3527564918@host-d993465d\n" +
                   "m=video 45752 RTP/AVP 101\n" +
                   "a=rtpmap:101 H264/90000\n" +
                   "a=ssrc:276641451 cname:user3527564918@host-d993465d";
   String sdpOfferRTP = rtpEndpoint.processOffer(rtp_sdp);

I connected the webRtcEndpoint to the rtpEndpoint. Now I want to feed my SDP to the RTP endpoint as offer.  Making this and printing the result (sdpOfferRTP) I got:


v=0
o=- 3656838047 3656838047 IN IP4 0.0.0.0
s=Kurento Media Server
c=IN IP4 0.0.0.0
t=0 0
m=audio 57650 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ssrc:2238404728 cname:user2097052050@host-fd25c288
m=video 40078 RTP/AVP 101
a=rtpmap:101 H264/90000
a=ssrc:886902040 cname:user2097052050@host-fd25c288

and it doesn't work because the IPs and the server in the processed offer change. Any solution for this problem?



Ivan Gracia

unread,
Nov 18, 2015, 7:53:49 AM11/18/15
to Kurento Public
@Yago Again, please read those posts that talk about Wowza and Kurento. If you want to send video from KMS to Wowza, you don't need to do anything with the processed offer. Of course the processed offer (a.k.a the answer) will have different IPs that the offer itself, if they are located in different servers. 

Ivan Gracia



kike...@gmail.com

unread,
Nov 23, 2015, 7:52:40 AM11/23/15
to kurento
Alright, it's working right now.

Now we ran into another issue: 
How to disconnect the rtpEndpoint? Wowza is still receiving data although we close the example. And, when we reopen it, the stream stops working.

We are doing this: webRtcEndpoint.disconnect(rtpEndpoint); in the stop method, but it doesn't work.

Jose Antonio Santos Cadenas

unread,
Nov 23, 2015, 9:08:38 AM11/23/15
to kurento
rtpEndpoint.release()

This will destroy rtpendpoint and flow will stop.

ya...@streaminggalicia.com

unread,
Nov 25, 2015, 6:31:19 AM11/25/15
to kurento
Hi!

I'm wondering if it is possible to publish the stream in the Wowza server from the HelloWorld application in Kurento. Now, I have to upload manually my .sdp file to [install-dir]/content folder on the Wowza Streaming Engine and then I have to connect my .sdp file with the application. It's possible to do it from the application?

Ivan Gracia

unread,
Nov 25, 2015, 9:32:28 AM11/25/15
to Kurento Public
There are two separate things here: first is sending your stream to Wowza through an RTP endpoint, doing the sdp thing you are commenting. Second is connecting to the Wowza server to consume that stream. For the first one, there's this post, and quite a lot of info in the list. For the second part, you'll have to decide what type of stream do you want Wowza to produce, and consume that with the appropriate client.

Ivan Gracia



On Wed, Nov 25, 2015 at 12:31 PM, <ya...@streaminggalicia.com> wrote:
Hi!

I'm wondering if it is possible to publish the stream in the Wowza server from the HelloWorld application in Kurento. Now, I have to upload manually my .sdp file to [install-dir]/content folder on the Wowza Streaming Engine and then I have to connect my .sdp file with the application. It's possible to do it from the application?

--

Nobot Nobot

unread,
Dec 22, 2015, 7:45:45 AM12/22/15
to kurento
Hi, in my case - when i Call rtpEndpoint.release() - rtp flow still alive

понедельник, 23 ноября 2015 г., 16:08:38 UTC+2 пользователь Jose Antonio Santos Cadenas написал:

Ivan Gracia

unread,
Dec 22, 2015, 11:22:17 AM12/22/15
to Kurento Public
That is really awkward. Are you sure that you are releasing the endpoint correctly, and that after releasing the RTP flow is still alive? Please chekc with the latest version of KMS and matching version of whichever kurento-client you are using.

Ivan Gracia


r...@wtftv.com

unread,
Jan 10, 2016, 1:27:14 AM1/10/16
to kurento, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Hi,

Were you ever able to get this to work with the HelloWorld application?  If so, could you please post the code.  I'm trying to do this and have spent many many hours on it and am completely lost.

Thanks,

Randy

Ivan Gracia

unread,
Jan 11, 2016, 4:04:59 AM1/11/16
to Kurento Public, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Where did you get stuck?

Ivan Gracia



--

ya...@streaminggalicia.com

unread,
Jan 11, 2016, 4:56:07 AM1/11/16
to kurento, ki...@streaminggalicia.com
Hi,

Here are the steps we've followed:

1. Create an RTP endpoint.
2. Connect the endpoints webRTC and RTP.
3. Hardcode a SDP offer like this:

String rtp_sdp = "v=0\n" +
                    "o=- 0 3641150070 IN IP4 1.2.3.4\r\n" +
                    "s=Wowza Media Server\r\n" +
                    "c=IN IP4 1.2.3.4\r\n" +
                    "t=0 0\r\n" +
                    "m=audio 43684 RTP/AVP 0\r\n" +
                    "a=rtpmap:0 PCMU/8000\r\n" +
                    "a=ssrc:3610119879 cname:user3527564918@host-d993465d\r\n" +
                    "m=video 45752 RTP/AVP 101\r\n" +
                    "a=rtpmap:101 H264/90000\r\n" +
                    "a=ssrc:276641451 cname:user3527564918@host-d993465d";

where 1.2.3.4 is the IP address of the Wowza  Media Server.

4. processOffer(requestSdp) on the RTP endpoint.

First of all you have to create a .sdp file copying the rtp_sdp string and upload it to the content folder of your Wowza application. Then, you have to publish the stream like here.

Randy Adams

unread,
Jan 11, 2016, 4:59:45 AM1/11/16
to kur...@googlegroups.com, ki...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Hi,

Thanks for this!

Could you please send me the server.js code?

Thanks,

Randy


--
You received this message because you are subscribed to a topic in the Google Groups "kurento" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kurento/rvcO5BSJmcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kurento+u...@googlegroups.com.

Randy Adams

unread,
Jan 11, 2016, 9:04:47 PM1/11/16
to kur...@googlegroups.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Ivan,

I have modified HelloWorldHandler.java to contain the following and I'm getting a build error...

  private void start(final WebSocketSession session, JsonObject jsonMessage) {
    try {
      MediaPipeline pipeline = kurento.createMediaPipeline();
                WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();

   RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build();
   webRtcEndpoint.connect(rtpEndpoint);
                       UserSession user = new UserSession();
user.setMediaPipeline(pipeline);
user.setWebRtcEndpoint(webRtcEndpoint);
users.put(session.getId(), user);

String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);
JsonObject response = new JsonObject();
response.addProperty("id", "startResponse");
response.addProperty("sdpAnswer", sdpAnswer);
    String rtp_sdp = "v=0\n" +
                   "o=- 0 3641150070 IN IP4 52.53.240.15\n" +
                   "s=Wowza Media Server\n" +
                   "c=IN IP4 52.53.240.15\n" +
                   "t=0 0\n" +
                   "m=audio 43684 RTP/AVP 0\n" +
                   "a=rtpmap:0 PCMU/8000\n" +
                   "a=ssrc:3610119879 cname:user3527564918@host-d993465d\n" +
                   "m=video 45752 RTP/AVP 101\n" +
                   "a=rtpmap:101 H264/90000\n" +
                   "a=ssrc:276641451 cname:user3527564918@host-d993465d";
  String sdpOfferRTP = rtpEndpoint.processOffer(rtp_sdp);

 
 
 
 
      // 1. Media logic (webRtcEndpoint in loopback)
//      MediaPipeline pipeline = kurento.createMediaPipeline();
//      WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
//      webRtcEndpoint.connect(webRtcEndpoint);

      // 2. Store user session
//      UserSession user = new UserSession();
//      user.setMediaPipeline(pipeline);
//      user.setWebRtcEndpoint(webRtcEndpoint);
//      users.put(session.getId(), user);

      // 3. SDP negotiation
 //     String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
//      String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);

 //     JsonObject response = new JsonObject();
 //     response.addProperty("id", "startResponse");
 //     response.addProperty("sdpAnswer", sdpAnswer);

      synchronized (session) {
        session.sendMessage(new TextMessage(response.toString()));
      }

      // 4. Gather ICE candidates
//      webRtcEndpoint.addOnIceCandidateListener(new EventListener<OnIceCandidateEvent>() {
//        @Override
 //       public void onEvent(OnIceCandidateEvent event) {
 //         JsonObject response = new JsonObject();
 //         response.addProperty("id", "iceCandidate");
 //         response.add("candidate", JsonUtils.toJsonObject(event.getCandidate()));
 //         try {
 //           synchronized (session) {
 //             session.sendMessage(new TextMessage(response.toString()));
 //           }
 //         } catch (IOException e) {
  //          log.error(e.getMessage());
  //        }
 //       }
 //     });
 //     webRtcEndpoint.gatherCandidates();

    } catch (Throwable t) {
      sendError(session, t.getMessage());
    }
  }



You received this message because you are subscribed to a topic in the Google Groups "kurento" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kurento/rvcO5BSJmcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kurento+u...@googlegroups.com.

Randy Adams

unread,
Jan 11, 2016, 10:00:05 PM1/11/16
to kur...@googlegroups.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Here is the error I'm getting...

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project kurento-hello-world: Compilation failure: Compilation failure:
[ERROR] /home/ubuntu/kurento-tutorial-java/kurento-wowza/src/main/java/org/kurento/tutorial/helloworld/HelloWorldHandler.java:[96,25] cannot find symbol
[ERROR] symbol:   class RtpEndpoint
[ERROR] location: class org.kurento.tutorial.helloworld.HelloWorldHandler
[ERROR] /home/ubuntu/kurento-tutorial-java/kurento-wowza/src/main/java/org/kurento/tutorial/helloworld/HelloWorldHandler.java:[96,66] package RtpEndpoint does not exist
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:

Ivan Gracia

unread,
Jan 12, 2016, 3:56:24 AM1/12/16
to Kurento Public, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Are you sure? I just pasted that code in my Eclipse and it's working. Make sure your pom is ok. I see that you have changed the folder name, so you might need to adjust that in the project's pom. Check the reactor also.

Ivan Gracia


Randy Adams

unread,
Jan 12, 2016, 3:59:21 PM1/12/16
to kur...@googlegroups.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Ivan

I'm missing the RtpEndpoint package.  Where do I get that and how do I specify it?

Thanks,

Randy

[ERROR] /home/ubuntu/kurento-tutorial-java/kurento-hello-world/src/main/java/org/kurento/tutorial/helloworld/HelloWorldHandler.java:[96,66] package RtpEndpoint does not exist

Ivan Gracia

unread,
Jan 13, 2016, 4:31:16 AM1/13/16
to Kurento Public, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)

It’s in the kurento-client dependency you are defining in your pom (version numbers might differ)

        <dependency>
            <groupId>org.kurento</groupId>
            <artifactId>kurento-client</artifactId>
            <version>6.2.2-SNAPSHOT</version>
        </dependency>

Force your IDE to update dependencies, as the RtpEndpoint is there. You can open that jar that is inside your local maven repository, and check that it is there also.



Ivan Gracia


r...@wtftv.com

unread,
Jan 13, 2016, 8:32:43 PM1/13/16
to kurento, ya...@streaminggalicia.com, red...@ilook.tv
Ivan,

I forgot to import the class.  It builds now but there is such conflicting info on the Kurento SDP and the Wowza SDP that I am totally confused.  Some people say they should be the same but there is a post where you said they should be different - I guess I'll try every combination till I figure it out.

Randy

r...@wtftv.com

unread,
Jan 13, 2016, 8:38:31 PM1/13/16
to kurento, ki...@streaminggalicia.com, ya...@streaminggalicia.com
What does the sdp you put in the Wowza contents folder look like?

Ivan Gracia

unread,
Jan 14, 2016, 5:53:16 AM1/14/16
to Kurento Public, ki...@streaminggalicia.com, ya...@streaminggalicia.com
Have a look at Yago's post, as that is exactly what we use.

Ivan Gracia



--

Randy Adams

unread,
Jan 14, 2016, 10:56:30 AM1/14/16
to kur...@googlegroups.com, ki...@streaminggalicia.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Dear Ivan,

Yes, but I am confused.  In Yago's post the last step is

4. processOffer(requestSdp) on the RTP endpoint.

but shouldn't it be:

4. processOffer(rtp_sdp) on the RTP endpoint.

Or am I reading it wrong?

Thanks,

Randy

You received this message because you are subscribed to a topic in the Google Groups "kurento" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kurento/rvcO5BSJmcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kurento+u...@googlegroups.com.

Ivan Gracia

unread,
Jan 14, 2016, 11:47:22 AM1/14/16
to Kurento Public, ki...@streaminggalicia.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Yes, you are totally right. It's the rtp_sdp the one you have to process.

Ivan Gracia


Randy Adams

unread,
Jan 14, 2016, 11:59:25 AM1/14/16
to kur...@googlegroups.com, ki...@streaminggalicia.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
Dear Ivan

Do the Kurento and Wowza servers need to be on the same EC2 instance? Mine are not.

I modified HelloWorld Java implementation HellowWorldHandler.java to look like this;

/*
 * (C) Copyright 2015 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */

package org.kurento.tutorial.helloworld;

import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;

import org.kurento.client.EventListener;
import org.kurento.client.IceCandidate;
import org.kurento.client.KurentoClient;
import org.kurento.client.MediaPipeline;
import org.kurento.client.OnIceCandidateEvent;
import org.kurento.client.WebRtcEndpoint;
import org.kurento.client.RtpEndpoint;
import org.kurento.jsonrpc.JsonUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;

/**
 * Hello World handler (application and media logic).
 *
 * @author Boni Garcia (bga...@gsyc.es)
 * @author David Fernandez (d.ferna...@gmail.com)
 * @since 6.0.0
 */
public class HelloWorldHandler extends TextWebSocketHandler {

  private static final Gson gson = new GsonBuilder().create();
  private final Logger log = LoggerFactory.getLogger(HelloWorldHandler.class);

  @Autowired
  private KurentoClient kurento;

  private final ConcurrentHashMap<String, UserSession> users = new ConcurrentHashMap<>();

  @Override
  public void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
    JsonObject jsonMessage = gson.fromJson(message.getPayload(), JsonObject.class);

    log.debug("Incoming message: {}", jsonMessage);

    switch (jsonMessage.get("id").getAsString()) {
      case "start":
        start(session, jsonMessage);
        break;
      case "stop": {
        UserSession user = users.remove(session.getId());
        if (user != null) {
          user.release();
        }
        break;
      }
      case "onIceCandidate": {
        JsonObject jsonCandidate = jsonMessage.get("candidate").getAsJsonObject();

        UserSession user = users.get(session.getId());
        if (user != null) {
          IceCandidate candidate = new IceCandidate(jsonCandidate.get("candidate").getAsString(),
              jsonCandidate.get("sdpMid").getAsString(),
              jsonCandidate.get("sdpMLineIndex").getAsInt());
          user.addCandidate(candidate);
        }
        break;
      }
      default:
        sendError(session, "Invalid message with id " + jsonMessage.get("id").getAsString());
        break;
    }
  }

  private void start(final WebSocketSession session, JsonObject jsonMessage) {
    try {
      MediaPipeline pipeline = kurento.createMediaPipeline();
           WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
//        webRtcEndpoint.connect(webRtcEndpoint);

RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build();
   webRtcEndpoint.connect(rtpEndpoint);

// String generateOffer = rtpEndpoint.generateOffer();
// String sdpAnswer = rtpEndpoint.processAnswer(generateOffer);


            UserSession user = new UserSession();
user.setMediaPipeline(pipeline);
user.setWebRtcEndpoint(webRtcEndpoint);
users.put(session.getId(), user);

String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);
JsonObject response = new JsonObject();
response.addProperty("id", "startResponse");
response.addProperty("sdpAnswer", sdpAnswer);

String rtp_sdp = "v=0\r\n" +
"o=- 0 0 IN IP4 54.176.36.155\r\n" +
"s=\r\n" +
"c=IN IP4 54.176.36.155\r\n" +
"t=0 0\r\n" +
"m=video 1935 RTP/AVP 100\r\n" +
"a=rtpmap:100 H264/90000\r\n" +
"a=recvonly";

  String sdpOfferRTP = rtpEndpoint.processOffer(rtp_sdp);

 
    } catch (Throwable t) {
      sendError(session, t.getMessage());
    }
  }

  private void sendError(WebSocketSession session, String message) {
    try {
      JsonObject response = new JsonObject();
      response.addProperty("id", "error");
      response.addProperty("message", message);
      session.sendMessage(new TextMessage(response.toString()));
    } catch (IOException e) {
      log.error("Exception sending message", e);
    }
  }
}


and I created myStream.sdp in Wowza content folder looking like this

v=0
o=- 0 0 IN IP4 54.176.36.155
s=
c=IN IP4 54.176.36.155
t=0 0
m=video 1935 RTP/AVP 100
a=rtpmap:100 H264/90000
a=recvonly

Then I ran the HelloWorld app on the Kurento Server (which is a different instance than my Wowza Server with this command line:

sudo mvn compile exec:java

It ran fine then I went to this in my chrome browser


I hid the "Start" button and got the video running in the origin window but of course nothing showing in the Remote window and this in the console frame:

  • 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=- 610683587184076385 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz 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:assqPNkdRNFijc2C a=ice-pwd:STDNMS51Yo7cJfqfDmgEc3kU a=fingerprint:sha-256 13:F6:A0:17:51:31:AE:14:E4:09:4A:CF:2D:06:A2:0B:6F:F8:59:6A:E8:F7:E9:AC:22:BB:C3:EE:76:D6:9E:50 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:794522439 cname:asDTqD398qYpt6Dv a=ssrc:794522439 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz 022352c0-88de-438e-9209-737f895ade2d a=ssrc:794522439 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz a=ssrc:794522439 label:022352c0-88de-438e-9209-737f895ade2d 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:assqPNkdRNFijc2C a=ice-pwd:STDNMS51Yo7cJfqfDmgEc3kU a=fingerprint:sha-256 13:F6:A0:17:51:31:AE:14:E4:09:4A:CF:2D:06:A2:0B:6F:F8:59:6A:E8:F7:E9:AC:22:BB:C3:EE:76:D6:9E:50 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 2268746211 1340049218 a=ssrc:2268746211 cname:asDTqD398qYpt6Dv a=ssrc:2268746211 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz b8f337e6-0c79-4112-80e0-64503787507c a=ssrc:2268746211 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz a=ssrc:2268746211 label:b8f337e6-0c79-4112-80e0-64503787507c a=ssrc:1340049218 cname:asDTqD398qYpt6Dv a=ssrc:1340049218 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz b8f337e6-0c79-4112-80e0-64503787507c a=ssrc:1340049218 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz a=ssrc:1340049218 label:b8f337e6-0c79-4112-80e0-64503787507c '
  • Invoking SDP offer callback function 52.53.240.157:8443
  • Senging message: {"id":"start","sdpOffer":"v=0\r\no=- 610683587184076385 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz\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:assqPNkdRNFijc2C\r\na=ice-pwd:STDNMS51Yo7cJfqfDmgEc3kU\r\na=fingerprint:sha-256 13:F6:A0:17:51:31:AE:14:E4:09:4A:CF:2D:06:A2:0B:6F:F8:59:6A:E8:F7:E9:AC:22:BB:C3:EE:76:D6:9E:50\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:794522439 cname:asDTqD398qYpt6Dv\r\na=ssrc:794522439 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz 022352c0-88de-438e-9209-737f895ade2d\r\na=ssrc:794522439 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz\r\na=ssrc:794522439 label:022352c0-88de-438e-9209-737f895ade2d\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:assqPNkdRNFijc2C\r\na=ice-pwd:STDNMS51Yo7cJfqfDmgEc3kU\r\na=fingerprint:sha-256 13:F6:A0:17:51:31:AE:14:E4:09:4A:CF:2D:06:A2:0B:6F:F8:59:6A:E8:F7:E9:AC:22:BB:C3:EE:76:D6:9E:50\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 2268746211 1340049218\r\na=ssrc:2268746211 cname:asDTqD398qYpt6Dv\r\na=ssrc:2268746211 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz b8f337e6-0c79-4112-80e0-64503787507c\r\na=ssrc:2268746211 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz\r\na=ssrc:2268746211 label:b8f337e6-0c79-4112-80e0-64503787507c\r\na=ssrc:1340049218 cname:asDTqD398qYpt6Dv\r\na=ssrc:1340049218 msid:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz b8f337e6-0c79-4112-80e0-64503787507c\r\na=ssrc:1340049218 mslabel:h3Tdv2by7V19zgsEi4RVQMihxHsxFbVuZBhz\r\na=ssrc:1340049218 label:b8f337e6-0c79-4112-80e0-64503787507c\r\n"}
  • Local candidate{"candidate":"candidate:1866239798 1 udp 2122262783 2601:644:8102:4751:64ca:2cfc:6af2:c277 59681 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1866239798 1 udp 2122262783 2601:644:8102:4751:64ca:2cfc:6af2:c277 59681 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:2785239549 1 udp 2122194687 10.0.0.109 55532 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:2785239549 1 udp 2122194687 10.0.0.109 55532 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:1866239798 2 udp 2122262782 2601:644:8102:4751:64ca:2cfc:6af2:c277 55533 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1866239798 2 udp 2122262782 2601:644:8102:4751:64ca:2cfc:6af2:c277 55533 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:2785239549 2 udp 2122194686 10.0.0.109 49856 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:2785239549 2 udp 2122194686 10.0.0.109 49856 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:1866239798 1 udp 2122262783 2601:644:8102:4751:64ca:2cfc:6af2:c277 49857 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1866239798 1 udp 2122262783 2601:644:8102:4751:64ca:2cfc:6af2:c277 49857 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:2785239549 1 udp 2122194687 10.0.0.109 63151 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:2785239549 1 udp 2122194687 10.0.0.109 63151 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:1866239798 2 udp 2122262782 2601:644:8102:4751:64ca:2cfc:6af2:c277 63152 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1866239798 2 udp 2122262782 2601:644:8102:4751:64ca:2cfc:6af2:c277 63152 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:2785239549 2 udp 2122194686 10.0.0.109 55862 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:2785239549 2 udp 2122194686 10.0.0.109 55862 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:566195142 1 tcp 1518283007 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:566195142 1 tcp 1518283007 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:3900742925 1 tcp 1518214911 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:3900742925 1 tcp 1518214911 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:566195142 2 tcp 1518283006 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:566195142 2 tcp 1518283006 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:3900742925 2 tcp 1518214910 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:3900742925 2 tcp 1518214910 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:566195142 1 tcp 1518283007 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:566195142 1 tcp 1518283007 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:3900742925 1 tcp 1518214911 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:3900742925 1 tcp 1518214911 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:566195142 2 tcp 1518283006 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:566195142 2 tcp 1518283006 2601:644:8102:4751:64ca:2cfc:6af2:c277 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:3900742925 2 tcp 1518214910 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:3900742925 2 tcp 1518214910 10.0.0.109 0 typ host tcptype active generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:1159915281 1 udp 1685987071 67.180.55.106 63151 typ srflx raddr 10.0.0.109 rport 63151 generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1159915281 1 udp 1685987071 67.180.55.106 63151 typ srflx raddr 10.0.0.109 rport 63151 generation 0","sdpMid":"video","sdpMLineIndex":1}}
  • Local candidate{"candidate":"candidate:1159915281 2 udp 1685987070 67.180.55.106 49856 typ srflx raddr 10.0.0.109 rport 49856 generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1159915281 2 udp 1685987070 67.180.55.106 49856 typ srflx raddr 10.0.0.109 rport 49856 generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:1159915281 1 udp 1685987071 67.180.55.106 55532 typ srflx raddr 10.0.0.109 rport 55532 generation 0","sdpMid":"audio","sdpMLineIndex":0}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1159915281 1 udp 1685987071 67.180.55.106 55532 typ srflx raddr 10.0.0.109 rport 55532 generation 0","sdpMid":"audio","sdpMLineIndex":0}}
  • Local candidate{"candidate":"candidate:1159915281 2 udp 1685987070 67.180.55.106 55862 typ srflx raddr 10.0.0.109 rport 55862 generation 0","sdpMid":"video","sdpMLineIndex":1}
  • Senging message: {"id":"onIceCandidate","candidate":{"candidate":"candidate:1159915281 2 udp 1685987070 67.180.55.106 55862 typ srflx raddr 10.0.0.109 rport 55862 generation 0","sdpMid":"video","sdpMLineIndex":1}}
then I open up my "live" app in Wowza, connect it to myStream.sdp and open a Test Player and I get the message

"Source stream or file could not be found or access was denied."

All ports on both servers are fully open.  Only thing is that there is not a certificate on the Kurento server.

Any help you could give would be most appreciated as I'm about to hang myself with frustration.

Thanks,

Randy Adams

Ivan Gracia

unread,
Jan 14, 2016, 12:15:47 PM1/14/16
to Kurento Public, ki...@streaminggalicia.com, ya...@streaminggalicia.com, Peter Redford (ILOOK.TV)
No, they don't need to be in the same machine.

There are a number of things not quite right:
  • If you comment this line out //         webRtcEndpoint.connect(webRtcEndpoint);, you'll never ever will see the loopback video.
  • The port in the RTP sdp is not 1935. That port is reserved for Wowza to do its things. Pick any other port, like 15000.
  • You need to modify your live application as in this post.
That should do.

Ivan Gracia


ya...@streaminggalicia.com

unread,
May 12, 2016, 7:30:04 AM5/12/16
to kurento, ya...@streaminggalicia.com, red...@ilook.tv
Hi,

I was wondering if I can switch the participant who is streaming to Wowza. If so, how can i get it?

Thanks

Peter Redford (ILOOK.TV)

unread,
May 12, 2016, 7:52:53 AM5/12/16
to ya...@streaminggalicia.com, kurento
Dear Yago,

Can you explain what you mean?

Best regards,

Peter Redford

ya...@streaminggalicia.com

unread,
May 12, 2016, 8:00:08 AM5/12/16
to kurento, ya...@streaminggalicia.com, red...@ilook.tv
I mean, I'm working with the Kurento Room Demo. I want every time a new user accesses the application, it will stop sending the stream of the last user who had accessing the room. Then, it shall start sending the new participant stream to Wowza.

When the first participant access the room it works fine but I want to know how to do the switching when a second participant enters the room.

Regards,
Yago

Ivan Gracia

unread,
May 18, 2016, 3:12:11 PM5/18/16
to Kurento Public, ya...@streaminggalicia.com, red...@ilook.tv

You can just change what you are feeding the RTPEndpoint seamlessly

webrtc.connect(rtp)
//...
anotherwebrtc.connect(rtp)
The new WebRtcEndpoitn will be the new source for the RtpEndpoint.

Ivan Gracia



--
Reply all
Reply to author
Forward
0 new messages