# MistServers Innovative SRT Connection Handling
> [! note]-
> The content of this page is generated by audio/video transcription and text transformation from the content and links of this source.
Source: [https://fosdem.org/2025/schedule/event/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes/](https://fosdem.org/2025/schedule/event/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes/)
<video src="https://video.fosdem.org/2025/k3401/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes.av1.webm" controls></video>
## Summary & Highlights:
MistServer's session at FOSDEM 2025 focused on handling SRT connections in independent child processes. This approach enhances client isolation and reliability, crucial for media streaming. The session discussed the challenges of integrating SRT, a protocol for secure and reliable media transport, and presented a novel solution to manage connections without modifying existing libraries.
**Introduction to MistServer**
MistServer is an open-source media server designed for transmuxing and easy integration. It focuses on handling media feeds efficiently, prioritizing client isolation over CPU efficiency due to the nature of media connections.
**Challenges with SRT Integration**
SRT, developed by Haivision, is a protocol for transmitting media over the internet. MistServer faced challenges because libsrt, the reference implementation, takes ownership of UDP sockets, preventing the use of separate processes per connection.
**Innovative Solution**
MistServer's team devised a method to handle SRT connections by intercepting handshake packets and using connected UDP sockets. This approach allows for maintaining separate processes for each connection, ensuring client isolation without modifying libsrt.
**Conclusion and Impact**
The session highlighted MistServer's ability to innovate within the constraints of existing technologies, offering a robust solution for media streaming. This approach is significant for eco-social designers looking to leverage open-source tools for sustainable media solutions.
## Importance for an eco-social transformation
MistServer's approach to handling SRT connections is crucial for eco-social transformation as it provides a reliable and open-source solution for media streaming, reducing dependency on expensive proprietary systems. This can democratize media access and support community-driven media projects. Eco-social designers can leverage MistServer's open-source nature for sustainable media solutions, promoting transparency and collaboration. Challenges include navigating technical complexities and ensuring widespread adoption of open-source protocols in a market dominated by proprietary systems.
## Slides:
| | |
| --- | --- |
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_001.jpg\|300]] | The first slide introduces the session topic, focusing on how MistServer manages SRT connections using independent child processes. This method is highlighted as a key feature of MistServer, providing enhanced client isolation and reliability in media streaming.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_002.jpg\|300]] | This slide provides context about MistServer, describing it as a media server software package in development since 2009. It is free, open source, and focuses on transmuxing and easy integration, making it developer-centric.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_003.jpg\|300]] | The slide explains MistServer's approach to handling connections, where each connection runs in a separate process. This method, while less efficient, offers better isolation between clients, protecting connections from mutual interference.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_004.jpg\|300]] | This slide describes the SRT protocol, developed by Haivision and open-sourced in 2017. It is used for sending MPEG-TS streams with low latency, and its adoption in the media industry has been increasing.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_005.jpg\|300]] | The slide outlines the available implementations for SRT, including libsrt, upump-srt, and gosrt, highlighting that MistServer and libsrt are open source. However, the other implementations are partial and closely tied to specific frameworks.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_006.jpg\|300]] | This slide discusses a challenge with libsrt, which takes ownership of UDP sockets, preventing MistServer from using separate processes per connection, thus affecting client isolation.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_007.jpg\|300]] | Possible solutions are presented, including adding support for forking binaries to libsrt or writing a custom SRT implementation, but both options are considered unattractive due to complexity and maintenance issues.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_008.jpg\|300]] | The slide acknowledges unattractive solutions like modifying libsrt or creating a custom implementation. It notes that SRT's adoption was uncertain initially, but it became the default for media transport, necessitating a better solution.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_009.jpg\|300]] | The slide introduces the 'secret third option' by utilizing the SRT specification to recognize handshake packets, allowing MistServer to manage connections without altering libsrt.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_010.jpg\|300]] | This slide continues to explain the solution, emphasizing that recognizing handshake packets allows MistServer to manage SRT connections effectively while maintaining process isolation.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_011.jpg\|300]] | The slide explains UDP sockets, highlighting that although UDP is connection-less, sockets can be connected to receive all traffic from a specific peer, which is crucial for MistServer's solution.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_012.jpg\|300]] | This slide further elaborates on UDP sockets, illustrating how connected sockets can receive traffic from a specific peer, which is integral to MistServer's handling of SRT connections.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_013.jpg\|300]] | The slide describes the application of MistServer's solution, where it listens on the main port, spawns a new process upon detecting a handshake, and uses a connected UDP socket, despite libsrt's documentation suggesting otherwise.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_014.jpg\|300]] | This slide highlights the benefits of MistServer's approach, achieving the best of both worlds with standard, unmodified libsrt and multi-process isolation, enhancing reliability and client isolation.
| ![[FOSDEM 2025/assets/How-MistServer-handles-SRT-connections-in-independ/preview_015.jpg\|300]] | The final slide thanks attendees and invites questions, providing contact information for further inquiries about MistServer.
## Links
[MistServer website](https://fosdem.org/2025/events/attachments/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes/slides/238570/fosdem25-_7vQjrzF.pdf)
[MistServer Source Code](https://fosdem.org/2025/events/attachments/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes/slides/238570/fosdem25-_7vQjrzF.pdf)
[Video recording (AV1/WebM) - 39.1 MB](https://video.fosdem.org/2025/k3401/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes.av1.webm)
[Video recording (MP4) - 316.9 MB](https://video.fosdem.org/2025/k3401/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes.av1.mp4)
[Video recording subtitle file (VTT)](https://fosdem.org/2025/events/attachments/fosdem-2025-6052-how-mistserver-handles-srt-connections-in-independent-child-processes/slides/238570/fosdem25-_7vQjrzF.vtt)