无法将Kurento KMS连接到RTSP组播URI

时间:2019-02-18 16:24:05

标签: kurento fiware-kurento

使用Docker部署的 6.6.0 版本的 Kurento Media Server(KMS),该镜像来自Docker Hub:kurento / kurento-media-server:6.6。 0

紧随其后的教程Docs » Kurento Tutorials » Java - Player

KMS版本6.6.0

Version: 6.6.0
Found modules:
        Module: 'core' version '6.6.0'
        Module: 'elements' version '6.6.0'
        Module: 'filters' version '6.6.0'

其他库版本

ii  gstreamer1.5-libav:amd64             1.8.2.1~20160909143244.96.g493eee4.trusty  amd64        libav plugin for GStreamer
ii  gstreamer1.5-nice:amd64              0.1.13.1~20160909144510.80.gd9ef50e.trusty amd64        ICE library (GStreamer plugin)
ii  gstreamer1.5-plugins-bad:amd64       1.8.1.1~20160909144557.99.gf836e53.trusty  amd64        GStreamer plugins from the "bad" set
ii  gstreamer1.5-plugins-base:amd64      1.8.1.1~20160909142623.55.g7b19cfd.trusty  amd64        GStreamer plugins from the "base" set
ii  gstreamer1.5-plugins-good:amd64      1.8.1.1~20160909143047.112.g9ee4248.trusty amd64        GStreamer plugins from the "good" set
ii  gstreamer1.5-plugins-ugly:amd64      1.8.1.1~20160909192513.89.g2685b0f.trusty  amd64        GStreamer plugins from the "ugly" set
ii  gstreamer1.5-pulseaudio:amd64        1.8.1.1~20160909143047.112.g9ee4248.trusty amd64        GStreamer plugin for PulseAudio
ii  gstreamer1.5-x:amd64                 1.8.1.1~20160909142623.55.g7b19cfd.trusty  amd64        GStreamer plugins for X11 and Pango
ii  kms-core-6.0                         6.6.0.20160909201132.trusty                amd64        Kurento core module
ii  kms-elements-6.0                     6.6.0.20160912112100.trusty                amd64        Kurento elements module
ii  kms-filters-6.0                      6.6.0.20160912114031.trusty                amd64        Kurento filters module
ii  kms-jsonrpc-1.0                      1.1.1.trusty                               amd64        Kurento jsonrpc library
ii  kmsjsoncpp                           1.6.3~20160909143252.40.gd78deb7.trusty    amd64        Kurento jsoncpp library
ii  kurento-media-server-6.0             6.6.0.20160912115811.trusty                amd64        Kurento Media Server
ii  libgstreamer-plugins-bad1.5-0:amd64  1.8.1.1~20160909144557.99.gf836e53.trusty  amd64        GStreamer development files for libraries from the "bad" set
ii  libgstreamer-plugins-base1.5-0:amd64 1.8.1.1~20160909142623.55.g7b19cfd.trusty  amd64        GStreamer libraries from the "base" set
ii  libgstreamer1.5-0:amd64              1.8.1.1~20160909144007.170.g0d6031b.trusty amd64        Core GStreamer libraries and elements
ii  libnice10:amd64                      0.1.13.1~20160909144510.80.gd9ef50e.trusty amd64        ICE library (shared library)

客户端库

  1. 应用程序服务器(后端)

    • 语言:Java
    • 版本:6.9.0
<dependency>
    <groupId>org.kurento</groupId>
    <artifactId>kurento-client</artifactId>
    <version>6.9.0</version>
</dependency>
  1. Kurento-utils(前端)

    • 语言:JavaScript(前端)
    • 版本:6.9.0 "kurento-utils": "^6.9.0"

当我尝试通过RTSP MULTICAST 将“ PlayerEndpoint ”连接到IP摄像机时,例如: rtsp:// xxxxx:xxxxx @ xxx .xxx.xxx.xxx?multicast = 1

KMS返回以下错误:

Log KMS v6.6.0 Connection Kurento IP camera Multicast

请特别注意以下行:

kms2       | 0:04:34.165887894     1 0x7fe214002230 DEBUG                rtspsrc gstrtspsrc.c:7553:gst_rtspsrc_handle_message:<source> timeout on UDP port

  

我可以播放 RTSP UNICAST 流,但不能播放 MULTICAST

我也按照以下步骤检查这是否是网络问题。

  • 尝试使用以下命令在GStreamer上播放 MULTICAST 流可以正常工作:
  

gst-launch-1.0 rtspsrc location =“ rtsp:// xxxxx:xxxxx@xxx.xxx.xxx.xxx?multicast = 1”!解码器!自动视频接收器

  • 使用GStreamer和Kurento比较Wireshark帧。使用GStreamer没问题,但是使用Kurento时,相机似乎开始将数据发送到MULTICAST地址,但Kurento无法可视化该流,它会给出“ 无效的uri ”错误并执行TEARDOWN。 / li>

这是Wireshark软件包的结果:

  

请注意协议IGMPv2的Wireshark跟踪,我注意到Kurento没有使用此协议。

1 个答案:

答案 0 :(得分:0)

遵循此文档:

https://doc-kurento.readthedocs.io/en/6.9.0/dev/dev_guide.html#add-kurento-repository

我能够通过以下方式执行gst-launch-1.5命令:

{ "disabled": false, "bindings": [ { "authLevel": "function", "type": "httpTrigger", "direction": "in", "name": "req", "methods": [ "get", "post" ] }, { "type": "http", "direction": "out", "name": "res" }, { "tableName": "WitchHuntConfig", "connection": "AzureWebJobsStorage", "name": "tableBinding", "type": "table", "direction": "out" } ] }

然后结果如预期的那样,可以在MULTICAST中播放视频而没有问题。

此后,我发现了以下帖子:

How to support multicast network in Docker

然后我可以验证该错误是否来自Docker,特别是其网络配置。

此问题的解决方案是通过以下方式在Docker Compose中公开KMS服务:

gst-launch-1.5 rtspsrc location =" rtsp://xxxxx:xxxxx@xxx.xxx.xxx.xxx/?multicast=1"! Decodebin! autovideosink

network_mode: host