The MistServer advantage

What design principles of MistServer make it a truly different and more capable solution than any other media server out there? Find out here.

Takes about 7 mins to read
Published at 4 Jan 2024

MistServer: The Streaming Media Toolkit

MistServer, at its core, functions as a robust media server. Originally designed to be a highly efficient repackager processing any input and repackaging it into the desired output, MistServer has evolved far beyond its initial purpose. Referring to it merely as a media server would be an injustice. Today, MistServer has expanded its capabilities to seamlessly weave together multiple applications, offering complete streaming media pipelines. It stands out as one of the most potent tools available in the streaming media world.

Extremely Crash-Resistant

From its initial design, MistServer deviated from typical applications. The primary objective was to deliver an extraordinarily crash-resistant and reliable user experience. The design incorporates a structure where each process within MistServer, whether it be a viewer, input, or output, operates independently, incapable of affecting other processes.

To achieve this, each "active" stream (defined as either being received or sent) is managed by a dedicated "input" process, acting as the origin or source for the data. Similarly, each connection is overseen by a distinct "output" process, serving as a sink for the data. Lastly, the "controller" process monitors and manages all the above, providing the MistServer API and serving as a single point of control. This fragmented setup ensures that any issues arising will impact only the specific process involved.

Reliable Recovery

In the rare event of a process encountering issues, MistServer employs a reliable recovery mechanism. A guardian process, often referred to as the "angel process," is spawned for every connection. This process is tasked with restoring the original state and resuming the process. If the angel process needs to intervene, it cleans up any lingering memory considered a leak, maintains current connections, resets the state, and spawns the process again to continue seamlessly. The recovery process is so effective that MistServer can be updated while active without dropping a single connection.

Efficiency is Key

As mentioned earlier, MistServer excels as a highly efficient repackager for media. This efficiency is achieved through shared memory and an internally devised format. Shared memory allows multiple processes, distributed across any number of executables, to access the same block of memory. This technique enables the use of the same stream data provided by a single input across an unlimited number of outputs, allowing a single storage to provide a stream to any number of outputs with virtually no added delay. The measured latency MistServer introduces for this conversion is just one frame from input to output.

Integration Made Easy

While a media server alone is a powerful tool, its true potential shines when seamlessly integrated with other media applications. Unlike most media servers that provide only an API, MistServer goes the extra mile by offering an API alongside a "Triggers" system and stream processes.

Triggers empower users to customize the server's flow based on events within the system. Whether it's a stream coming in or a viewer attempting to watch, any server activity becomes an opportunity to enhance or entirely replace the flow to suit your preferences.

Stream processes allow the attachment of any process to a stream or a single video/audio track, enabling the use of stream data in various ways. This flexibility ranges from adding encoders for multiple qualities and altering the stream's contents to incorporating analysis tools for quality checks.

It is the combination of flexibility, reliability, and extensive configurability that has elevated MistServer beyond its initial status as a simple media server, turning it into the toolkit beloved by developers. There are no limitations on possibilities, allowing you to realize your media project as envisioned.

Curious about getting started? Contact us, and let's explore how we can assist you in completing that long-desired project.