Quick installation guide

This quick installation guide is based on Docker containers.

Docker containers help LiveMediaStreamer framework and its related tools to be built, shipped and run as distributed services. Moreover, containers can be run under different operating systems. Docker’s supported OS:

  • Linux: Click to follow official Docker guide for Linux platforms.
  • Mac OS X: Click to follow official Docker guide for Mac OS X platforms.
  • Windows: Click to follow official Docker guide for Windows platforms.

Once you are ready with Docker, follow next steps to run existing LMS containers:

LiveMediaStreamer framework container

This container runs an instance of the LiveMediaStreamer framework listening on port 7777.

  •  Download the container (container size ~2GB aprox.)
docker pull uai2cat/lms:development
  •  Run next example command. It enables stdout (not running as daemond), exposes UDP port range from 5004 to 5007 (for RTP input streams), TCP port 8554 (for the RTSP Server) and TCP socket port 7777 (which is the default port for the LMS’s TCP API in this container, but it can be redefined through specific environment parameter, -e “PORT=<other internal port>”)
docker run -it --rm --name lms -p 5004-5007:5004-5007/udp -p 8554:8554 -p 7777:7777 uai2cat/lms:development

Previous ports configuration can be modified by user specifications. It is only required to know how the Docker’s CLI works. Next is shown a brief explanation of the parameters of interest (more information about running Docker can be found here):

-p <host port>:<container port>/<protocol>

host port: is the port which the host machine is listening to

container port: is the container port which the host port is linked to

protocol: is the working protocol in such ports. Default is TCP

 

LMS HTTP REST API container

This container runs the LMS HTTP REST API listening on port 8080. It requires previous LMS container running.

  •  Download the container (container size ~500MB aprox.)
docker pull uai2cat/lms-rest-api
  •  Run next example command. It enables stdout (not running as daemond), exposes the HTTP API port 8080 and TCP socket port 7777 (which is the default port which previous LMS container is listening to)
docker run -it --rm --name lms-rest-api -p 8080:8080 -p 7777:7777 uai2cat/lms-rest-api
  •  Alternatively, in order to not expose the LMS container ports to external world run next commands in different terminals in order:
docker run -it --rm --name lms-rest-api -p 8080:8080 -p 5004-5007:5004-5007/udp -p 8554:8554 uai2cat/lms-rest-api

docker run -it --rm --name lms --net container:lms-rest-api uai2cat/lms:development

Now you are ready to configure LMS and play with it with any type of application which connects to this HTTP REST API.  But, let’s show an example application:

 

LMS DASHer web application example container

This container is a web application example to demonstrate a LMS use case. This is configuring the LMS as a MPEG-DASH transcoder through the LMS HTPP REST API container. It serves the DASHer web application example and the LMS segments through the Nginx already configured inside.

  •  Download the container (container size ~300MB aprox.)
docker pull uai2cat/lms-dasher-web-app
  •  Next example command enables stdout (not running as daemond) and exposes the HTTP port 8080, but it is not ready to work with previous containers.
docker run -it --rm --name lms-dasher-web-app -p 80:80 uai2cat/lms-dasher-web-app
  •  In order to link this container with previous ones and to not expose LMS port to external world run next commands in different terminals in order:
docker run -it --rm --name dasher -p 80:80 -p 5004-5007:5004-5007/udp -p 8554:8554 -p 8080:8080 -v /home/dashSegmentsLMS/:/home/lms/lmsSegments uai2cat/lms-dasher-web-app

docker run -it --rm --name api --net container:dasher uai2cat/lms-rest-api

docker run -it --rm --name lms -v /home/dashSegmentsLMS/:/home/lms/lmsSegments --net container:api uai2cat/lms:development
  • It’s important to remark that first of all it is required to create a folder in the host machine where to share the MPEG-DASH segments created from the LMS container to the DASHer application. In this case the folder is at /home/dashSegmentsLMS
  • Then, open a browser and go to http://localhost
  • Due to being sharing the network environment through containers both addresses to configure are 127.0.0.1 and the API port is 8080.
  • Then,  set an input to work with (with previous running commands it is recommended to load RTP streams to port 5004 and 5006), add representations (depending on the input streams type) and configure the dasher by setting dash folder as /home/lms/lmsSegments and the dash name as dash.
  • Lastly, browse to last dash.if official player (click here) and load the segments URI, which is http://localhost/lmsDasher/dash.mpd

If you have any issue, doubt, comment or suggestion do not hesitate on contacting us or joining to our community!

Finally, for more specific informations about manual LMS installation and its related softwares check next sections.

LiveMediaStreamer repositories

The LiveMediaStreamer framework source code and related softwares can be found at GitHub

Third party libraries

  • Live555 – Internet Streaming Media, Wireless, and Multicast technology, services, & standards
  • ffmpeg – A complete, cross-platform solution to record, convert and stream audio and video
  • OpenCV – Open source computer vision and machine learning software library
  • x264 – Free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format
  • x265 HEVC Encoder – Open source HEVC encoder.
  • LAME – High quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL
  • Opus – Totally open, royalty-free, highly versatile audio codec
  • WebM VPX – VP8/VP9 Codec SDK. A open, royalty-free, media file format designed for the web