Skip to main content

The source code

MistServers source code is available here.

Dependencies

  • C++ compiler
  • Meson
  • mbedtls (optional, automatically compiled as a subproject if SSL is enabled and mbedtls is not installed system-wide)
  • libsrt (optional, automatically compiled as a subproject if SRT is enabled and libsrt is not installed system-wide)
  • librist (optional, automatically compiled as a subproject if RIST is enabled and librist is not installed system-wide).

OPTIONAL Recommended

  • git (to pull in the code easily)
  • libav (If encoding/transcoding processes are of interest)

Compiling

We support both Meson and CMake. We currently recommend building with Meson as it takes care of all libraries automatically. CMake is considered the legacy compile method, it will still work for now but support most likely will be dropped in the future.

Compile flags

For an up to date list of compile flags please look at the output of:

meson configure

List of compile flags:

FlagDefaultDescription
APPNAMEMistServerName of the application which will show in multiple outputs
DATASIZE40Size in mebibytes for live stream data pages
DEBUG4Default debug level. Recommended value for development is 4, recommended value for production is 3
DISKSERIALDEFAULTLock MistServer to a specific disk through a given disk serial number
FILLER_DATAfalseData used as filler data in various protocols that use/need it
LOAD_BALANCEfalseBuild the MistServer Load Balancer (WIP)
NOAUTHfalseDisable API authentication entirely (insecure!)
NOLLHLSfalseDisable all forms of LL-HLS, falling back on plain HLS
NORISTfalseDisable RIST support, regardless of the library being present
NOSHMfalseDisable shared memory, use temporary files instead
NOSRTfalseDisable SRT support, regardless of the library being present
NOSSLfalseDisable SSL/TLS support
NOUPDATEfalseDisable the updater
NOUSRSCTPfalseDisable usrsctp (WebRTC data channels) support
RELEASEDEFAULTRelease string used in the reported version information
STAT_DELAY15Delay to apply to statistics, used to consistently handle segmented protocols
STAT_CUTOFF600Time in seconds that statistics history is kept in memory
UDP_API_HOSTlocalhostHostname the internal UDP API listens on
UDP_API_PORT4242Port the internal UDP API listens on
WITH_AVfalseEnable libAV based processing, requires libav installed on system
WITH_SANITYfalseEnable MistOutSanityCheck for stream testing
WITH_THREADNAMESfalseEnable fancy names for threads (not supported on all platforms)

Adding these compile flags to an existing Meson setup requires you to configure them using the -D flag. For example setting the default debug level to 3 (recommended production level) would be:

meson configure -DDEBUG=3

Setting multiple compile flags is quite easy as well:

meson configure -DDEBUG=3 -DNOAUTH=true -DNOUPDATE=true -DNORIST=true -DNOSRT=true -DWITH_AV=true

The above sets the default debug level to 3, removes the authorization for the browser interface, removes auto-update checks, disables RIST & SRT and finally builds libAV based processing binaries.

Meson

Compiling with the defaults is as easy as:

meson setup build
meson compile -C build

Compiling with setting compile flags:

meson setup build -DDEBUG=3
meson compile -C build

From scratch steps (Linux)

You'll need to install the dependencies, though we would also recommend git since you can then easily pull in the latest versions.

git clone https://github.com/DDVTECH/mistserver.git
cd mistserver
meson setup build
meson compile -C build

You'll find your MistServer binaries in the build folder, and you can immediately begin by booting the MistController binary.

./build/MistController 
tip

MistServer saves & loads the configuration from config.json from the folder you run the command from. If you want to load in a previously installed MistServer configuration be sure to use the -c /path/to/file boot parameter, for example:

./build/MistController -c /etc/mistserver.conf