This repo contains KMS source code from kurentu with minor modifications and other dependencies forked on Dec. 19th, 2023. The pre-built binaries for Ubuntu 22.04 (amd64) are also provided.
Most of the modifications involve replacing 'gstreamer-1.0' with the older 'gstreamer-1.5' because the official KMS 7.0.2 doesn't work on Ubuntu 22.04. This is the temporary soultion and for test only. The modifications are listed in the following table.
Directory/File | Source | Modified |
---|---|---|
gstreamer | kurento | No |
openssl-1.0.2u.tar.gz | openssl | No |
libnice | kurento | Yes |
libsrtp | kurento | No |
openh264 | cisco | No |
gst-plugins-base | kurento | No |
gst-plugins-good | kurento | Yes |
gst-plugins-bad | kurento | No |
kurento server | kurento | Yes |
The script will install necessary packages, extract KMS binaries and create a KMS systemd service.
./install.sh
libboost-filesystem1.74.0
libboost-thread1.74.0
libboost-program-options1.74.0
libboost-log1.74.0
libjsoncpp25
libsigc++-2.0-0v5
libglibmm-2.4-1v5
libvpx7
libsoup2.4-1
libopencv-imgcodecs4.5d
libopencv-objdetect4.5d
opencv-data
libopus0
libusrsctp2
libgupnp-igd-1.0-4
systemctl start kms.service
systemctl enable kms.service
/opt/kms/etc/kurento/kurento.conf.json
/opt/kms/etc/kurento/modules/kurento/*.ini
See kurento documentation for configurations
You can modify the file /etc/systemd/system/kms.service
.
...
Environment="GST_DEBUG=*:3"
Environment="KURENTO_LOG_FILE_SIZE=20"
Environment="KURENTO_NUMBER_LOG_FILES=10"
Environment="KURENTO_LOGS_PATH=/var/log/kurento-media-server/"
...
See kurento documentation for logging
-
Firewall
The default port for KMS is 8888 which can be modified inkurento.conf.json
. And also check RTP streaming settings inBaseRtpEndpoint.conf.ini
.# something like this ufw allow 8888/tcp
-
STUN/TURN server
The server parameters can be modified in the fileWebRtcEndpoint.conf.ini
.
See kurento documentation for TURN/STUN
This is for devleopers who would like to build their own module.
maven
build-essential
ca-certificates
cmake
git
gnupg
pkg-config
openjdk-11-jdk-headless
libboost-all-dev
libsigc++-2.0-dev
libglibmm-2.4-dev
libvpx-dev
libsoup2.4-dev
gtk-doc-tools
libbison-dev
flex
autopoint
libjsoncpp-dev
libwebsocketpp-dev
libopencv-dev
libopus-dev
libusrsctp-dev
nasm
Important
Not that the order matters.
gstreamer
openssl
libnice
libsrtp
openh264
gst-plugins-base
gst-plugins-good
gst-plugins-bad
openwebrtc-gst-plugins
module-creator
cmake-utils
jsonrpc
module-core
module-elements
module-filters
media-server
Before building KMS Java client, you will need to configure GitHub Packages in ~/.m2/settings.xml
.
Replace the USERNAME and ACCESS TOKEN with yours.
See more info.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>default</id>
<url>https://maven.pkg.github.com/Kurento/kurento</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>default</id>
<username>USERNAME</username>
<password>ACCESS TOKEN</password>
</server>
</servers>
</settings>
cd kurento/clients/java
mvn install
Only some of the tutorials are included in this repo. See more.
The following examples are tested.
- hello-world
- hello-world-recording
- magic-mirror
cd kurento/tutorials/java/hell-world
mvn -U clean spring-boot:run \
-Dspring-boot.run.jvmArguments="-Dkms.url=ws://{YOUR KMS IP}:8888/kurento"
Browse https://{YOUR AP IP}:8443/.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.