/monstream

Video monitor streaming application

Primary LanguageCGNU General Public License v2.0GPL-2.0

MonStream

MonStream is a streaming application for live video display on dedicated monitors. It can stream video from unicast or multicast sources in MPEG2, MPEG4, H264 and motion JPEG formats. Streams can be displayed in a grid of 2x2, 2x3, etc.

It is controlled by IRIS through a UDP protocol with short text messages.

Dependencies

MonStream requires a few dependencies to be installed:

  • gtk3
  • gstreamer1
  • gstreamer1-plugins-base
  • libcurl

Fedora:

sudo dnf install gtk3-devel gstreamer1-devel gstreamer1-plugins-base-devel libcurl-devel

To enable OpenH264:

sudo dnf config-manager --set-enabled fedora-cisco-openh264
sudo dnf install gstreamer1-plugin-openh264

Ubuntu:

sudo apt install git gcc make libcurl4-openssl-dev libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-bad gstreamer1.0-libav

Building

To build, clone the repository and run make in the repository root:

git clone https://github.com/mnit-rtmc/monstream.git
pushd monstream
make
popd

Installation

Install the monstream program and enable caching:

sudo bash
install monstream/monstream /usr/local/bin/
adduser monstream
mkdir /var/lib/monstream
chown monstream /var/lib/monstream
exit

The /var/lib/monstream directory is used for configuration and caching data. The files are managed automatically and are not meant to be edited.

Running

The program should be run as the monstream user.

monstream --help
Usage: monstream [option]
  --version       Display version and exit
  --no-gui        Run headless (still connect to streams)
  --stats         Display statistics on stream errors
  --port [p]      Listen on given UDP port (default 7001)
  --sink VAAPI    Configure VA-API video acceleration
  --sink XVIMAGE  Configure xvimage sink (no acceleration)

Control

For dedicated workstations, a joystick and keyboard can be used for pan / tilt / zoom control and switching. The switching functions can all be performed on a dedicated USB numeric keypad.

Key Function
0 ... 9 Add digit to entry (up to 5 digits)
Backspace Remove final digit of entry
. Change selected monitor to entry
Enter Switch camera to entry
- Switch to "upstream" camera
+ Switch to "downstream" camera
* Start / pause sequence entry
/ Recall preset entry
Tab Hide on-screen control bar

A joystick can be used to control the currently selected camera. Pressing left and right sends pan commands, while up and down causes the camera to tilt. Some models have a third axis for zoom, which can be controlled by twisting the joystick.