将Kurento RtpEnpoint连接到gst-launch-1.0管道

时间:2018-07-06 11:19:42

标签: java media gstreamer kurento

我正在尝试创建RtpEndpoint并在输出的RTP流上借助gst-launch-1.0构建gstreamer管道。 我对媒体世界是全新的,并不十分确定如何在端点与gst-launch-1.0实用程序之间遵循RTP协商协议。

接下来的作品很好

    RtpEndpoint rtpEndpoint1 = new RtpEndpoint.Builder(pipeline).build();
    RtpEndpoint rtpEndpoint2 = new RtpEndpoint.Builder(pipeline).build();

    String offer1 = rtpEndpoint1.generateOffer();
    String offer2 = rtpEndpoint2.processOffer(offer1);
    String offer3 = rtpEndpoint1.processAnswer(offer2);

    playerEndpoint.connect(rtpEndpoint1);

    @Override
    public MediaElement getMediaElement() {
        return rtpEndpoint2;
    }

但是我不知道如何代表该实用程序处理offer1。我试图用下面的管道替换获取到我的公共IP的第二个offer2中的主机名和端口,而国内端口则通过下面的管道进行监听,但这似乎不起作用

gst-launch-1.0 -v \
    udpsrc port=51764 caps="application/x-rtp" ! queue ! rtph264depay ! h264parse ! mpegtsmux name=mymux ! hlssink max-files=5 playlist-location=/hls/test/playlist.m3u8 location=/hls/test/segment%05d.ts target-duration=10 \
    udpsrc port=52510 caps="application/x-rtp" ! queue ! rtpmp4gdepay ! mymux. 

任何帮助将不胜感激

0 个答案:

没有答案