Using Kurento Media Server (KMS) at version 6.6.0 deployed with Docker using the following image from Docker Hub: kurento/kurento-media-server:6.6.0
Tutorial followed: Docs » Kurento Tutorials » Java - Player
KMS Version: 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'
Other libraries versions:
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)
Client libraries
Application Server (Back-end)
<dependency>
<groupId>org.kurento</groupId>
<artifactId>kurento-client</artifactId>
<version>6.9.0</version>
</dependency>
Kurento-utils (Front-end)
"kurento-utils": "^6.9.0"
When i am trying to connect a "PlayerEndpoint" to an ip camera by RTSP MULTICAST, for example: rtsp://xxxxx:xxxxx@xxx.xxx.xxx.xxx?multicast=1
KMS returns the following error:
Log KMS v6.6.0 Connection Kurento IP camera Multicast
Pay special attention to line:
kms2 | 0:04:34.165887894 1 0x7fe214002230 DEBUG rtspsrc gstrtspsrc.c:7553:gst_rtspsrc_handle_message:<source> timeout on UDP port
I can play RTSP UNICAST streams but not MULTICAST
Also i follow this steps to check if this is not a problem with the network.
gst-launch-1.0 rtspsrc location="rtsp://xxxxx:xxxxx@xxx.xxx.xxx.xxx?multicast=1" ! decodebin ! autovideosink
Here is the result of Wireshark packages:
Pay attention to the Wireshark trace with protocol IGMPv2, i notice that Kurento is not using this protocol.
Following this documentation:
https://doc-kurento.readthedocs.io/en/6.9.0/dev/dev_guide.html#add-kurento-repository
I was able to execute the gst-launch-1.5 command in the following way:
gst-launch-1.5 rtspsrc location =" rtsp://xxxxx:xxxxx@xxx.xxx.xxx.xxx/?multicast=1"! Decodebin! autovideosink
Then the result was as expected, the video could be played in MULTICAST without problems.
After this I found the following post:
How to support multicast network in Docker
Then I could verify that the error came from Docker, specifically the configuration of its network.
The solution to this problem is to expose the KMS service in the following way in Docker Compose with:
network_mode: host
version: "3.7"
services:
kms:
image: kurento/kurento-media-server:6.9.0
container_name: kms
restart: always
network_mode: host
environment:
- GST_DEBUG=2,Kurento*:5