# Table of Contents - [Quick start | MistServer documentation](#quick-start-mistserver-documentation) - [Core Concepts | MistServer documentation](#core-concepts-mistserver-documentation) - [Outputs | MistServer documentation](#outputs-mistserver-documentation) - [Integration | MistServer documentation](#integration-mistserver-documentation) - [Configuration | MistServer documentation](#configuration-mistserver-documentation) - [Inputs | MistServer documentation](#inputs-mistserver-documentation) - [Configuration | MistServer documentation](#configuration-mistserver-documentation) - [Stream Settings | MistServer documentation](#stream-settings-mistserver-documentation) - [Playback | MistServer documentation](#playback-mistserver-documentation) - [API | MistServer documentation](#api-mistserver-documentation) - [HTTP output Handler | MistServer documentation](#http-output-handler-mistserver-documentation) - [Installation | MistServer documentation](#installation-mistserver-documentation) - [AAC over HTTP | MistServer documentation](#aac-over-http-mistserver-documentation) - [Session system | MistServer documentation](#session-system-mistserver-documentation) - [CMAF (fMP4) over HTTP (DASH, HLS7, HSS) | MistServer documentation](#cmaf-fmp4-over-http-dash-hls7-hss-mistserver-documentation) - [Triggers | MistServer documentation](#triggers-mistserver-documentation) - [Push input for streams | MistServer documentation](#push-input-for-streams-mistserver-documentation) - [WebM/MKV over HTTP | MistServer documentation](#webm-mkv-over-http-mistserver-documentation) - [Pull input for streams | MistServer documentation](#pull-input-for-streams-mistserver-documentation) - [Prometheus Instrumentation | MistServer documentation](#prometheus-instrumentation-mistserver-documentation) - [DTSC | MistServer documentation](#dtsc-mistserver-documentation) - [Parameters | MistServer documentation](#parameters-mistserver-documentation) - [Variable substitution | MistServer documentation](#variable-substitution-mistserver-documentation) - [Stream process | MistServer documentation](#stream-process-mistserver-documentation) - [Track Selectors | MistServer documentation](#track-selectors-mistserver-documentation) - [Free Lossless Audio Codec | MistServer documentation](#free-lossless-audio-codec-mistserver-documentation) - [H264/H265 over HTTP | MistServer documentation](#h264-h265-over-http-mistserver-documentation) - [Flash segmented over HTTP (HDS) | MistServer documentation](#flash-segmented-over-http-hds-mistserver-documentation) - [HTTPS (HTTP+TLS) | MistServer documentation](#https-http-tls-mistserver-documentation) - [The MistServer Interface | MistServer documentation](#the-mistserver-interface-mistserver-documentation) - [HTTP | MistServer documentation](#http-mistserver-documentation) - [Utility: Static HTTP file server | MistServer documentation](#utility-static-http-file-server-mistserver-documentation) - [External writer | MistServer documentation](#external-writer-mistserver-documentation) - [MP3 over HTTP | MistServer documentation](#mp3-over-http-mistserver-documentation) - [DTSC input | MistServer documentation](#dtsc-input-mistserver-documentation) - [Apple segmented over HTTP (HLS) | MistServer documentation](#apple-segmented-over-http-hls-mistserver-documentation) - [First time set-up | MistServer documentation](#first-time-set-up-mistserver-documentation) - [Custom variables | MistServer documentation](#custom-variables-mistserver-documentation) - [MP4 over HTTP | MistServer documentation](#mp4-over-http-mistserver-documentation) - [TS over HTTP | MistServer documentation](#ts-over-http-mistserver-documentation) - [JSON lines over raw TCP | MistServer documentation](#json-lines-over-raw-tcp-mistserver-documentation) - [Websocket API | MistServer documentation](#websocket-api-mistserver-documentation) - [Debug Levels | MistServer documentation](#debug-levels-mistserver-documentation) - [Flash progressive over HTTP (FLV) | MistServer documentation](#flash-progressive-over-http-flv-mistserver-documentation) - [JSON over HTTP | MistServer documentation](#json-over-http-mistserver-documentation) - [OGG over HTTP | MistServer documentation](#ogg-over-http-mistserver-documentation) - [AAC input | MistServer documentation](#aac-input-mistserver-documentation) - [Balancer input | MistServer documentation](#balancer-input-mistserver-documentation) - [Executable input for streams | MistServer documentation](#executable-input-for-streams-mistserver-documentation) - [Config File | MistServer documentation](#config-file-mistserver-documentation) - [EBML input | MistServer documentation](#ebml-input-mistserver-documentation) - [File input for streams | MistServer documentation](#file-input-for-streams-mistserver-documentation) - [Local-only UDP API | MistServer documentation](#local-only-udp-api-mistserver-documentation) - [Buffer input | MistServer documentation](#buffer-input-mistserver-documentation) - [Fallback streams | MistServer documentation](#fallback-streams-mistserver-documentation) - [Authentication | MistServer documentation](#authentication-mistserver-documentation) - [RTSP | MistServer documentation](#rtsp-mistserver-documentation) - [RTMP | MistServer documentation](#rtmp-mistserver-documentation) - [Commandline parameters | MistServer documentation](#commandline-parameters-mistserver-documentation) - [JSON format stream information | MistServer documentation](#json-format-stream-information-mistserver-documentation) - [WebSocket format stream information | MistServer documentation](#websocket-format-stream-information-mistserver-documentation) - [HTML format stream information | MistServer documentation](#html-format-stream-information-mistserver-documentation) - [RTP streams using SDP | MistServer documentation](#rtp-streams-using-sdp-mistserver-documentation) - [Development tool: Sanity checker | MistServer documentation](#development-tool-sanity-checker-mistserver-documentation) - [SubRip (SRT/WebVTT) over HTTP | MistServer documentation](#subrip-srt-webvtt-over-http-mistserver-documentation) - [TS over TCP | MistServer documentation](#ts-over-tcp-mistserver-documentation) - [JavaScript format stream information | MistServer documentation](#javascript-format-stream-information-mistserver-documentation) - [TS over RIST | MistServer documentation](#ts-over-rist-mistserver-documentation) - [WAV over HTTP | MistServer documentation](#wav-over-http-mistserver-documentation) - [WebRTC | MistServer documentation](#webrtc-mistserver-documentation) - [Streams Panel | MistServer documentation](#streams-panel-mistserver-documentation) - [FLAC input | MistServer documentation](#flac-input-mistserver-documentation) - [Binaries | MistServer documentation](#binaries-mistserver-documentation) - [Protocols Panel | MistServer documentation](#protocols-panel-mistserver-documentation) - [TS over SRT | MistServer documentation](#ts-over-srt-mistserver-documentation) - [Stream_tags | MistServer documentation](#stream-tags-mistserver-documentation) - [USER_NEW | MistServer documentation](#user-new-mistserver-documentation) - [FLV input | MistServer documentation](#flv-input-mistserver-documentation) - [TSSRT input | MistServer documentation](#tssrt-input-mistserver-documentation) - [Folder input | MistServer documentation](#folder-input-mistserver-documentation) - [Docker installation | MistServer documentation](#docker-installation-mistserver-documentation) - [H264 input | MistServer documentation](#h264-input-mistserver-documentation) - [When to use triggers | MistServer documentation](#when-to-use-triggers-mistserver-documentation) - [ISMV input | MistServer documentation](#ismv-input-mistserver-documentation) - [MP3 input | MistServer documentation](#mp3-input-mistserver-documentation) - [HLS input | MistServer documentation](#hls-input-mistserver-documentation) - [MP4 input | MistServer documentation](#mp4-input-mistserver-documentation) - [OGG input | MistServer documentation](#ogg-input-mistserver-documentation) - [Playlist input | MistServer documentation](#playlist-input-mistserver-documentation) - [SDP input | MistServer documentation](#sdp-input-mistserver-documentation) - [SubRip input | MistServer documentation](#subrip-input-mistserver-documentation) - [RTSP input | MistServer documentation](#rtsp-input-mistserver-documentation) - [TS input | MistServer documentation](#ts-input-mistserver-documentation) - [Triggers Panel | MistServer documentation](#triggers-panel-mistserver-documentation) - [TSRIST input | MistServer documentation](#tsrist-input-mistserver-documentation) - [Server Stats Panel | MistServer documentation](#server-stats-panel-mistserver-documentation) - [Push Panel | MistServer documentation](#push-panel-mistserver-documentation) - [Statistics Panel | MistServer documentation](#statistics-panel-mistserver-documentation) - [Logs Panel | MistServer documentation](#logs-panel-mistserver-documentation) - [Addprotocol | MistServer documentation](#addprotocol-mistserver-documentation) - [No_unconfigured_streams | MistServer documentation](#no-unconfigured-streams-mistserver-documentation) - [Deleteprotocol | MistServer documentation](#deleteprotocol-mistserver-documentation) - [Updateprotocol | MistServer documentation](#updateprotocol-mistserver-documentation) - [INPUT_ABORT | MistServer documentation](#input-abort-mistserver-documentation) - [LIVEPEER_SEGMENT_REJECTED | MistServer documentation](#livepeer-segment-rejected-mistserver-documentation) - [LIVE_TRACK_LIST | MistServer documentation](#live-track-list-mistserver-documentation) - [Log | MistServer documentation](#log-mistserver-documentation) - [OUTPUT_START | MistServer documentation](#output-start-mistserver-documentation) - [PROCESS_SWITCH_SOURCE | MistServer documentation](#process-switch-source-mistserver-documentation) - [OUTPUT_END | MistServer documentation](#output-end-mistserver-documentation) - [OUTPUT_STOP | MistServer documentation](#output-stop-mistserver-documentation) - [Clearstatlogs | MistServer documentation](#clearstatlogs-mistserver-documentation) - [PUSH_END | MistServer documentation](#push-end-mistserver-documentation) - [PUSH_OUT_START | MistServer documentation](#push-out-start-mistserver-documentation) - [RECORDING_END | MistServer documentation](#recording-end-mistserver-documentation) - [LIVE_BANDWIDTH | MistServer documentation](#live-bandwidth-mistserver-documentation) - [Browse | MistServer documentation](#browse-mistserver-documentation) - [DEFAULT_STREAM | MistServer documentation](#default-stream-mistserver-documentation) - [PUSH_REWRITE | MistServer documentation](#push-rewrite-mistserver-documentation) - [Capabilities | MistServer documentation](#capabilities-mistserver-documentation) - [RTMP_PUSH_REWRITE | MistServer documentation](#rtmp-push-rewrite-mistserver-documentation) - [STREAM_ADD | MistServer documentation](#stream-add-mistserver-documentation) - [Nuke_stream | MistServer documentation](#nuke-stream-mistserver-documentation) - [CONN_CLOSE | MistServer documentation](#conn-close-mistserver-documentation) - [CONN_OPEN | MistServer documentation](#conn-open-mistserver-documentation) - [Addstream | MistServer documentation](#addstream-mistserver-documentation) - [Deletestreamsource | MistServer documentation](#deletestreamsource-mistserver-documentation) - [Config | MistServer documentation](#config-mistserver-documentation) - [Config_backup | MistServer documentation](#config-backup-mistserver-documentation) - [Config_restore | MistServer documentation](#config-restore-mistserver-documentation) - [Save | MistServer documentation](#save-mistserver-documentation) - [CONN_PLAY | MistServer documentation](#conn-play-mistserver-documentation) - [STREAM_BUFFER | MistServer documentation](#stream-buffer-mistserver-documentation) - [STREAM_PUSH | MistServer documentation](#stream-push-mistserver-documentation) - [STREAM_READY | MistServer documentation](#stream-ready-mistserver-documentation) - [Stop_sessions | MistServer documentation](#stop-sessions-mistserver-documentation) - [Streams | MistServer documentation](#streams-mistserver-documentation) - [STREAM_LOAD | MistServer documentation](#stream-load-mistserver-documentation) - [Deletestream | MistServer documentation](#deletestream-mistserver-documentation) - [STREAM_REMOVE | MistServer documentation](#stream-remove-mistserver-documentation) - [API_endpoint | MistServer documentation](#api-endpoint-mistserver-documentation) - [Overview Panel | MistServer documentation](#overview-panel-mistserver-documentation) - [UI_settings | MistServer documentation](#ui-settings-mistserver-documentation) - [STREAM_SOURCE | MistServer documentation](#stream-source-mistserver-documentation) - [STREAM_UNLOAD | MistServer documentation](#stream-unload-mistserver-documentation) - [Stop_sessID | MistServer documentation](#stop-sessid-mistserver-documentation) - [Totals | MistServer documentation](#totals-mistserver-documentation) - [Clients | MistServer documentation](#clients-mistserver-documentation) - [Stop_tag | MistServer documentation](#stop-tag-mistserver-documentation) - [Tag_sessID | MistServer documentation](#tag-sessid-mistserver-documentation) - [SYSTEM_START | MistServer documentation](#system-start-mistserver-documentation) - [MacOS installation | MistServer documentation](#macos-installation-mistserver-documentation) - [Invalidate_sessions | MistServer documentation](#invalidate-sessions-mistserver-documentation) - [Active_streams | MistServer documentation](#active-streams-mistserver-documentation) - [Stats_streams | MistServer documentation](#stats-streams-mistserver-documentation) - [STREAM_CONFIG | MistServer documentation](#stream-config-mistserver-documentation) - [Checkupdate | MistServer documentation](#checkupdate-mistserver-documentation) - [Push_start | MistServer documentation](#push-start-mistserver-documentation) - [Push_list | MistServer documentation](#push-list-mistserver-documentation) - [Push_auto_add | MistServer documentation](#push-auto-add-mistserver-documentation) - [Push_auto_remove | MistServer documentation](#push-auto-remove-mistserver-documentation) - [Push_auto_list | MistServer documentation](#push-auto-list-mistserver-documentation) - [Push_settings | MistServer documentation](#push-settings-mistserver-documentation) - [USER_END | MistServer documentation](#user-end-mistserver-documentation) - [Proc_list | MistServer documentation](#proc-list-mistserver-documentation) - [Login | MistServer documentation](#login-mistserver-documentation) - [Running without installation | MistServer documentation](#running-without-installation-mistserver-documentation) - [Compile from the source code | MistServer documentation](#compile-from-the-source-code-mistserver-documentation) - [Windows installation | MistServer documentation](#windows-installation-mistserver-documentation) - [General Panel | MistServer documentation](#general-panel-mistserver-documentation) - [Autoupdate | MistServer documentation](#autoupdate-mistserver-documentation) - [Linux installation | MistServer documentation](#linux-installation-mistserver-documentation) - [Update | MistServer documentation](#update-mistserver-documentation) - [SYSTEM_STOP | MistServer documentation](#system-stop-mistserver-documentation) - [Shutdown | MistServer documentation](#shutdown-mistserver-documentation) - [Tag_stream | MistServer documentation](#tag-stream-mistserver-documentation) - [Push_stop | MistServer documentation](#push-stop-mistserver-documentation) - [STREAM_END | MistServer documentation](#stream-end-mistserver-documentation) - [Untag_stream | MistServer documentation](#untag-stream-mistserver-documentation) --- # Quick start | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) Getting started =============== MistServer can be split up in 3 steps. * Installation. Here we'll help you boot MistServer on your server * Configuration. How to set up a very basic MistServer server * Playback. Add a stream and get to the output. Now, let's begin! [πŸ“„οΈ Installation\ ----------------\ \ How to quickly get started with MistServer](/mistserver/quickstart/installation) [πŸ“„οΈ Configuration\ -----------------\ \ How to configure your fresh MistServer.](/mistserver/quickstart/configuration) [πŸ“„οΈ Playback\ ------------\ \ How to view the streams available in MistServer](/mistserver/quickstart/playback) --- # Core Concepts | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page What do you need to know when using MistServer?[​](#what-do-you-need-to-know-when-using-mistserver "Direct link to What do you need to know when using MistServer?") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Streaming is a fairly complex subject, before you get started with MistServer we recommend familiarizing yourself with the following subjects. Knowing about these topics beforehand will be a huge boon while using MistServer. Especially critical knowledge is the [Streams settings](/mistserver/concepts/streams/) . [πŸ—ƒοΈ Stream Settings\ -------------------\ \ 5 items](/mistserver/concepts/streams/) [πŸ“„οΈ Stream process\ ------------------\ \ Streamprocesses to change streams or add to streams](/mistserver/concepts/stream_process) [πŸ“„οΈ Session system\ ------------------\ \ Viewer, Input, Output Sessions explained.](/mistserver/concepts/sessions) [πŸ“„οΈ Variable substitution\ -------------------------\ \ What are variables available within MistServer.](/mistserver/concepts/variable_substitution) [πŸ“„οΈ Parameters\ --------------\ \ What are parameters available within MistServer.](/mistserver/concepts/parameters) [πŸ“„οΈ Track Selectors\ -------------------\ \ What are track selectors available within MistServer.](/mistserver/concepts/track_selectors) [πŸ“„οΈ Debug Levels\ ----------------\ \ Debug levels for MistServer.](/mistserver/concepts/debug_levels) * [What do you need to know when using MistServer?](#what-do-you-need-to-know-when-using-mistserver) --- # Outputs | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) What are Outputs? ================= Outputs within MistServer mean any method that requires communication to the outside. Generally every viewer/users within MistServer will be connected to an output to provide them with streaming data. [Push inputs](/mistserver/concepts/streams/push_inputs) are also covered by outputs as they generally require two-way communication. Outputs are activated through the [Protocol panel](/mistserver/configuration/interface/protocols) , if an output is not activated it will not become available. When looking at a stream you can also look at the [Embed panel](/mistserver/configuration/interface/streams) included in the streams page for a quick look up of available outputs. Keep in mind that some outputs are dependant on other protocols, most browser capable outputs require at least HTTP or HTTPS to be set up for example. Here is a full list of outputs and their settings: [πŸ“„οΈ AAC over HTTP\ -----------------\ \ Pseudostreaming in AAC format over HTTP](/mistserver/outputs/AAC) [πŸ“„οΈ CMAF (fMP4) over HTTP (DASH, HLS7, HSS)\ -------------------------------------------\ \ Segmented streaming in CMAF (fMP4) format over HTTP](/mistserver/outputs/CMAF) [πŸ“„οΈ DTSC\ --------\ \ Real time streaming over DTSC (proprietary protocol for efficient inter-server streaming)](/mistserver/outputs/DTSC) [πŸ“„οΈ WebM/MKV over HTTP\ ----------------------\ \ Pseudostreaming in MKV and WebM (EBML) formats over HTTP](/mistserver/outputs/EBML) [πŸ“„οΈ Free Lossless Audio Codec\ -----------------------------\ \ Pseudostreaming in FLAC format over HTTP](/mistserver/outputs/FLAC) [πŸ“„οΈ Flash progressive over HTTP (FLV)\ -------------------------------------\ \ Pseudostreaming in Adobe Flash FLV format over HTTP](/mistserver/outputs/FLV) [πŸ“„οΈ H264/H265 over HTTP\ -----------------------\ \ Pseudostreaming in raw H264/H265 Annex B format over HTTP](/mistserver/outputs/H264) [πŸ“„οΈ Flash segmented over HTTP (HDS)\ -----------------------------------\ \ Segmented streaming in Adobe/Flash (FLV-based) format over HTTP ( = HTTP Dynamic Streaming)](/mistserver/outputs/HDS) [πŸ“„οΈ Apple segmented over HTTP (HLS)\ -----------------------------------\ \ Segmented streaming in Apple (TS-based) format over HTTP ( = HTTP Live Streaming)](/mistserver/outputs/HLS) [πŸ“„οΈ HTTP\ --------\ \ HTTP connection handler, provides all enabled HTTP-based outputs](/mistserver/outputs/HTTP) [πŸ“„οΈ Utility: Static HTTP file server\ ------------------------------------\ \ Serves static files over HTTP from a set folder](/mistserver/outputs/HTTPMinimalServer) [πŸ“„οΈ HTTPS (HTTP+TLS)\ --------------------\ \ HTTPS connection handler, provides all enabled HTTP-based outputs](/mistserver/outputs/HTTPS) [πŸ“„οΈ TS over HTTP\ ----------------\ \ Pseudostreaming in MPEG2/TS format over HTTP](/mistserver/outputs/HTTPTS) [πŸ“„οΈ JSON over HTTP\ ------------------\ \ Pseudostreaming in JSON format over HTTP](/mistserver/outputs/JSON) [πŸ“„οΈ JSON lines over raw TCP\ ---------------------------\ \ Real time JSON line-by-line input over a raw TCP socket or standard input](/mistserver/outputs/JSONLine) [πŸ“„οΈ MP3 over HTTP\ -----------------\ \ Pseudostreaming in MP3 format over HTTP](/mistserver/outputs/MP3) [πŸ“„οΈ MP4 over HTTP\ -----------------\ \ Pseudostreaming in MP4 format over HTTP](/mistserver/outputs/MP4) [πŸ“„οΈ OGG over HTTP\ -----------------\ \ Pseudostreaming in OGG format over HTTP](/mistserver/outputs/OGG) [πŸ“„οΈ RTMP\ --------\ \ Real time streaming over Adobe RTMP](/mistserver/outputs/RTMP) [πŸ“„οΈ RTSP\ --------\ \ Real Time Streaming in RTSP, over both RTP UDP and TCP](/mistserver/outputs/RTSP) [πŸ“„οΈ RTP streams using SDP\ -------------------------\ \ Make streams available as a RTP stream, using the SDP](/mistserver/outputs/SDP) [πŸ“„οΈ Development tool: Sanity checker\ ------------------------------------\ \ Does sanity check on a stream](/mistserver/outputs/SanityCheck) [πŸ“„οΈ SubRip (SRT/WebVTT) over HTTP\ ---------------------------------\ \ Pseudostreaming in SubRip Text (SRT) and WebVTT formats over HTTP](/mistserver/outputs/SubRip) [πŸ“„οΈ TS over TCP\ ---------------\ \ Real time streaming in MPEG2/TS format over TCP, UDP or RTP](/mistserver/outputs/TS) [πŸ“„οΈ TS over RIST\ ----------------\ \ Real time streaming of TS data over RIST](/mistserver/outputs/TSRIST) [πŸ“„οΈ TS over SRT\ ---------------\ \ Real time streaming of TS data over SRT](/mistserver/outputs/TSSRT) [πŸ“„οΈ WAV over HTTP\ -----------------\ \ Pseudostreaming in WAV format over HTTP](/mistserver/outputs/WAV) [πŸ“„οΈ WebRTC\ ----------\ \ Provides WebRTC output](/mistserver/outputs/WebRTC) --- # Integration | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) Integration =========== For integration with other systems, MistServer provides several methods: 1. The main method is the [API](/mistserver/integration/api/) , which allows configuration changes as well as direct control over various aspects of MistServer while it is running. 2. For easily grabbing data about specific streams, there is the info handler integrated into the [HTTP output](/mistserver/integration/http/) . 3. The [triggers system](/mistserver/integration/triggers/) allows receiving notifications of nearly any event, as well as changing the behaviour of MistServer. 4. The [prometheus instrumentation](/mistserver/integration/prometheus_instrumentation) allows gathering live statistics on your MistServer instance 5. The [Websocket API](/mistserver/integration/websocket_api) allows for live reading of MistServer's status. It reports all data available and then updates in real time. 6. The [generic writer](/mistserver/integration/external_writer) allows for the creation of your own custom outputs through scripts. This is great if you need media output in a certain way for compatibility reasons. 7. The [custom variables](/mistserver/integration/custom_variables) allow you to set short hands for commonly used strings or even set up basic scripting within MistServer. All of these will be further explained in the following subsections. [πŸ—ƒοΈ API\ -------\ \ 3 items](/mistserver/integration/api/) [πŸ—ƒοΈ HTTP output Handler\ -----------------------\ \ 4 items](/mistserver/integration/http/) [πŸ—ƒοΈ Triggers\ ------------\ \ 2 items](/mistserver/integration/triggers/) [πŸ“„οΈ Prometheus Instrumentation\ ------------------------------\ \ Advanced analytics through Prometheus Instrumentation.](/mistserver/integration/prometheus_instrumentation) [πŸ“„οΈ Websocket API\ -----------------\ \ Websocket API for retreaving near-realtime information.](/mistserver/integration/websocket_api) [πŸ“„οΈ External writer\ -------------------\ \ Create custom outputs through the external writer](/mistserver/integration/external_writer) [πŸ“„οΈ Custom variables\ --------------------\ \ Create custom variables within MistServer](/mistserver/integration/custom_variables) --- # Configuration | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Accessing the management interface and setting up MistServer ============================================================ Using the default settings Mistserver can be reached at `http://host:4242`. If ran locally you can always use `http://localhost:4242`. Once logged in you can browse the panels with the menu to the left, for the quickstart we will discuss the most minimal setup to get a stream. Our Interface uses the API internally, which is also available on port 4242 by default. We recommend first time users to use the interface and when automation becomes important to start using the API directly, for that please look at our [API documentation](/mistserver/integration/api/) . Creating your local MistServer account[​](#creating-your-local-mistserver-account "Direct link to Creating your local MistServer account") ------------------------------------------------------------------------------------------------------------------------------------------- The first time you connect to MistServer you will be prompted to create an account. This will be the information necessary to authorize any configuration changes within MistServer. You will also have the option to enable all default protocols, we recommend using this option if testing MistServer is your intent. Protocol page ============= Protocols are necessary in order to both send streams towards MistServer as to view streams from MistServer. In order to use a streaming method it should be activated and the port should be available to MistServer. If you have missed the opportunity to activate the default protocols you can do so again by selecting the `Enable default protocols` button within the `Protocol` page. In order to maximize compatibility MistServer uses a non-standard `HTTP` (TCP 8080) and `RTSP` (TCP 5554) port. Any protocol that sends data over HTTP requires HTTP or HTTPS to be activated. `SRT` has no default port, so we've chosen UDP 8889 for it. VoD files are always accessible to MistServer, you do not need to activate MP4 in order to open MP4 files. Streams page ============ The `Streams` page is where you set up streams within MistServer. This page shows a quick overview on the streams currently set up and their status. You can create new streams by clicking the `create a new stream` button. When creating a new stream there are 2 key settings: `Stream name` :This is how MistServer identifies the stream internally and how you can quickly access the stream with your player. `Source` :This determines how MistServer should get to the stream data for the given stream name. This could be a live input or a media file. Media files / VoD Sources[​](#media-files--vod-sources "Direct link to Media files / VoD Sources") --------------------------------------------------------------------------------------------------- The only requirement here is to provide the path to the media file you want to stream. This file should be accessible as if available on a local disk. You can also select a folder to make all the streams within that folder available. Live streams[​](#live-streams "Direct link to Live streams") ------------------------------------------------------------- Live streams are any type of source that are not locally stored within MistServer. Even if the source is a file on an outside location. These sources can be divided in 2 types: ### Push inputs[​](#push-inputs "Direct link to Push inputs") [Push inputs](/mistserver/concepts/streams/push_inputs) mean another server connects to MistServer and pushes in the stream data. MistServer waits for this device to make connection. Most incoming pushes can be set up using the following source: `push://(address)(@password)` `address`: Optional, if used white-list only the given source to push this stream. `@password`: Optional, if used the push attempt must include this password. in MistServer the following protocols can be used through `push://` sources: `RTMP`, `RTSP`, `SRT`, `WebRTC`. Some push inputs can or need to dedicate a specific port to the protocol. In this case a specific source needs to be given starting with the protocol scheme. These are `srt://` for `SRT`, `rist://` for `RIST` and `tsudp://` for `MPEG-TS over UDP`. Directly below the source field will appear how to push using specific protocols. The very easiest to push streaming setup is as follows: push:// Then push using the following settings: | Protocol | Push target | | --- | --- | | RTMP | `rtmp://address/live/streamname` | | SRT | `srt://address:8889?streamid=streamname` | | RTSP | `rtsp://address:5554/streamname` | ### Pull inputs[​](#pull-inputs "Direct link to Pull inputs") [Pull inputs](/mistserver/concepts/streams/pull_inputs) mean MistServer connects to an outside address and pulls in whatever stream is available at the given address. Simply fill in the address and watch the stream appear. * [Creating your local MistServer account](#creating-your-local-mistserver-account) * [Media files / VoD Sources](#media-files--vod-sources) * [Live streams](#live-streams) * [Push inputs](#push-inputs) * [Pull inputs](#pull-inputs) --- # Inputs | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) What are Inputs? ================ Inputs for MistServer describe any method you can use to point MistServer to streams or media to provide to viewers. This could mean whether you provide the stream by pushing it into MistServer, have MistServer pull in the stream from another location or provide MistServer to a local path for a media file. To learn more about setting up inputs we recommend reading up on the [Streams concept](/mistserver/concepts/streams/) . * [push inputs](/mistserver/concepts/streams/push_inputs) require a protocol to be set up in the [Protocols panel](/mistserver/configuration/interface/protocols) * [pull inputs](/mistserver/concepts/streams/pull_inputs) and [file input](/mistserver/concepts/streams/file_inputs) do not require any setup other than providing the correct input source. Below is a list of inputs and their settings, however keep in mind that push inputs are covered by [output processes](/mistserver/outputs/) instead: [πŸ“„οΈ AAC input\ -------------\ \ AAC input and configurations.](/mistserver/inputs/AAC) [πŸ“„οΈ Balancer input\ ------------------\ \ Balancer input and configurations.](/mistserver/inputs/Balancer) [πŸ“„οΈ Buffer input\ ----------------\ \ Buffer input and configurations.](/mistserver/inputs/Buffer) [πŸ“„οΈ DTSC input\ --------------\ \ DTSC input and configurations.](/mistserver/inputs/DTSC) [πŸ“„οΈ EBML input\ --------------\ \ EBML input and configurations.](/mistserver/inputs/EBML) [πŸ“„οΈ FLAC input\ --------------\ \ FLAC input and configurations.](/mistserver/inputs/FLAC) [πŸ“„οΈ FLV input\ -------------\ \ FLV input and configurations.](/mistserver/inputs/FLV) [πŸ“„οΈ Folder input\ ----------------\ \ Folder input and configurations.](/mistserver/inputs/Folder) [πŸ“„οΈ H264 input\ --------------\ \ H264 input and configurations.](/mistserver/inputs/H264) [πŸ“„οΈ HLS input\ -------------\ \ HLS input and configurations.](/mistserver/inputs/HLS) [πŸ“„οΈ ISMV input\ --------------\ \ ISMV input and configurations.](/mistserver/inputs/ISMV) [πŸ“„οΈ MP3 input\ -------------\ \ MP3 input and configurations.](/mistserver/inputs/MP3) [πŸ“„οΈ MP4 input\ -------------\ \ MP4 input and configurations.](/mistserver/inputs/MP4) [πŸ“„οΈ OGG input\ -------------\ \ OGG input and configurations.](/mistserver/inputs/OGG) [πŸ“„οΈ Playlist input\ ------------------\ \ Playlist input and configurations.](/mistserver/inputs/Playlist) [πŸ“„οΈ RTSP input\ --------------\ \ RTSP input and configurations.](/mistserver/inputs/RTSP) [πŸ“„οΈ SDP input\ -------------\ \ SDP input and configurations.](/mistserver/inputs/SDP) [πŸ“„οΈ SubRip input\ ----------------\ \ SubRip input and configurations.](/mistserver/inputs/SubRip) [πŸ“„οΈ TS input\ ------------\ \ TS input and configurations.](/mistserver/inputs/TS) [πŸ“„οΈ TSRIST input\ ----------------\ \ TSRIST input and configurations.](/mistserver/inputs/TSRIST) [πŸ“„οΈ TSSRT input\ ---------------\ \ TSSRT input and configurations.](/mistserver/inputs/TSSRT) --- # Configuration | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Configuring MistServer[​](#configuring-mistserver "Direct link to Configuring MistServer") ------------------------------------------------------------------------------------------- MistServer can be configured either through the [browser interface](/mistserver/configuration/interface/) or the [API](/mistserver/integration/api/) . If you're using MistServer for the first time we recommend using the [interface](/mistserver/configuration/interface/) as it is often the easier method. When you want automation or setting up without an interface look for the [API](/mistserver/integration/api/) . An alternative method is available by directly editing the [configuration file](/mistserver/configuration/configfile) [πŸ—ƒοΈ The MistServer Interface\ ----------------------------\ \ 10 items](/mistserver/configuration/interface/) [πŸ“„οΈ Commandline parameters\ --------------------------\ \ Commandline parameters and environment variables to change MistServer defaults](/mistserver/configuration/commandline) [πŸ“„οΈ Config File\ ---------------\ \ Setting up Mistserver directly through the configuration file](/mistserver/configuration/configfile) * [Configuring MistServer](#configuring-mistserver) --- # Stream Settings | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Stream settings =============== A "stream" is the base concept of media in MistServer. All media going in and/or out of MistServer is a stream. A stream can be live or on-demand, use the Pro wildcard feature or not, have configured triggers or not, have configured automatic pushes or not, etcetera. Regardless of whether a stream is configured through the web interface or the API, the method of configuration and the options available are the same. All streams have two main settings that are mandatory and must at all times be configured for the stream to function at all. These are the stream name and stream source settings. In addition to these, depending on the source value used, more mandatory and/or optional settings may be available. "Stop sessions" can be used to completely disconnect any incoming or outgoing connections involving the stream for a complete reset. Stream name[​](#stream-name "Direct link to Stream name") ---------------------------------------------------------- The stream name is the name that is used internally (and, unless overridden through triggers or other means, by default also externally) to refer to a specific media stream. A stream name may be no more than 100 single-byte characters long, and only the lower-case letters A-Z, numbers, and underscores are allowed in the stream name. Upper case characters will be converted to lower case, but any other characters in a stream name will be thrown away silently. In other words, setting a stream name to "`Test-Stream-1`" will result in the stream name "`teststream1`" to be used instead. This works both when configuring a stream and when accessing a stream later, ensuring consistency. When using wildcards, a plus symbol (`+`) or single space (either symbol may be used interchangeably) separates the stream name from the wildcard specifier. The wildcard specifier itself may contain any character, as long as the length of the entire string including stream name, separator and wildcard specifier stays within the limit of 100 bytes. UTF-8 encoding is assumed, but it is safe to use other encodings. Other encodings will not display correctly, however. Stream source[​](#stream-source "Direct link to Stream source") ---------------------------------------------------------------- The source of a stream defines literally just that: the source of the media data. It is a simple text field, and in its simplest form is merely the full path to a file that needs to play, but often it will be a URI representing a more complex resource. The following categories should provide you with more information: [πŸ“„οΈ Push input for streams\ --------------------------\ \ Basics of what you need to know to push live streams into MistServer](/mistserver/concepts/streams/push_inputs) [πŸ“„οΈ File input for streams\ --------------------------\ \ Basics of ingesting video files into MistServer](/mistserver/concepts/streams/file_inputs) [πŸ“„οΈ Pull input for streams\ --------------------------\ \ Basics of pulling streams into MistServer](/mistserver/concepts/streams/pull_inputs) [πŸ“„οΈ Executable input for streams\ --------------------------------\ \ Using executables to input streams into MistServer](/mistserver/concepts/streams/exec_inputs) [πŸ“„οΈ Fallback streams\ --------------------\ \ Using fallbacks for stream inputs](/mistserver/concepts/streams/fallback_inputs) ### Always on[​](#always-on "Direct link to Always on") Some source types have this option available, but not all of them do. Normally, MistServer automatically shuts down inputs/streams when no outputs are requesting them. This option, when enabled, instead keeps the stream active permanently. This means the stream will be using system resources continuously, but also allows MistServer to keep certain inputs active for pushing/pulling into MistServer without the need for an active viewer * [Stream name](#stream-name) * [Stream source](#stream-source) * [Always on](#always-on) --- # Playback | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Viewing your streams[​](#viewing-your-streams "Direct link to Viewing your streams") ------------------------------------------------------------------------------------- Streams can be previewed from the management interface. In order to preview a stream go to the `Streams` panel and press the `Preview` button for the corresponding stream, you will be able to select multiple players and protocols. Direct HTTP(S) URLs[​](#direct-https-urls "Direct link to Direct HTTP(S) URLs") -------------------------------------------------------------------------------- Any stream within MistServer can also be quickly viewed using our default Meta-player by visiting the stream `.html` output. You can find that under the following syntax: `http(s)://address:port/streamname.html` Where `address` corresponds to the address of the server running MistServer `port` The corresponding HTTP or HTTPS port that is setup within Mistserver `streamname` The stream name of the stream you wish to view Keep in mind that HTTPS requires manual input and cannot be automatically set up by MistServer! To enable HTTPS please refer to: * [Certbot integration](/howto/https/certbot) * [Proxying MistServer](/howto/https/httpproxy) Embedding the player on your website[​](#embedding-the-player-on-your-website "Direct link to Embedding the player on your website") ------------------------------------------------------------------------------------------------------------------------------------- Should you wish to include the preview player (with or without additional controls) you can find the embed code under the `embed` button. Keep in mind that changing the player settings will require you to copy the embed code again. The embed code itself should work in any environment that supports HTML code, however some webhosting solutions could strip out what makes it work. Feel free to [contact us](https://mistserver.org/contact) in that case! Third party players[​](#third-party-players "Direct link to Third party players") ---------------------------------------------------------------------------------- If you wish to use a third party player the direct stream URLs can be found at the bottom of the `embed` panel. Simply choose an output supported by your player and follow the instructions of your player. * [Viewing your streams](#viewing-your-streams) * [Direct HTTP(S) URLs](#direct-https-urls) * [Embedding the player on your website](#embedding-the-player-on-your-website) * [Third party players](#third-party-players) --- # API | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) API === All of the configuration of MistServer can be done through its API. The API is based on JSON messages over HTTP. A default interface implementing this API as a single HTML page is included in the controller itself. This default interface will be send for invalid API requests (to any other URL than `/api`), and is thus triggered by default when a browser attempts to access the API port directly. The default API port is 4242 - but this can be changed through both the API itself and through command line parameters. To send an API request, simply send a HTTP request to this port for any file, and include either a GET or POST parameter called "command", containing a JSON object string as payload. When requesting `/api` or `/api2`, you are guaranteed to receive a JSON object in return; otherwise sending an invalid request will serve the HTML5 API implementation web interface. An API call consists of one or more members being sent in the JSON object passed through the "command" parameter, and combining multiple members into a single call is allowed. The output will be similarly combined in that case. You may also include a "callback" or "jsonp" HTTP parameter, to trigger JSONP compatibility mode. JSONP is useful for getting around the cross-domain scripting protection in most modern browsers. Developers creating non-JavaScript applications will most likely not want or need to use JSONP mode. An example of an authorization request to the API looks like this: GET /api?command={"authorize":{"username":"test","password":"941d7b88b2312d4373aff526cf7b6114"}} HTTP/1.0 Or, properly URL encoded: GET /api?command=%7B%22authorize%22%3A%7B%22username%22%3A%22test%22%2C%22password%22%3A%2294... HTTP/1.0 The server is quite lenient about not URL encoding your strings, but it's a good idea to always URL encode the entire command parameter to prevent it from being interpreted wrongly. Each API command available will be explained in the following sections. For historical reasons, the "`streams`", "`config`" and "`log`" API responses are always given, even if not requested, unless the request "`"minimal": 1`" is sent along with the API requests. When requesting through `/api2`, the minimal flag is always set automatically. All versions of MistServer 3.0 will always include the response "`"LTS":1`" to indicate that they are Pro versions. This is for backwards compatibility, there are no longer any Pro versions, just the open source version. [πŸ“„οΈ Authentication\ ------------------\ \ How to Authenticate with the MistServer API](/mistserver/integration/api/authentication) [πŸ“„οΈ Local-only UDP API\ ----------------------\ \ The local-only UDP API](/mistserver/integration/api/local_udp_api) [πŸ—ƒοΈ List of API calls\ ---------------------\ \ 43 items](/category/list-of-api-calls) --- # HTTP output Handler | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) The controller does not keep detailed information about the streams, but the various outputs can retrieve this information from the inputs. In order to get this information elsewhere, the HTTP output supports retrieving this information in either JSON or JavaScript format. In addition, the HTTP output also supports two methods of embedding onto websites. [πŸ“„οΈ JSON format stream information\ ----------------------------------\ \ How to grab stream information over HTTP - JSON](/mistserver/integration/http/json) [πŸ“„οΈ JavaScript format stream information\ ----------------------------------------\ \ How to grab stream information over HTTP - JavaScript](/mistserver/integration/http/javascript) [πŸ“„οΈ WebSocket format stream information\ ---------------------------------------\ \ How to grab stream information over HTTP - WebSocket](/mistserver/integration/http/webSocket) [πŸ“„οΈ HTML format stream information\ ----------------------------------\ \ How to grab stream information over HTTP - HTML](/mistserver/integration/http/html) --- # Installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Running MistServer[​](#running-mistserver "Direct link to Running MistServer") ------------------------------------------------------------------------------- MistServer can be ran without an installation as well. Simply boot up the `MistController(.exe)` when you download the binaries and you're good to go. The configurations will be saved in the same folder as `config.json`. Do note that some of MistServer's automatic error recovery features will not function properly when not running as a system service. ### Linux specific instructions[​](#linux-specific-instructions "Direct link to Linux specific instructions") #### MistServer as a Service[​](#mistserver-as-a-service "Direct link to MistServer as a Service") The easiest method to start with MistServer is to install it through the terminal. There's 2 requirements: * You are running the script as root * `curl` is installed Install using: curl -o - https://releases.mistserver.org/is/mistserver_64Vlatest.tar.gz 2>/dev/null | sh Uninstall using: curl -o - https://releases.mistserver.org/uninstallscript.sh 2>/dev/null | sh #### From the binaries[​](#from-the-binaries "Direct link to From the binaries") We recommend booting MistServer by the use of a terminal. Open a terminal window, browse to the folder where you've unpacked the binaries and run the MistController. ### Windows specific instructions[​](#windows-specific-instructions "Direct link to Windows specific instructions") For the best experience when using MistServer in Windows we recommend using the command prompt and running MistController.exe. If you are not familiar with the command prompt simply double click on MistController.exe. Several windows popping up is normal behaviour for MistServer in some versions of Windows, so do not get alarmed if this happens. ### MacOS specific instructions[​](#macos-specific-instructions "Direct link to MacOS specific instructions") MistServer in MacOS requires permissions to create temporarily files, as such running MistServer as root is recommended. The easiest way to do this is to boot MistController from the `Terminal` using sudo. You can do this by opening the `Terminal`, typing `sudo` and dragging the MistController inside the terminal window. Make sure there is a space between sudo and the file path. You will be promped to enter the root password before you can continue. ### Docker specific instructions[​](#docker-specific-instructions "Direct link to Docker specific instructions") For detailed instructions, please visit our [docker installation](/mistserver/installation/docker) page **Docker run bare minimum sharing host network** docker run --shm-size=1G --network=host ddvtech/mistserver_alpine_minimal:latest \*\*Docker run bare minimum publishing ports docker run --shm-size=1G -p 8080:8080 -p 4242:4242 -p 4200:4200 -p 5444:5444 -p 8889:8889/udp -p 443:443 ddvtech/mistserver_alpine_minimal:latest * [Running MistServer](#running-mistserver) * [Linux specific instructions](#linux-specific-instructions) * [Windows specific instructions](#windows-specific-instructions) * [MacOS specific instructions](#macos-specific-instructions) * [Docker specific instructions](#docker-specific-instructions) --- # AAC over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page AAC over HTTP ============= Pseudostreaming in AAC format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.aac` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in AAC format over HTTP | Playing AAC over HTTP from MistServer[​](#playing-aac-over-http-from-mistserver "Direct link to Playing AAC over HTTP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | AAC progressive | html5/audio/aac | http(s)://`HOST`:`PORT`/`STREAMNAME`.aac | AAC Optional configurations[​](#aac-optional-configurations "Direct link to AAC Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing AAC over HTTP from MistServer](#playing-aac-over-http-from-mistserver) * [AAC Optional configurations](#aac-optional-configurations) --- # Session system | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Explaining sessions =================== Sessions within MistServer are connections, these could be viewers, inputs, outputs or unspecified. More specifically it would indicate when a connection is considered new or not. Some protocols would open and close connections consistently, or viewers might switch between protocols. Would you consider those changes "new" or simply 1 viewer. Before 3.2 we'd counted a session based on parameters per connection, these were parameters like: `IP address`, `Token`, `Protocol` and `stream name`. With 3.2 we have the same parameters, but we have opened up the settings on when/what is considered a new connection. Now the reason why this is important for most people is to more accurately determine viewer numbers for a stream. If you know what is used to decide whether someone is a new viewer you'll have more faith in the numbers reported back to you. Another thing to keep in mind is that by default Sessions within Mistserver time out after 15 seconds, denied session keep stored for 10minutes. This means that a Session will be remembered for 10 minutes after it's been inactive and then be considered a new session if reconnecting. You can speed up this process with an INVALIDATE\_SESSIONS API call. Setting up sessions =================== Sessions can be set up in the `General` panel of MistServer or directly through the API. We recommend using the interface and later on copying the config settings to other MistServer instances as that's an easier method. Token settings ============== Tokens were known as Session IDs or SIDs before MistServer 3.2 and were mostly undocumented. They have now been rewritten to be Tokens. Tokens are unique strings per process that can be used to keep track of the same user/process switching between protocols or streams. Token settings determine how a Token is made or used. For inputs and outputs the `process ID (PID)` of the process handling the in or output will be used. For viewers an `Cookie` or `URL parameter` can be used. The settings allow you to both read or write these to a `Cookie` or `URL parameter`. In general we would recommend writing to both `Cookie` and `URL parameter` as it'll give the biggest guarantee a viewer will be registered as the same. One thing of note here is that an `URL parameter` will always have priority above a `Cookie` if both are used. In order to set your own manual `Cookie` or `URL parameter` simply set your own "`tkn=value`". Viewer, Input, Output and Unspecified sessions ============================================== These are the types of sessions that can be connected to MistServer. Note that processes can be present as both an input and output at the same time as MistServer would first "output" the given stream data into a new process handling the "input", we will add the option to make MistServer ran processes as unspecified processes in the future. Viewer sessions[​](#viewer-sessions "Direct link to Viewer sessions") ---------------------------------------------------------------------- Viewers are pretty straightforward, these are the people watching streams and most likely the ones you are most interested in. You can set up MistServer to determine a new session based on 4 variables: * Stream name The Stream the viewer is watching * IP address The IP address the viewer is connecting from * Token The Token reported back by URL paramater then Cookie * Protocol The stream protocol in use (HLS, MP4, etc) Our defaults here are to consider someone a new viewer when `Stream name`, `Token` or `IP address` changes. As most viewers generally do not switch between Token or IP address this means a viewer can switch between protocols and still be counted as the same connection. However if the viewer switches to a different stream completely it'll count as a new viewer for that stream. Input sessions[​](#input-sessions "Direct link to Input sessions") ------------------------------------------------------------------- Input sessions are connections coming into MistServer as a stream source. These could be pushes coming into MistServer, processes ran by MistServer but also MistServer pulling from other locations. A session can be determined based on 4 variables: * Stream name The Stream the input is providing * IP address The IP address the input is coming from * Token The PID handling the input at the MistServer side * Protocol The stream protocol in use (RTMP, SRT, HLS, etc) Our defaults here are to consider something a new input when `Stream name`, `IP address` and `Token` are different. This would mean that every unique push into MistServer is considered a new input session. Output sessions[​](#output-sessions "Direct link to Output sessions") ---------------------------------------------------------------------- Output sessions are connections going out of MistServer that are not viewers. These could be pushes to local file, other servers or processes ran by MistServer. A session can be based on 4 variables: * Stream name The Stream MistServer is pushing * IP address The IP address of the target location * Token The PID doing the push at the MistServer side * Protocol The stream protocol in use (RTMP, SRT, HLS, etc.) Our defaults here are to consider something a new output when `Stream name`, `IP address` and `Token` are different. This would mean that every unique push out of MistServer is considered a new output session. Unspecified sessions[​](#unspecified-sessions "Direct link to Unspecified sessions") ------------------------------------------------------------------------------------- These are the sessions that could be considered as something else than a Viewer, Input or Output. There is no "default" unspecified session, but we've added the option to consider some requests/processes unspecified to discount them from any Trigger or Analytic usage. The HTTP JSON request for stream information the MistServer player does before playback can be selected as such a protocol. We plan to add the option to consider stream processes as unspecified option as well. An unspecified session can be based on 4 variables: * Stream name The Stream name relevant to the session * IP address The IP address this session is connecting from or to * Token The Token reported back by URL paramater then Cookie or PID * Protocol The stream protocol in use (HTTP, SRT, etc) Our defaults here are to use none of the variables. Mostly because we assume you point something to an unspecified session because you specifically want it gone from your analytics or trigger requests. Therefore we do not create any sessions for unspecified sessions as a default. * [Viewer sessions](#viewer-sessions) * [Input sessions](#input-sessions) * [Output sessions](#output-sessions) * [Unspecified sessions](#unspecified-sessions) --- # CMAF (fMP4) over HTTP (DASH, HLS7, HSS) | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page CMAF (fMP4) over HTTP (DASH, HLS7, HSS) ======================================= Segmented streaming in CMAF (fMP4) format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `cmaf://*` `cmafs://*` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Segmented streaming in CMAF (fMP4) format over HTTP | Playing CMAF (fMP4) over HTTP (DASH, HLS7, HSS) from MistServer[​](#playing-cmaf-fmp4-over-http-dash-hls7-hss-from-mistserver "Direct link to Playing CMAF (fMP4) over HTTP (DASH, HLS7, HSS) from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | DASH | dash/video/mp4 | http(s)://`HOST`:`PORT`/cmaf/`STREAMNAME`/index.mpd | | HLS (CMAF) | html5/application/vnd.apple.mpegurl;version=7 | http(s)://`HOST`:`PORT`/cmaf/`STREAMNAME`/index.m3u8 | | MS Smooth Streaming | html5/application/vnd.ms-sstr+xml | http(s)://`HOST`:`PORT`/cmaf/`STREAMNAME`/Manifest | CMAF Optional configurations[​](#cmaf-optional-configurations "Direct link to CMAF Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Prepend path for chunks** | Chunks will be served from this path. This also disables sessions IDs for chunks. | String | | chunkpath | \--chunkpath | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Live playlist limit** | Maximum number of parts in live playlists. (0 = infinite) | Number (unsigned integer) | 0 | listlimit | \--list-limit | | **Merge sessions** | If enabled, merges together all views from a single user into a single combined session. If disabled, each view (main playlist request) is a separate session. | Flag | Unset | mergesessions | \--mergesessions | | **Send whole segments** | Disables chunked transfer encoding, forcing per-segment buffering. Reduces performance significantly, but increases compatibility somewhat. | Flag | Unset | nonchunked | \--nonchunked | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | CMAF Push parameters[​](#cmaf-push-parameters "Direct link to CMAF Push parameters") ------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing CMAF (fMP4) over HTTP (DASH, HLS7, HSS) from MistServer](#playing-cmaf-fmp4-over-http-dash-hls7-hss-from-mistserver) * [CMAF Optional configurations](#cmaf-optional-configurations) * [CMAF Push parameters](#cmaf-push-parameters) --- # Triggers | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page MistServer reports certain occurrences as configurable triggers to a URL or executable. Triggers are the preferred way of responding to server events. Each trigger has a name and a payload, and may be blocking or non-blocking as well as stream-specific or global. Triggers may be handled by a URL or an executable. If the handler contains the string `://`, a HTTP(S) URL is assumed. Otherwise, an executable is assumed. URL Trigger handler[​](#url-trigger-handler "Direct link to URL Trigger handler") ---------------------------------------------------------------------------------- If handled as an URL, a POST request is sent to the URL with an extra X-Trigger header containing the trigger name and the payload as the POST body. Executable Trigger handler[​](#executable-trigger-handler "Direct link to Executable Trigger handler") ------------------------------------------------------------------------------------------------------- If handled as an executable, the given executable is started with the trigger name as its only argument, and the payload is piped into the executable over standard input. Responses[​](#responses "Direct link to Responses") ---------------------------------------------------- Blocking triggers will wait for a response from the URL (as response body) or executable (standard output), using the response to perform some action. Non-blocking triggers do not wait for a response, and will ignore any response if received later. A response to a trigger is considered positive if it starts with any of the following: `1`, `yes`, `true`, `cont`. It is considered negative in all other cases. Stream-specific triggers[​](#stream-specific-triggers "Direct link to Stream-specific triggers") ------------------------------------------------------------------------------------------------- Stream-specific triggers can be set to activate for only specific streams, while global triggers always activate, regardless of any related streams. Enabling triggers[​](#enabling-triggers "Direct link to Enabling triggers") ---------------------------------------------------------------------------- As mentioned in the API call, triggers are enabled as such: "SOME_TRIGGER": [ ["handler", nonblocking, ["optional", "stream", "list"]], //Multiple handlers may be defined ] The `"handler"` here is the handler URL or executable. The `nonblocking` variable is a boolean true or false, where true means non-blocking and false means blocking. Note that non-blocking executable triggers will not have anything connected to standard output, which in the case of bash scripts will mean that they abort as soon as you try to echo anything. The `["optional", "stream", "list"]` is an optional list of streams for which this trigger should activate. If the trigger is global or this variable is left out or empty, it always activates. Triggers no longer activate if the controller has been shut down cleanly, but keep activating if the controller has been shut down by other means. A full list of triggers and their properties follows. [πŸ“„οΈ When to use triggers\ ------------------------\ \ What triggers to use when building solutions](/mistserver/integration/triggers/most_used_triggers) [πŸ—ƒοΈ List of Triggers\ --------------------\ \ 31 items](/category/list-of-triggers) * [URL Trigger handler](#url-trigger-handler) * [Executable Trigger handler](#executable-trigger-handler) * [Responses](#responses) * [Stream-specific triggers](#stream-specific-triggers) * [Enabling triggers](#enabling-triggers) --- # Push input for streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Push input for live streams =========================== Push inputs within Mistserver are streams that can be received through some communication method and only require a stream name as identifier. This is protocol-agnostic and allows you to choose the method through only a single set up. It's often assumed that MistInβ€” processes handle push inputs. Push inputs however are all handled by MistOutβ€” processes as push inputs all involve a handshaking method & communication to another location and is then passed on to the [MistInBuffer](/mistserver/inputs/Buffer) . For more information about the MistServer processes please review our [binaries documentation](/mistserver/installation/binaries) . A list of inputs that support push input is available here: [push inputs](/tags/push-input) To use push input you'll want to configure the source as: `push://[host][@passphrase]` Both the source host and the passphrase are optional. An incoming push will have to match at least one of the two to be allowed push access to the server, as well as the stream name. The `[host]` may include a subnet mask, in CIDR notation (e.g. `192.168.0.0/16` will allow the complete `192.168.X.Y` range to push). This even works with hostnames, but be aware the same CIDR mask will apply both to IPv4 and IPv6 if your hostname has records both address types! The `[passphrase]` may include any character allowed in URLs, however some characters might not be valid due to the specifications of a protocol. Therefore we recommend avoiding the following characters: `! # $ & ' ( ) * + , / : ; = ? @ [ ]` Pushing inputs ============== Every protocol capable of being a push input within MistServer needs to be set up first. Make sure that the protocol is setup within the [protocol configurations](/mistserver/configuration/interface/protocols) ! WebRTC[​](#webrtc "Direct link to WebRTC") ------------------------------------------- If WebRTC is activated within MistServer, you can push WebRTC connections towards either the HTTP or HTTPS port using the following syntax: `http(s)://hostname:port/webrtc/streamname` for WHIP `ws(s)://hostname:port/webrtc/streamname` for websockets Pushes can be done either through WHIP or through the MistServer specific websockets implementation. An example for WHIP push using OBS can be found [here](/howto/input/webrtc_whip) . RTMP[​](#rtmp "Direct link to RTMP") ------------------------------------- If RTMP is activated within MistServer, you can push over the RTMP protocol using the following RTMP URL: `rtmp://hostname:port/passphrase/streamname` The passphrase may be filled with any value (including leaving it empty) if not used. The section "`rtmp://hostname:port/passphrase`" is often referred to in RTMP broadcasting software as the "application URL" while the streamname is usually referred to as either the stream name or the stream key in RTMP broadcasting software. If port 1935 is used it may be left out. If you're familiar with RTMP you might wonder why we haven't included support for the application url. We explain our reasons [here](/protocol/deepdive/rtmp) RTSP[​](#rtsp "Direct link to RTSP") ------------------------------------- Pushing towards MistServer using RTSP is also possible, using the URL: `rtsp://hostname:port/streamname?pass=passphrase` The same guidelines and behaviour as for RTMP pushing apply. If port 554 is used it may be left out. SRT[​](#srt "Direct link to SRT") ---------------------------------- SRT behaves slightly different. It is impossible for SRT to use a passphrase setup through the `push://@passphrase` method. You will have to refer to the passphrase method within [SRT](/protocol/deepdive/srt) itself. The general URL for SRT are: `srt://hostname:port?streamid=streamname` This method requires SRT to be set up in the protocol panel and accept incoming streams on an UDP port. SRT can also be used in the traditional manner where you dedicate a specific port per SRT process, however this is incompatible with push input. SRT has several SRT specific parameters as well, these are all available within MistServer, please refer to [SRT](/protocol/deepdive/srt) for more information. DTSC[​](#dtsc "Direct link to DTSC") ------------------------------------- DTSC is MistServers proprietary protocol for efficient inter-server streaming. It supports everything MistServer can do feature & codecwise. To push DTSC to another MistServer instance the general URL should be used: `dtsc://hostname:port/streamname?pass=password` DTSC is the recommended method of sharing media data between MistServer instances. Optional parameters[​](#optional-parameters "Direct link to Optional parameters") ---------------------------------------------------------------------------------- Using a push source means several optional supplemental settings become available. All push inputs can use the parameters of [MistInBuffer](/mistserver/inputs/Buffer) Wildcard push input[​](#wildcard-push-input "Direct link to Wildcard push input") ---------------------------------------------------------------------------------- Wildcard push input lets you use the stream wildcard feature to create new push input live streams using the same settings on the fly. To use this configure a normal push input live stream as every push input live stream can be used for wildcard streams. To create a wildcard stream push towards MistServer like normal, but add "+wildcard specifier" to the end of the stream name. The "wildcard specifier" can contain any character but the total length of the full stream name may not exceed 100 bytes. Created wild card streams will show up on the stream window slightly indented and sorted under the parent stream. ### Wildcard Example[​](#wildcard-example "Direct link to Wildcard Example") The stream `livestream` is setup with source `push://` accepting pushes from anywhere. Pushing an stream in using the stream name `livestream+my_live_stream` would be accepted by MistServer as a wildcard stream under `livestream`. This would show up within MistServer as an unique stream called `livestream+my_live_stream` which inherits all settings from `livestream`. Push setup examples[​](#push-setup-examples "Direct link to Push setup examples") ---------------------------------------------------------------------------------- Some examples: * `push://` will allow anyone to push to the given stream name, without any host or password checking. * `push://127.0.0.1` will allow only `127.0.0.1` (localhost) to push to the given stream name. * `push://@123abc` will allow only users passing on the passphrase "`123abc`" to push to the given stream name. * `push://127.0.0.1@123abc` will allow `127.0.0.1` **localhost without a passphrase**, and **all other hosts with the passphrase** to push to the given stream name. * [WebRTC](#webrtc) * [RTMP](#rtmp) * [RTSP](#rtsp) * [SRT](#srt) * [DTSC](#dtsc) * [Optional parameters](#optional-parameters) * [Wildcard push input](#wildcard-push-input) * [Wildcard Example](#wildcard-example) * [Push setup examples](#push-setup-examples) --- # WebM/MKV over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page WebM/MKV over HTTP ================== Pseudostreaming in MKV and WebM (EBML) formats over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.mkv` `/*.webm` `mkv-exec:*` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in MKV and WebM (EBML) formats over HTTP | Playing WebM/MKV over HTTP from MistServer[​](#playing-webmmkv-over-http-from-mistserver "Direct link to Playing WebM/MKV over HTTP from MistServer") ------------------------------------------------------------------------------------------------------------------------------------------------------ | Method | Type | URL | | --- | --- | --- | | MKV progressive | html5/video/webm | http(s)://`HOST`:`PORT`/`STREAMNAME`.webm | EBML Optional configurations[​](#ebml-optional-configurations "Direct link to EBML Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | EBML Push parameters[​](#ebml-push-parameters "Direct link to EBML Push parameters") ------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing WebM/MKV over HTTP from MistServer](#playing-webmmkv-over-http-from-mistserver) * [EBML Optional configurations](#ebml-optional-configurations) * [EBML Push parameters](#ebml-push-parameters) --- # Pull input for streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Pulling streams into MistServer =============================== Pulling a stream means having MistServer input a stream hosted somewhere else. The only thing you need to do in order to make these streams available is point MistServer at the address to ingest. If the input is supported it will be made available when possible. For a list of pull inputs look here: [pull inputs](/tags/pull-input) DTSC pull input[​](#dtsc-pull-input "Direct link to DTSC pull input") ---------------------------------------------------------------------- DTSC pull can be used to pull streams over DDVTech's propriatary DTSC protocol. This is the most efficient means to pull a stream from another MistServer instance. You'll need to configure the source as: `dtsc://host[:port][/streamname[+wildcard]]` Both port and stream name are optional. The port will default to 4200 and the stream name will default to the local stream name. If the local stream is requested with a wildcard and there is not a wildcard in the DTSC url it will be appended to it. Some examples: * `dtsc://1.2.3.4` will pull from ip 1.2.3.4 and requests its own name. * `dtsc://1.2.3.4/video` will pull from ip 1.2.3.4 and will pull stream video and all of its wildcard streams, serving it under the set name with the wildcard names added to it. * `dtsc://1.2.3.4/video+vid_01` will pull from ip 1.2.3.4 and only pull the wildcard stream vid\_01, serving it under the set name In order to pull from a MistServer instance you will need to activate the DTSC protocol at the "protocol panel". If activated any stream available on the server is available for DTSC pull under the selected port. Note that currently, only pulling live streams is thoroughly tested. Video on Demand support is still considered experimental. Using a DTSC pull means the same optional supplemental settings become available as for RTMP/RTSP push input. RTSP pull input[​](#rtsp-pull-input "Direct link to RTSP pull input") ---------------------------------------------------------------------- RTSP pull can be used to pull streams from other systems using RTSP in client mode over either TCP or UDP transport. To use it you'll need to configure the source as: `rtsp://[account:password@]host[:port][/path]` Account and password can be used for authentication, if not set no authentication will be attempted. Port if not set will default to the default 554, the default RTSP port. Path is the location of the stream on the system, which is often used as a steam identifier, if not set it defaults to empty. some examples: * `rtsp://1.2.3.4/video` will pull from ip 1.2.3.4 using port 554 and requests the stream available at path `video` * `rtsp://myaccount:mypassword@1.2.3.4:5678/videoMain` will pull from 1.2.3.4 using myaccount:mypassword for authentication, using port 5678 and requests the stream available at path `videoMain` HLS pull input[​](#hls-pull-input "Direct link to HLS pull input") ------------------------------------------------------------------- MistServer supports HLS input, both in VoD and live modes, both from disk and over HTTP. To input from disk, simply set the source to the index m3u or m3u8 file. Only TS-based HLS streams are currently supported (this is the most common type). When pulling over HTTP (HTTPS is currently unsupported --- but will be in the future at some point), you'll need to configure the source as: `http://host/path/to/playlist.m3u8` The stream must start with `http://` and end in `.m3u` or `.m3u8` for MistServer to recognize the HLS format correctly. In HTTP mode the stream is always treated as a live stream, even if the playlist file indicates otherwise. Multi bit rate streams are maintained as such, with all qualities available and adaptive bit rate switching enabled for all supporting protocols. TS UDP input[​](#ts-udp-input "Direct link to TS UDP input") ------------------------------------------------------------- TS UDP input can be used to have MistServer listen for a stream on the selected host/port over UDP. Both unicast and Multicast can be used. Since listening for TS UDP input is a continous process you'll need to "stop sessions" if you edit the source. You'll need to configure the source as: `tsudp://[host]:port[/interface[,interface[,...]]]` Both host and interface are optional. The host will default to all hosts available when not set, interface will default to all available interfaces when not set. The interface should be given as the IP address of the interface. Some examples: * `tsudp://:8765` will listen on all interfaces on port 8765 for an available stream. * `tsudp://1.2.3.4:8765` will listen on `1.2.3.4` port `8765` for an available stream. * `tsudp://224.0.0.0:8765/1.2.3.4` will listen for multicast broadcasts on address `224.0.0.0` on port `8765` through the interface with address `1.2.3.4`. * `tsudp://224.0.0.0:8765/1.2.3.4,5.6.7.8` will listen for multicast broadcasts on address `224.0.0.0` on port `8765` through the interfaces with addresses `1.2.3.4` and `5.6.7.8`. ### Multicast[​](#multicast "Direct link to Multicast") Multicast is used by setting up a normal TS UDP input stream while listening to a multicast address as "host". Multicast addresses are in the range 224.0.0.0 - 239.255.255.255 for IPv4. IPv6 multicast is also supported on all addresses with the prefix `ff00::/8`. * [DTSC pull input](#dtsc-pull-input) * [RTSP pull input](#rtsp-pull-input) * [HLS pull input](#hls-pull-input) * [TS UDP input](#ts-udp-input) * [Multicast](#multicast) --- # Prometheus Instrumentation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) If the controller is started with the `–prometheus PASSPHRASE` command line parameter, MistServer makes [Prometheus-compatible](https://prometheus.io/) instrumentation available. Once used as a command line parameter, the `PASSPHRASE` is stored into the configuration file, and need not be given again over the command line. It can be cleared by using the same parameter again, and providing an empty string instead: `–prometheus ""`. Alternatively the `PASSPHRASE` can be set up through the user interface by enabling the `Prometheus stats output` in the `General` tab. The instrumentation can be accessed over the API port (by default 4242) by requesting the path `/PASSPHRASE`. Documentation of this instrumentation itself is present inside the output, so not repeated here. Alternatively, the same data can also be accessed in JSON format as the path `/PASSPHRASE.json`. This format does not contain any documentation, but the same data is used, so please refer to the Prometheus-style output for details. Some of the data is stream-bound, and only available while a stream is active (has at least one session associated with it). The configuration of [Prometheus](https://prometheus.io/) or some other statistics gathering software is beyond the scope of this manual. Please see the documentation of your statistics gathering software for further details. The same goes for visualization of the gathered data. --- # DTSC | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page DTSC ==== Real time streaming over DTSC (proprietary protocol for efficient inter-server streaming) Pushing DTSC into MistServer[​](#pushing-dtsc-into-mistserver "Direct link to Pushing DTSC into MistServer") ------------------------------------------------------------------------------------------------------------- | Method | URL | | --- | --- | | DTSC | dtsc://`HOST`:`PORT`/`STREAMNAME`?pass=`PASSWORD` | Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `dtsc://*` DTSC Optional configurations[​](#dtsc-optional-configurations "Direct link to DTSC Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 4200 | port | \--port | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | DTSC Push parameters[​](#dtsc-push-parameters "Direct link to DTSC Push parameters") ------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing DTSC into MistServer](#pushing-dtsc-into-mistserver) * [Pushing/Recording](#pushingrecording) * [DTSC Optional configurations](#dtsc-optional-configurations) * [DTSC Push parameters](#dtsc-push-parameters) --- # Parameters | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page What are parameters =================== Parameters are additional options you can add to push target URLs and URL-based outputs/connectors to change what, when or for how long a stream and its specific tracks are handled. These are URL `GET` parameters, meaning that every first parameter will have to start with a '`?`' character while every following parameter will have to start with a '`&`' character. URL encoding, if present, will be removed. > MistServer will always assume the very last `?` of an URL is for MistServer parameters. If you are using `?` characters in your URL make sure to add an additional `?` to the end for the URL to work properly. URL parameters[​](#url-parameters "Direct link to URL parameters") ------------------------------------------------------------------- The available URL parameters for all URL-based outputs are: * `video=selector` - The video track to use. Track selectors are described in detail in [track selectors](/mistserver/concepts/track_selectors) . * `audio=selector` - The audio track to use. Track selectors are described in detail in [track selectors](/mistserver/concepts/track_selectors) . * `subtitle=selector` - The subtitle track to use. Track selectors are described in detail in [track selectors](/mistserver/concepts/track_selectors) . * `passthrough=1` - (TS-based protocols and containers, only) All possible tracks including meta-data will be included. * `rate=1` - Sets the playback rate depending on the number given. 1 = real time, 2 = 2x real time, 0 = no limit. Defaults to 1. * `startunix=1234` - Start the stream at the given unix time in seconds. A negative number can be given instead to go back the given amount of seconds compared to current time. * `stopunix=1234` - Stop the stream at the given unix time in seconds. As long as the entire requested range is not in the future you will get a vod clip. * `duration=1234` - The amount of seconds the clip/VoD should cover. Can be used as stopping point instead of a given `?stopunix=1234` or `?stop=1234`. As long as the entire requested range is not in the future you will get a vod clip. * `start=1234` - Start the stream at the given media time in seconds. * `stop=1234` - Stop the stream at the given media time in seconds. As long as the entire requested range is not in the future you will get a vod clip. * `dl=1` - Remove real time speed limiting from the output and provide a download link instead. If a `name.ext` is given provide the download as that `name.ext` instead of the current stream name. Push target parameters[​](#push-target-parameters "Direct link to Push target parameters") ------------------------------------------------------------------------------------------- The follow URL parameters only apply to push targets: * `recstart=1234` - media time-stamp in milliseconds when the push should start. * `recstop=1234` - media time-stamp in milliseconds when the push should stop. * `recstartunix=1234` - media time-stamp in server unix time when the push should start. This will overwrite the recstart parameter. * `recstopunix=1234` - media time-stamp in server unix time when the push should stop. This will overwrite the recstop parameter. * `duration=1234` - Will only output the given amount of seconds worth of media. Overrides recstop/recstopunix, if those are also given. * `split=1234` - Restarts recording at a keyframe roughly every given amount of seconds (rounding up to nearest keyframe). Re-parses text replacement varaibles before restarting, allowing for splitting recordings into multiple files with time-based filenames over time in a flexible manner. * `m3u8=path/file.m3u8` - Will have MistServer output the stream as a segmented stream with a playlist, given is the location of the master playlist (requires either [`$segmentCounter`](/mistserver/concepts/variable_substitution#segmented-outputs) or [`$currentMediaTime`](/mistserver/concepts/variable_substitution#segmented-outputs) to be used). * `maxEntries=1234` - Removes oldest entry if there are more than X entries in the playlist, so you can have a 24/7 online stream with space limited. Note that setting this will cause MistServer to never close the playlist. * `targetAge=1234` - Removes oldest entries if they have an age higher than X in seconds, so you can have a 24/7 online stream with space limited. Note that setting this will cause MistServer to never close the playlist. * `append=1` - If the push out is restarted append to the previous file if file names match instead of overwriting. * `noendlist=1` - If set MistServer will not close/finish the playlist even if the stream data stops. * [URL parameters](#url-parameters) * [Push target parameters](#push-target-parameters) --- # Variable substitution | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Variable substitution ===================== In various sections of this manual, variable substitution is mentioned. Wherever mentioned, the following variables can be used and will be replaced with their corresponding text equivalents: * `$stream` - inserts the whole stream name including wildcard portion (blank if non-applicable) * `$basename` - inserts only the stream name without wildcard portion (blank if non-applicable) * `$wildcard` - inserts only the wildcard portion of the stream name (blank if non-applicable) * `$pluswildcard` - inserts only the wildcard portion of the stream name, including the plus symbol (blank if non-applicable) * `$source` - inserts the whole configured source (blank if non-applicable) * `$day` --- The current day of the month (range 01 to 31, server time). * `$month` --- The current month (range 01 to 12, server time). * `$year` --- The current year (numerical, 4 digits, server time). * `$hour` --- The current hour (range 00 to 23, server time). * `$minute` --- The current minute (range 00 to 59, server time). * `$second` --- The current second (range 00 to 60, server time). * `$wday` - inserts the number of the current day of the week (range 1 to 7, Monday being 1, server time) * `$yday` - inserts the number of the current day of the year (range 001 to 366, server time) * `$week` - inserts the number of the current week of the year (range 01 to 53, server time) * `$datetime` - inserts $year.$month.$day.$hour.$minute.$second * `$epoch` - Inserts current time in epoch format (seconds) * `$utc` - Inserts current UTC time * `$rand8` - Inserts 8 random characters * `$rand16` - Inserts 16 random characters Segmented outputs[​](#segmented-outputs "Direct link to Segmented outputs") ---------------------------------------------------------------------------- In the context of writing segments to disk the following variables are also available, in addition to the above. * `$segmentCounter` - Inserts the number equal to how many segments have been created for this stream so far. * `$currentMediaTime` - Inserts the first media time stamp of the segment. Custom variables[​](#custom-variables "Direct link to Custom variables") ------------------------------------------------------------------------- Custom variables are variables you can create yourself and will only apply to your MistServer instance once set up. These variables can be created at the `General` panel and can be split up in 2 types: * `Static variables` - These variables will serve as a replacement and do not change. These are often used to write hard to remember information like long paths or logins easier. It has a 63 character limit. * `Dynamic variables` - These variables will run a command to determine the variable and can change depending on the script used. They are more flexible in use and could be used to trigger events within MistServer should you use them. It has a 511 character limit. You can also set how often the script should be run and when it should time-out. * [Segmented outputs](#segmented-outputs) * [Custom variables](#custom-variables) --- # Stream process | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Stream processes ================ Within MistServer a stream process is an optional processes that you can use to manipulate media data. This could simply be an encoding process to add an additional video quality to a stream, but also a method of adding meta-data, replacing tracks or even sending a track to a completely different process seperate of MistServer. There's several processes added to MistServer and a few free-form methods to choose from. When a process starts[​](#when-a-process-starts "Direct link to When a process starts") ---------------------------------------------------------------------------------------- > Processes within MistServer are currently only available for live streams. A stream process will immediately start when a stream becomes live. However you can determine when a process should start by selecting what type of media tracks should be available (or unavailable) before beginning. If no form of selection is done for a process it will use the same default selection as a viewer, which means the last added video and/or audio track that will be compatible with the selection. ### Start control[​](#start-control "Direct link to Start control") The start control determines when a process should start, what happens if a process fails and how a process should restart. ### Inhibitors / Source/Input selection[​](#inhibitors--sourceinput-selection "Direct link to Inhibitors / Source/Input selection") #### Inhibitors[​](#inhibitors "Direct link to Inhibitors") Inhibitors are a method of telling MistServer to not start a process if a track with certain data is available. This can be used to prevent a process from activating if whatever it is supposed to add to a stream is already available. For example preventing the creation of an 720p video track or an opus audio track if there is one available. You can select `video`, `audio` and `meta` in a similar fashion as [track selectors](/mistserver/concepts/track_selectors) #### Source/Input selection[​](#sourceinput-selection "Direct link to Source/Input selection") Source selection and Input selection are both responsible for selecting the track to input into the stream process. The main difference is that source selection allows for selecting audio, video and meta-data, while input will only select either video or audio. Once again you can select them in a similar fashion as [track selectors](/mistserver/concepts/track_selectors) . `Input selection` The selection will only apply to either video or audio track depending on what you're encoding. Other tracks will automatically not be selected. `Source selection` You can select audio, video and metadata. By default all are passed, but you can limit or remove the selection. If you leave an audio, video or meta unspecified `all` will be used. ### Inconsequential flag[​](#inconsequential-flag "Direct link to Inconsequential flag") Normal behaviour within MistServer is to not provide stream playback unless all tracks are available. Should a process fail to start this could mean the source of the stream stays unavailable as long as the process is attempted. The inconsequential flag is there to tell MistServer to provide the rest of the available tracks for playback even if this process fails or is considered booting. ### Target Stream[​](#target-stream "Direct link to Target Stream") The target stream is the stream that will receive the outcome of the process you're setting up. By default this will be the stream you're currently configuring, however you can fill in another valid `stream name` within MistServer to send it towards that stream instead. ### Restart behaviour[​](#restart-behaviour "Direct link to Restart behaviour") Restart behaviour determines how a process should behave if the stream process cannot start or fails. `Restart delay`: amount of time in ms between restart attempts, this is the default and set to 0ms. `Exponential backoff`: will increase the delay up to max the configured delay for each restart `Disabled`: do not restart the stream process Masks[​](#masks "Direct link to Masks") ---------------------------------------- Masks can be used to determine whether a track is visible for other tasks within MistServer. By default a track is visible for any task within MistServer and a track created through a stream process will inherit the mask of the track it is based on. Masks can impact both the `source/input` or `sink/output` track. The `source` track is the track that is used to create the `sink` track the stream process generates. The `source` mask has one additional option to `Undo masks on process exit/fail`, which will reset the `source` track masks should an `sink` process fail and become unavailable. This allows tasks previously forbidden to re-use the `source` track. To give examples of why you would use a mask: * To ensure only source qualities are used for processes * To only serve transcoded qualities to viewers * To only record source qualities Both `source` and `sink` masks are a bitmask Lowest bit (1) - ViewersSecond bit (2) - Outgoing pushes/recordingsThird bit (4) - ProcessesDefault: all 8 bits are set to true, including the 5 unused bits Current available stream processes ================================== While below is a list of stream processes currently available within MistServer one should note not all of these will be available within every version of MistServer. Whether a process is available depends both on the version of MistServer as well as the Operating System it is running on. libAV[​](#libav "Direct link to libAV") ---------------------------------------- * **Type**: `video`, `audio` * **Codecs**: `H264`, `JPEG`, `UYVY`, `OPUS`, `AAC`, `PCM` * **Requirements**: MistServer build with libAV process included. This is the libAV library implemented by the MistServer team. While more limited than other process options for encoding it will be far more efficient in comparison. The current focus for LibAV is H264/JPG encode/decode for video and AAC or OPUS for audio. FFmpeg[​](#ffmpeg "Direct link to FFmpeg") ------------------------------------------- * **Type**: `video`, `audio` * **Codecs**: `*` * **Requirements**: [FFmpeg](http://ffmpeg.org) installed on your system This uses a very minimal configuration capable of using a locally installed FFmpeg binary to do encoding. Matroska In/Out[​](#matroska-inout "Direct link to Matroska In/Out") --------------------------------------------------------------------- * **Type**: `video`, `audio`, `metadata` * **Codecs**: `*` * **Requirements**: Any application capable of MKV input/output This process is meant as an entry point for encoders. MistServer will run the given command and will push stream data in Matroska format towards its standard in & will catch the standard out expecting Matroska again. This allows both hardware and software encoders capable of Matroska to take & input media to MistServer. Livepeer network encoding[​](#livepeer-network-encoding "Direct link to Livepeer network encoding") ---------------------------------------------------------------------------------------------------- * **Type**: `video` * **Codecs**: `H264` * **Requirements**: A Livepeer key The Livepeer network allows users to use cloud encoding through [Livepeer](https://livepeer.com) . For more information about Livepeer, their mission and benefits we recommend visiting their website! * [When a process starts](#when-a-process-starts) * [Start control](#start-control) * [Inhibitors / Source/Input selection](#inhibitors--sourceinput-selection) * [Inconsequential flag](#inconsequential-flag) * [Target Stream](#target-stream) * [Restart behaviour](#restart-behaviour) * [Masks](#masks) * [libAV](#libav) * [FFmpeg](#ffmpeg) * [Matroska In/Out](#matroska-inout) * [Livepeer network encoding](#livepeer-network-encoding) --- # Track Selectors | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) Track selectors =============== Track selectors allow you to specify which tracks inside a stream you want to address. A track selector is always specific to a given track type (audio, video, or subtitle). Unless otherwise noted, a track selector will not select a track that is incompatible with the currently active protocol or container format. If no track selector is used for any track type, the default for non-live streams is to pick the first compatible track of that type. For live streams, the **last** compatible track of that type is selected instead. This default behaviour is skipped if any non-empty track selector is applied to that track type whatsoever. Track selectors consist of a string value which may be any of the following: * `selector,selector`: Selects the union of the given selectors. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. * `selector,!selector`: Selects the difference of the given selectors. Specifically, all tracks part of the first selector that are not part of the second selector. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. * `selector,|selector`: Selects the intersection of the given selectors. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. * `none` or `-1`: Selects no tracks of this type. * `all` or `*`: Selects all tracks of this type. * Any positive integer: Select this specific track ID. Does not apply if the given track ID does not exist or is of the wrong type. **Does** apply if the given track ID is incompatible with the currently active protocol or container format. * ISO 639-1/639-3 language code: Select all tracks marked as the given language. Case insensitive. * Codec string (e.g. `h264`): Select all tracks of the given codec. Case insensitive. * `highbps`, `maxbps` or `bestbps`: Select the track of this type with the highest bit rate. * `lowbps`, `minbps` or `worstbps`: Select the track of this type with the lowest bit rate. * `Xbps` or `Xkbps` or `Xmbps`: Select the single of this type which has a bit rate closest to the given number X. This number is in bits, not bytes. * `>Xbps` or `>Xkbps` or `>Xmbps`: Select all tracks of this type which have a bit rate greater than the given number X. This number is in bits, not bytes. * `XxY`: Select all tracks of this type with a pixel surface area greater than X by Y pixels. Only applied when the track type is video. * `bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing Free Lossless Audio Codec from MistServer](#playing-free-lossless-audio-codec-from-mistserver) * [FLAC Optional configurations](#flac-optional-configurations) --- # H264/H265 over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page H264/H265 over HTTP =================== Pseudostreaming in raw H264/H265 Annex B format over HTTP Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in raw H264/H265 Annex B format over HTTP | Playing H264/H265 over HTTP from MistServer[​](#playing-h264h265-over-http-from-mistserver "Direct link to Playing H264/H265 over HTTP from MistServer") --------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | Raw progressive | html5/video/raw | http(s)://`HOST`:`PORT`/`STREAMNAME`.h264 | | Raw WebSocket | ws/video/raw | ws(s)://`HOST`:`PORT`/`STREAMNAME`.h264 | H264 Optional configurations[​](#h264-optional-configurations "Direct link to H264 Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing H264/H265 over HTTP from MistServer](#playing-h264h265-over-http-from-mistserver) * [H264 Optional configurations](#h264-optional-configurations) --- # Flash segmented over HTTP (HDS) | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Flash segmented over HTTP (HDS) =============================== Segmented streaming in Adobe/Flash (FLV-based) format over HTTP ( = HTTP Dynamic Streaming) Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Segmented streaming in Adobe/Flash (FLV-based) format over HTTP ( = HTTP Dynamic Streaming) | Playing Flash segmented over HTTP (HDS) from MistServer[​](#playing-flash-segmented-over-http-hds-from-mistserver "Direct link to Playing Flash segmented over HTTP (HDS) from MistServer") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | Flash Dynamic (HDS) | flash/11 | http(s)://`HOST`:`PORT`/dynamic/`STREAMNAME`/manifest.f4m | HDS Optional configurations[​](#hds-optional-configurations "Direct link to HDS Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing Flash segmented over HTTP (HDS) from MistServer](#playing-flash-segmented-over-http-hds-from-mistserver) * [HDS Optional configurations](#hds-optional-configurations) --- # HTTPS (HTTP+TLS) | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page HTTPS (HTTP+TLS) ================ HTTPS connection handler, provides all enabled HTTP-based outputs Provides dependency HTTPS (HTTP+TLS) for MistServer[​](#provides-dependency-https-httptls-for-mistserver "Direct link to Provides dependency HTTPS (HTTP+TLS) for MistServer") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Provides | Description | | --- | --- | | HTTP | HTTPS connection handler, provides all enabled HTTP-based outputs | HTTPS Required configurations[​](#https-required-configurations "Direct link to HTTPS Required configurations") ---------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Certificate** | (Root) certificate(s) file(s) to append to chain | String | | cert | \--cert | | **Key** | Private key for SSL | String | | key | \--key | HTTPS Optional configurations[​](#https-optional-configurations "Direct link to HTTPS Optional configurations") ---------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **Stream unavailable text** | Text or HTML to display when streams are unavailable. | String | | nostreamtext | \--nostreamtext | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 4433 | port | \--port | | **Public address** | Full public address this output is available as, if being proxied | inputlist | | pubaddr | \--public-address | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | | **Active players** | Which players are attempted and in what order. | ord\_multi\_sel | | wrappers | \--wrappers | * [Provides dependency HTTPS (HTTP+TLS) for MistServer](#provides-dependency-https-httptls-for-mistserver) * [HTTPS Required configurations](#https-required-configurations) * [HTTPS Optional configurations](#https-optional-configurations) --- # The MistServer Interface | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The MistServer browser interface[​](#the-mistserver-browser-interface "Direct link to The MistServer browser interface") ------------------------------------------------------------------------------------------------------------------------- The MistServer interface can be found under `http://host:4242` if you're attempting to access MistServer running locally `http://localhost:4242` can be used without the need for authentication. All configuration of MistServer is done through [API calls](/mistserver/integration/api/) . The controller contains a built-in web interface that translates these API calls to an user friendly configuration and monitoring interface. This section explains what the various panels in the web interface do and how to use them. In addition to this manual, the web interface also contains integrated hints and helper texts that explain all the various fields and options in full detail. Please refer to the integrated messages if they disagree with this manual, as those are generated by the software itself. [πŸ“„οΈ Login\ ---------\ \ Logging into the MistServer interface](/mistserver/configuration/interface/login) [πŸ“„οΈ Overview Panel\ ------------------\ \ Global server status & save current configurations](/mistserver/configuration/interface/overview) [πŸ“„οΈ General Panel\ -----------------\ \ General server settings, Session settings, custom variables and custom output creation.](/mistserver/configuration/interface/general) [πŸ“„οΈ Protocols Panel\ -------------------\ \ Setup available outputs and inputs](/mistserver/configuration/interface/protocols) [πŸ“„οΈ Streams Panel\ -----------------\ \ Setup Streams, preview and embed/use them.](/mistserver/configuration/interface/streams) [πŸ“„οΈ Push Panel\ --------------\ \ Push Streams to other locations and/or record them.](/mistserver/configuration/interface/push) [πŸ“„οΈ Triggers Panel\ ------------------\ \ Setup Triggers for custom Integration.](/mistserver/configuration/interface/triggers) [πŸ“„οΈ Logs Panel\ --------------\ \ MistServer logs](/mistserver/configuration/interface/logs) [πŸ“„οΈ Statistics Panel\ --------------------\ \ MistServer logs](/mistserver/configuration/interface/statistics) [πŸ“„οΈ Server Stats Panel\ ----------------------\ \ MistServer Statistics](/mistserver/configuration/interface/server_stats) * [The MistServer browser interface](#the-mistserver-browser-interface) --- # HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page HTTP ==== HTTP connection handler, provides all enabled HTTP-based outputs Provides dependency HTTP for MistServer[​](#provides-dependency-http-for-mistserver "Direct link to Provides dependency HTTP for MistServer") ---------------------------------------------------------------------------------------------------------------------------------------------- | Provides | Description | | --- | --- | | HTTP | HTTP connection handler, provides all enabled HTTP-based outputs | HTTP Optional configurations[​](#http-optional-configurations "Direct link to HTTP Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Certbot validation token** | Automatically set by the MistUtilCertbot authentication hook for certbot. Not intended to be set manually. | String | | certbot | \--certbot | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **Stream unavailable text** | Text or HTML to display when streams are unavailable. | String | | nostreamtext | \--nostreamtext | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 8080 | port | \--port | | **Public address** | Full public address this output is available as, if being proxied | inputlist | | pubaddr | \--public-address | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | | **Active players** | Which players are attempted and in what order. | ord\_multi\_sel | | wrappers | \--wrappers | * [Provides dependency HTTP for MistServer](#provides-dependency-http-for-mistserver) * [HTTP Optional configurations](#http-optional-configurations) --- # Utility: Static HTTP file server | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Utility: Static HTTP file server ================================ Serves static files over HTTP from a set folder Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Serves static files over HTTP from a set folder | HTTPMinimalServer Required configurations[​](#httpminimalserver-required-configurations "Direct link to HTTPMinimalServer Required configurations") ---------------------------------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Web root directory** | Main directory where files are served from. | String | Unset | webroot | \--webroot | HTTPMinimalServer Optional configurations[​](#httpminimalserver-optional-configurations "Direct link to HTTPMinimalServer Optional configurations") ---------------------------------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [HTTPMinimalServer Required configurations](#httpminimalserver-required-configurations) * [HTTPMinimalServer Optional configurations](#httpminimalserver-optional-configurations) --- # External writer | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The external writer allows you to build your own custom outputs using any of the [external writer compatible](/tags/external-writer) outputs. You will have to set a protocol handler, and if it matches MistServer will provide the requested stream output into the `commandline` through standard input. Any info will be printed to standard out and log messages go to standard error. | Option | Description | | --- | --- | | Human Readable Name | This is the name to later identify the external writer you made. | | Commandline | This is the command line (with optional arguments) that will be run as the writer. | | URI protocols handled | Which protocol handlers are used to identify when MistServer should use the commandline. | The external writer cannot overwrite the output handlers already available within MistServer. As an example adding `rtmp` as a handler will not trigger the external writer as MistServer already handles that through the RTMP output. You could however use `rtmp-new://` instead. Examples[​](#examples "Direct link to Examples") ------------------------------------------------- ### basic HTTP upload[​](#basic-http-upload "Direct link to basic HTTP upload") MistServer by itself does not support HTTP post. However you could simply add it by creating an external writer with the following command line: | Option | Description | | --- | --- | | Human Readable Name | http-put | | Command line | `curl -T -` | | URI protocols handled | `http` | This would allow you to write any [external writer compatible output](/tags/external-writer) as HTTP put when you try to push towards `http://server.com/file.ext`. ### S3 compatible upload[​](#s3-compatible-upload "Direct link to S3 compatible upload") Mistserver currently does not support S3, luckily our friends at Livepeer have created an external writer specifically for S3 storage upload. It is available [here](https://github.com/livepeer/catalyst-uploader/releases) . | Option | Descrption | | --- | --- | | Human Readable Name | S3 upload | | Command line | `/path/to/livepeer-catalyst-uploader` | | Uri protocols handled | `s3+http`, `s3` , `s3+https` | For more instructions on how to use it see the [README](https://github.com/livepeer/catalyst-uploader) available on github. To make the S3 usage easier we would recommend creating [custom variables](/mistserver/integration/custom_variables) containing the S3 account & bucket location. Example push towards S3 using the `livepeer-catalyst-uploader`: Source: streamnameTarget: s3+https://${s3acc}@${s3path}/$basename/$year_$month_$day_$hour_$minute_$seconds.ext * `${s3acc}` would be the `AWS_KEY:AWS_SECRET` * `${s3path}` would be the `s3address.com/bucket/` * Keep in mind that the `address` should be without any scheme (`http://` or `https://`) as the beginning portion of the push target already has the scheme. For possible push methods please look at our [pushing documentation](/howto/pushing/) . * [Examples](#examples) * [basic HTTP upload](#basic-http-upload) * [S3 compatible upload](#s3-compatible-upload) --- # MP3 over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page MP3 over HTTP ============= Pseudostreaming in MP3 format over HTTP Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in MP3 format over HTTP | Playing MP3 over HTTP from MistServer[​](#playing-mp3-over-http-from-mistserver "Direct link to Playing MP3 over HTTP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | MP3 progressive | html5/audio/mp3 | http(s)://`HOST`:`PORT`/`STREAMNAME`.mp3 | MP3 Optional configurations[​](#mp3-optional-configurations "Direct link to MP3 Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing MP3 over HTTP from MistServer](#playing-mp3-over-http-from-mistserver) * [MP3 Optional configurations](#mp3-optional-configurations) --- # DTSC input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page DTSC input ========== Load DTSC files as Video on Demand sources, or dtsc:// URLs from other instances for live sources. This is the optimal method to pull live sources from MistServer compatible instances. DTSC Core[​](#dtsc-core "Direct link to DTSC Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) DTSC url syntax[​](#dtsc-url-syntax "Direct link to DTSC url syntax") ---------------------------------------------------------------------- dtsc://host:port/streamname * `port`: if the default DTSC port 4200 is used it can be left out * `streamname`: if this is left out the stream name of this process will be attempted instead. tip If `streamname` is left empty in the dtsc url, wild card streams can be pulled using normal wild card syntax. This does require that the base stream name is the same on both servers. Wild card urls will only be pulled upon request, not automatically. Manual DTSC input creation[​](#manual-dtsc-input-creation "Direct link to Manual DTSC input creation") ------------------------------------------------------------------------------------------------------- MistInDTSC -s streamname dtsc://host:port/streamname This will manually create a stream with the stream name from the `-s streamname` parameter. Note that in some versions of MistServer you will need to try and watch this stream before it appears in your streams list. DTSC Support Matrix[​](#dtsc-support-matrix "Direct link to DTSC Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.dtsc`,
`dtsc://*`,
`dtsc:*` | | Audio Codecs | `AAC`,`MP3`,`vorbis` | | Video Codecs | `H264`,`H263`,`VP6`,`theora` | | Subtitle | None | | Metadata | None | | Passthrough | None | DTSC Optional configurations[​](#dtsc-optional-configurations "Direct link to DTSC Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Segment size (ms)** | Target time duration in milliseconds for segments. | Number (unsigned integer) | 1900 | segmentsize | \--segment-size | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`dtsc://*` | Boolean | false | always\_on | undefined | * [DTSC Core](#dtsc-core) * [DTSC url syntax](#dtsc-url-syntax) * [Manual DTSC input creation](#manual-dtsc-input-creation) * [DTSC Support Matrix](#dtsc-support-matrix) * [DTSC Optional configurations](#dtsc-optional-configurations) --- # Apple segmented over HTTP (HLS) | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Apple segmented over HTTP (HLS) =============================== Segmented streaming in Apple (TS-based) format over HTTP ( = HTTP Live Streaming) Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Segmented streaming in Apple (TS-based) format over HTTP ( = HTTP Live Streaming) | Playing Apple segmented over HTTP (HLS) from MistServer[​](#playing-apple-segmented-over-http-hls-from-mistserver "Direct link to Playing Apple segmented over HTTP (HLS) from MistServer") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | HLS (TS) | html5/application/vnd.apple.mpegurl | http(s)://`HOST`:`PORT`/hls/`STREAMNAME`/index.m3u8 | HLS Optional configurations[​](#hls-optional-configurations "Direct link to HLS Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Prepend path for chunks** | Chunks will be served from this path. | String | | chunkpath | \--chunkpath | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Live playlist limit** | Maximum number of parts in live playlists. (0 = infinite) | Number (unsigned integer) | 0 | listlimit | \--list-limit | | **Send whole segments** | Disables chunked transfer encoding, forcing per-segment buffering. Reduces performance significantly, but increases compatibility somewhat. | Flag | Unset | nonchunked | \--nonchunked | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing Apple segmented over HTTP (HLS) from MistServer](#playing-apple-segmented-over-http-hls-from-mistserver) * [HLS Optional configurations](#hls-optional-configurations) --- # First time set-up | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page First time set-up[​](#first-time-set-up "Direct link to First time set-up") ---------------------------------------------------------------------------- The first time you run MistServer it will need some initial setup. This can be either through the terminal or the first time you access the browser interface. If terminal output is available the terminal will always take priority over the browser interface. ### Terminal[​](#terminal "Direct link to Terminal") If running from an interactive terminal, an interactive first time set-up prompt will appear and walk you through this. You will get to make an account and decide whether the defaults for Protocols will be used. We recommend using the defaults the first time you try out MistServer. ### Browser Interface[​](#browser-interface "Direct link to Browser Interface") If not running from an interactive terminal, the first time set-up can instead be performed by pointing your browser at port 4242 of the host running MistServer. To connect with the interface use your browser of choice to connect to: `http://address:4242` where `address` is either the server host name or ip address. A web-based version of the first time set-up will then appear to perform the same task. * [First time set-up](#first-time-set-up) * [Terminal](#terminal) * [Browser Interface](#browser-interface) --- # Custom variables | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Custom variables are a method to create your own variables in MistServer. You can create both static and dynamic variables at the [general panel](/mistserver/configuration/interface/general) When do you use custom variables?[​](#when-do-you-use-custom-variables "Direct link to When do you use custom variables?") --------------------------------------------------------------------------------------------------------------------------- Custom variables are something you want to use when you find yourself either filling in a specific long value many times, or whenever you find yourself in need of brining a simple coding language into MistServer. [Static variables](#static-variables) replace a value with a static string, [dynamic variables](#dynamic-variables) run a script and adjust their value accordingly. Now something to keep in mind is that variables may contain variables, which do indeed work. So adding something like `$stream` into a variable would then again be parsed as a [variable](/mistserver/concepts/variable_substitution) and insert the stream name whenever the variable is used. Static variables[​](#static-variables "Direct link to Static variables") ------------------------------------------------------------------------- A static variable always replaces one variable for the same value. This could be an easy method to insert long strings like recording paths or account information. A static variable can just be a shorter way to write something down. For example instead of writing a whole path location like /path/to/media/folder/ you just shorten it to /$path/. You can also use it to store a password and avoid accidentally leaking it by visiting a configuration that would use it. ### Setting up a static variable[​](#setting-up-a-static-variable "Direct link to Setting up a static variable") There's 2 important settings for static variables: * `Variable name` Whenever MistServer encounters `$variablename` it will insert your string. * `Value` Whatever the variable should insert. This can be any `string`. #### Example[​](#example "Direct link to Example") A good example of using static variables is shortening local paths to easy and short variables. | Value | Description | | --- | --- | | Variable name | Path | | Value | `tmp/recording/myrecording/$basename/$yday` | ![picture of Static variable set up](/img/blogs/customvariables/staticvariable.png) Now the reason why we've set up the value to not have any `/` in front or at the end is to make it better usable. The first `/` is required to trigger local storage logic for recording and shouldn't be included in the variable. The last `/` is so I can easily see where the variable ended. This recording will automatically insert both the `$basename` and `$yday` variables when used as well. This makes my recording database somewhat easier to use as it's filtered on both the stream that it recorded as well as the day of the year. We can use it simply by starting a push with: `target`: `/$path/myrecording.mkv` ![picture of static variable during push](/img/blogs/customvariables/startrecording.png) Once the stream comes live you will see the following: ![picture of an active push using static variable](/img/blogs/customvariables/activepush.png) You will see any recording show both the pre-parsed target as well as the completely parsed target. This recording was done on 8th of November for the stream `live`. As you can see the `$path` variable has inserted: `tmp/recording/myrecording/live/312` Dynamic variables[​](#dynamic-variables "Direct link to Dynamic variables") ---------------------------------------------------------------------------- Dynamic variables are as simple or complex as you want them to be and will be periodically checked for their value. They change based on the script and values used. A dynamic variable can change depending on your own scripts, which grants you near unlimited freedom in setting things up. A very simple usage would be something simple as calling upon `date +%s` to get the current POSIX time. ### Setting up a dynamic variable[​](#setting-up-a-dynamic-variable "Direct link to Setting up a dynamic variable") There's 4 important settings for a dynamic variables: * `Variable name` Whenever MistServer encounters `$variablename` it will insert the value the last time it ran the `command`. * `Command` This is the script MistServer will run in order to generate a variable. * `Checking interval` This is the amount of time in seconds between attempts to run the `command`. * `Wait time` This is the amount of time in seconds the script is allowed to run before MistServer stops it and considers it timed-out. The value will be `null` in that case. #### Example of using a dynamic variable[​](#example-of-using-a-dynamic-variable "Direct link to Example of using a dynamic variable") A dynamic variable is extremely flexible in it's use, so please don't consider this example the only type of usage. For this example we'll do something very simple: Inserting the current UNIX time. | Value | Description | | --- | --- | | Variable name | Path | | Command | `date +%s` | | Checking interval | 1 | | Wait time | 2 | ![picture of setting up a dynamic variable](/img/blogs/customvariables/dynamicvariable.png) This will have MistServer run the command `date +%s` every second and insert the value of the command as the value of the variable `$now`. Once set up you can see the interface show the value upon page load. Note that this page does not update the dynamic values in real time. ![picture of the custom variables set up](/img/blogs/customvariables/customvariables.png) We could now in turn use this variable to either insert the current UNIX time into recordings, or even use it to schedule a recording with. Another usage would be to check a database and verify if a user has set a value to on and if so have it record when they go live. #### Dynamic variables warning[​](#dynamic-variables-warning "Direct link to Dynamic variables warning") MistServer will blindly run whatever command is given with the permissions of MistServer. So setting up a dynamic variable will have MistServer periodically run a command no matter what this command is. Whether this is a warning to block the usage or as a suggestion to get creative is up to you. * [When do you use custom variables?](#when-do-you-use-custom-variables) * [Static variables](#static-variables) * [Setting up a static variable](#setting-up-a-static-variable) * [Dynamic variables](#dynamic-variables) * [Setting up a dynamic variable](#setting-up-a-dynamic-variable) --- # MP4 over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page MP4 over HTTP ============= Pseudostreaming in MP4 format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.fmp4` `/*.mp4` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in MP4 format over HTTP | Playing MP4 over HTTP from MistServer[​](#playing-mp4-over-http-from-mistserver "Direct link to Playing MP4 over HTTP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | MP4 progressive | html5/video/mp4 | http(s)://`HOST`:`PORT`/`STREAMNAME`.mp4 | | MP4 WebSocket | ws/video/mp4 | ws(s)://`HOST`:`PORT`/`STREAMNAME`.mp4 | MP4 Optional configurations[​](#mp4-optional-configurations "Direct link to MP4 Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing MP4 over HTTP from MistServer](#playing-mp4-over-http-from-mistserver) * [MP4 Optional configurations](#mp4-optional-configurations) --- # TS over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TS over HTTP ============ Pseudostreaming in MPEG2/TS format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.ts` `ts-exec:*` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in MPEG2/TS format over HTTP | Playing TS over HTTP from MistServer[​](#playing-ts-over-http-from-mistserver "Direct link to Playing TS over HTTP from MistServer") ------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | TS HTTP progressive | html5/video/mpeg | http(s)://`HOST`:`PORT`/`STREAMNAME`.ts | HTTPTS Optional configurations[​](#httpts-optional-configurations "Direct link to HTTPTS Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | HTTPTS Push parameters[​](#httpts-push-parameters "Direct link to HTTPTS Push parameters") ------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing TS over HTTP from MistServer](#playing-ts-over-http-from-mistserver) * [HTTPTS Optional configurations](#httpts-optional-configurations) * [HTTPTS Push parameters](#httpts-push-parameters) --- # JSON lines over raw TCP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page JSON lines over raw TCP ======================= Real time JSON line-by-line input over a raw TCP socket or standard input JSONLine Required configurations[​](#jsonline-required-configurations "Direct link to JSONLine Required configurations") ------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Stream** | What streamname to serve. For multiple streams, add this protocol multiple times using different ports. | String | Unset | streamname | \--stream | JSONLine Optional configurations[​](#jsonline-optional-configurations "Direct link to JSONLine Optional configurations") ------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Codec** | What codec to ingest as | String | JSON | codec | \--codec | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 3456 | port | \--port | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [JSONLine Required configurations](#jsonline-required-configurations) * [JSONLine Optional configurations](#jsonline-optional-configurations) --- # Websocket API | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) For receiving near-realtime information about the server, some API calls have a WebSocket equivalent that pushes updates as they happen. This data can all be received through a single 'API WebSocket'. The WebSocket can be accessed through the URL "`ws://server-host:4242/ws`" (or on another port if the API port was changed from the default of 4242). Requesting data works through GET parameters. Authentication for the WebSocket API **must** be done through the HTTP Authenticate header. Adding the "`?logs=AMOUNT`" GET parameter will send log messages in real time, starting with AMOUNT lines of log history. Alternatively to an amount, the value '`since:UNIXTIMESTAMP`' may be used, which starts at the specified Unix time stamp. Adding the "`?accs=AMOUNT`" GET parameter will send access log messages in real time, starting with AMOUNT lines of access log history. Alternatively to an amount, the value '`since:UNIXTIMESTAMP`' may be used, which starts at the specified Unix time stamp. Adding the "`?streams=1`" GET parameter (the value is ignored, as long as it is non-empty) will send stream activity information in real time. Data sent through the WebSocket is always in the form of JSON arrays. The first element of each array indicates the type of data ('log', 'access' or 'stream'). For logs, the format is: ["log", [UNIX_TIMESTAMP, "message level", "message", "streamname"]] For access logs, the format is: ["access", [UNIX_TIMESTAMP, "session identifier", "stream name", "connector name", "hostname", SECONDS_ACTIVE, BYTES_UP_TOTAL, BYTES_DOWN_TOTAL, "tags"]] For streams, the format is: ["stream", ["stream name", STATUS, CURRENT_VIEWERS, CURRENT_INPUTS, CURRENT_OUTPUTS]] //Where STATUS 0=offline, 1=init, 2=boot, 3=wait, 4=ready, 5=shutdown, 6=invalid --- # Debug Levels | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Debug levels are included in all MistServer binaries. They determine the level of logging that is available while operating. The levels are: | Level | Logging | | --- | --- | | 0 | All debugging messages disabled | | 1 | Messages about failed operations | | 2 | Previous level, and error messages | | 3 | Previous level, and warning messages | | 4 | Previous level, and status messages for development | | 5 | Previous level, and more status messages for development | | 6 | Previous level, and verbose debugging messages | | 7 | Previous level, and very verbose debugging messages | | 8 | Report everything in extreme detail | | 9 | Report everything in insane detail | | 10 | All messages enabled | Recommended debug level[​](#recommended-debug-level "Direct link to Recommended debug level") ---------------------------------------------------------------------------------------------- We recommend normal operations on debug level 3 or lower. All of our builds that you can download from our website will default to level 3. If you compile MistServer yourself the debug level defaults to level 4. * [Recommended debug level](#recommended-debug-level) --- # Flash progressive over HTTP (FLV) | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Flash progressive over HTTP (FLV) ================================= Pseudostreaming in Adobe Flash FLV format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.flv` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in Adobe Flash FLV format over HTTP | Playing Flash progressive over HTTP (FLV) from MistServer[​](#playing-flash-progressive-over-http-flv-from-mistserver "Direct link to Playing Flash progressive over HTTP (FLV) from MistServer") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | FLV progressive | flash/7 | http(s)://`HOST`:`PORT`/`STREAMNAME`.flv | FLV Optional configurations[​](#flv-optional-configurations "Direct link to FLV Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | FLV Push parameters[​](#flv-push-parameters "Direct link to FLV Push parameters") ---------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing Flash progressive over HTTP (FLV) from MistServer](#playing-flash-progressive-over-http-flv-from-mistserver) * [FLV Optional configurations](#flv-optional-configurations) * [FLV Push parameters](#flv-push-parameters) --- # JSON over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page JSON over HTTP ============== Pseudostreaming in JSON format over HTTP Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in JSON format over HTTP | Playing JSON over HTTP from MistServer[​](#playing-json-over-http-from-mistserver "Direct link to Playing JSON over HTTP from MistServer") ------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | JSON progressive | html5/text/javascript | http(s)://`HOST`:`PORT`/`STREAMNAME`.json | | JSON WebSocket | html5/text/javascript | ws(s)://`HOST`:`PORT`/`STREAMNAME`.json | JSON Optional configurations[​](#json-optional-configurations "Direct link to JSON Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing JSON over HTTP from MistServer](#playing-json-over-http-from-mistserver) * [JSON Optional configurations](#json-optional-configurations) --- # OGG over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page OGG over HTTP ============= Pseudostreaming in OGG format over HTTP Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in OGG format over HTTP | Playing OGG over HTTP from MistServer[​](#playing-ogg-over-http-from-mistserver "Direct link to Playing OGG over HTTP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | OGG progressive | html5/video/ogg | http(s)://`HOST`:`PORT`/`STREAMNAME`.ogg | OGG Optional configurations[​](#ogg-optional-configurations "Direct link to OGG Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing OGG over HTTP from MistServer](#playing-ogg-over-http-from-mistserver) * [OGG Optional configurations](#ogg-optional-configurations) --- # AAC input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page AAC input ========= Allows loading AAC files AAC Core[​](#aac-core "Direct link to AAC Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) AAC Support Matrix[​](#aac-support-matrix "Direct link to AAC Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.aac`,
`aac:*` | | Audio Codecs | `AAC` | | Video Codecs | None | | Subtitle | None | | Metadata | None | | Passthrough | None | AAC Optional configurations[​](#aac-optional-configurations "Direct link to AAC Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [AAC Core](#aac-core) * [AAC Support Matrix](#aac-support-matrix) * [AAC Optional configurations](#aac-optional-configurations) --- # Balancer input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Balancer input ============== The load balancer input restarts itself as the input a load balancer tells it it should be. The syntax is in the form 'balance:[http://HOST:PORT\[?fallback=FALLBACK](http://HOST:PORT%5B?fallback=FALLBACK)\ \]', where HOST and PORT are the host and port of the load balancer and the FALLBACK is the full source URL that should be used if the load balancer cannot be reached. Balancer Core[​](#balancer-core "Direct link to Balancer Core") ---------------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) Balancer Support Matrix[​](#balancer-support-matrix "Direct link to Balancer Support Matrix") ---------------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `balance:*`,
`balancer:*` | Balancer Optional configurations[​](#balancer-optional-configurations "Direct link to Balancer Optional configurations") ------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **Cut time (ms)** | Any timestamps before this will be cut from the live buffer. | Number (unsigned integer) | 0 | cut | \--cut | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Resume support** | If enabled, the buffer will linger after source disconnect to allow resuming the stream later. If disabled, the buffer will instantly close on source disconnect. | 0Β =Β Disabled
1Β =Β Enabled | 0 | resume | \--resume | | **Segment size (ms)** | Target time duration in milliseconds for segments. | Number (unsigned integer) | 5000 | segmentsize | \--segment-size | * [Balancer Core](#balancer-core) * [Balancer Support Matrix](#balancer-support-matrix) * [Balancer Optional configurations](#balancer-optional-configurations) --- # Executable input for streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Exec-based inputs[​](#exec-based-inputs "Direct link to Exec-based inputs") ---------------------------------------------------------------------------- These inputs allow you to consume data piped from another application, without any additional protocol delay or overhead. They take the form of `FORMAT-exec:COMMAND`, where `FORMAT` is the stream format it expects to read and `COMMAND` is a shell command that MistServer will execute to request live stream data in the given format. For example, the source `h264-exec:video_generator` will look for the executable or script `video_generator` in the system path, execute it, and expects raw Annex B H.264 data to be output by said executable or script. MistServer will automatically (re)start, stop and monitor the provided command as needed, taking the value of the "Always on" setting into account. Do note that the `COMMAND` does not support any form of shell escaping or interpreting, so it is impossible to provide arguments or executables which contain spaces. To use these, please create a shell script that call your intended command in the intended way, and have MistServer call the script. This limitation is the result of a full shell parser being outside the scope of the MistServer project and a simple workaround being readily available. ### mkv-exec input[​](#mkv-exec-input "Direct link to mkv-exec input") Matroska format is supported over this method through: ts-exec:COMMAND ### ts-exec input[​](#ts-exec-input "Direct link to ts-exec input") MistServer also accept TS data through this method: ts-exec:COMMAND ### h264-exec input[​](#h264-exec-input "Direct link to h264-exec input") Raw annex B H.264 data can be used through: h264-exec:COMMAND * [Exec-based inputs](#exec-based-inputs) * [mkv-exec input](#mkv-exec-input) * [ts-exec input](#ts-exec-input) * [h264-exec input](#h264-exec-input) --- # Config File | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The MistServer configuration file[​](#the-mistserver-configuration-file "Direct link to The MistServer configuration file") ---------------------------------------------------------------------------------------------------------------------------- By default MistServer stores the configuration in the same folder as the MistController as `config.json` or if ran as a service in `/etc/mistserver.conf`. You can also determine your own location by setting the boot flag `--config /path/to/file` when booting MistController. The MistServer configuration file is a JSON blob containing all the settings. Under its defaults MistServer will save the configuration 1 minute after the last configuration change and will reload if it detects changes to the configuration itself. Instead of making [API calls](/mistserver/integration/api/) to MistServer one could opt to just change the configuration file directly using the same JSON format. Migrating settings to another server[​](#migrating-settings-to-another-server "Direct link to Migrating settings to another server") ------------------------------------------------------------------------------------------------------------------------------------- Using a pre-configured configuration file to immidiately load in settings in a fresh MistServer is a common occurance when scaling up. All you need to do is copy over the configuration file and you are done. It doesn't matter whether MistServer was already active. * [The MistServer configuration file](#the-mistserver-configuration-file) * [Migrating settings to another server](#migrating-settings-to-another-server) --- # EBML input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page EBML input ========== Allows loading MKV, MKA, MK3D, MKS and WebM files for Video on Demand, or accepts live streams in those formats over standard input. EBML Core[​](#ebml-core "Direct link to EBML Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) EBML Support Matrix[​](#ebml-support-matrix "Direct link to EBML Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.mkv`,
`/*.mka`,
`/*.mk3d`,
`/*.mks`,
`/*.webm`,
`http://*.mkv`,
`http://*.mka`,
`http://*.mk3d`,
`http://*.mks`,
`http://*.webm`,
`https://*.mkv`,
`https://*.mka`,
`https://*.mk3d`,
`https://*.mks`,
`https://*.webm`,
`s3+http://*.mkv`,
`s3+http://*.mka`,
`s3+http://*.mk3d`,
`s3+http://*.mks`,
`s3+http://*.webm`,
`s3+https://*.mkv`,
`s3+https://*.mka`,
`s3+https://*.mk3d`,
`s3+https://*.mks`,
`s3+https://*.webm`,
`mkv-exec:*`,
`ebml:*` | | Audio Codecs | `opus`,`vorbis`,`AAC`,`PCM`,`ALAW`,`ULAW`,`MP2`,`MP3`,`AC3`,`FLOAT`,`DTS`,`FLAC` | | Video Codecs | `H264`,`HEVC`,`VP8`,`VP9`,`AV1`,`theora`,`MPEG2` | | Subtitle | `subtitle` | | Metadata | `JSON` | | Passthrough | None | EBML Optional configurations[​](#ebml-optional-configurations "Direct link to EBML Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`mkv-exec:*` | Boolean | false | always\_on | undefined | * [EBML Core](#ebml-core) * [EBML Support Matrix](#ebml-support-matrix) * [EBML Optional configurations](#ebml-optional-configurations) --- # File input for streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page File input[​](#file-input "Direct link to File input") ------------------------------------------------------- File input can be used to make previously stored media available in MistServer. All you need is access to the file and have write access in the folder it is stored as an DTSH file will be created for fast transmuxing, this can delay the very first playback. You can either use the "browse" button or configure the source as: **Linux/MacOS** `/path/file` **Windows** `/cygdrive/driveletter/path/file` Some examples: * `/home/mypc/videos/video1.mp4` for Linux/MacOS: will access the file named "video1.mp4" in the folder /home/mypc/videos. * `/cygdrive/D/videos/video1.mp4` for Windows: will access the file named "video1.mp4" in the folder "videos" on your D drive. Unsupported file names will be accepted but are unavailable for playback. If a file isn't working while it should be supported please check the "protocol panel" if the protocol is enabled and keep an eye on MistServer's logs for possible error messages. For a list of file inputs look here: [file inputs](/tags/file-input) ### Folder support[​](#folder-support "Direct link to Folder support") Folder support lets you use the stream wildcard feature to serve all the files in a given folder. To use this, simply configure a stream with as source the full absolute path to the folder, ending in a forward slash. All files in the given folder will then become available under the stream name `streamname+filename`. For example, the file `/storage/random.mp4` would be available as the stream name `vod+random.mp4` if the stream `vod` is configured with source `/storage/`. Subfolders are not supported and must be configured as additional streams. This is a security consideration. For dynamic adding/removing of Video on Demand streams in a more complex folder structure, please refer to the section on triggers in this manual. * [File input](#file-input) * [Folder support](#folder-support) --- # Local-only UDP API | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Local-only UDP API[​](#local-only-udp-api "Direct link to Local-only UDP API") ------------------------------------------------------------------------------- In addition to the above HTTP-based API, it is also possible to access the API from the local machine on UDP port 4242 on the "localhost" address. Whether that is IPv4 or IPv6 localhost is dependent on your operating system default address family, so preferably connect to the hostname "localhost" verbatim to prevent issues. All regular API requests are supported, and must be sent to port 4242 over UDP. The payload is the raw JSON object with the request(s). This API endpoint will reply with a UDP packet to the same address and port it received requests from, containing a JSON object with the response. The minimal flag is set automatically for UDP API requests. This endpoint is particularly useful when combined with the [api\_endpoint](/mistserver/integration/api/calls/api_endpoint) API call. * [Local-only UDP API](#local-only-udp-api) --- # Buffer input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Buffer input ============ This input type is both used for push- and pull-based streams. It provides a buffer for live media data. The push://\[host\]\[@password\] style source allows all enabled protocols that support push input to accept a push into MistServer, where you can accept incoming streams from everyone, based on a set password, and/or use hostname/IP whitelisting. Buffer Core[​](#buffer-core "Direct link to Buffer Core") ---------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) Buffer Support Matrix[​](#buffer-support-matrix "Direct link to Buffer Support Matrix") ---------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `push://*`,
`buffer:*` | Buffer Optional configurations[​](#buffer-optional-configurations "Direct link to Buffer Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **Cut time (ms)** | Any timestamps before this will be cut from the live buffer. | Number (unsigned integer) | 0 | cut | \--cut | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Fallback stream** | Alternative stream to load for playback when there is no active broadcast | String | | fallback\_stream | undefined | | **Maximum live keep-away distance** | Maximum distance in milliseconds to fall behind the live point for stable playback. | Number (unsigned integer) | 45000 | maxkeepaway | \--resume | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Resume support** | If enabled, the buffer will linger after source disconnect to allow resuming the stream later. If disabled, the buffer will instantly close on source disconnect. | 0Β =Β Disabled
1Β =Β Enabled | 0 | resume | \--resume | | **Segment size (ms)** | Target time duration in milliseconds for segments. | Number (unsigned integer) | 1900 | segmentsize | \--segment-size | * [Buffer Core](#buffer-core) * [Buffer Support Matrix](#buffer-support-matrix) * [Buffer Optional configurations](#buffer-optional-configurations) --- # Fallback streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Fallback streams and default streams[​](#fallback-streams-and-default-streams "Direct link to Fallback streams and default streams") ------------------------------------------------------------------------------------------------------------------------------------- Some [inputs](/mistserver/inputs/) allow configuring a fallback stream (this is always possible through the API by setting the "`fallback_stream`" property for a stream's configuration), and a global "`defaultStream`" within the [general panel](/mistserver/configuration/interface/general) setting exists as well. When, for any reason (including a stream not being configured at all, or a stream being a currently offline live stream), an output is unable to connect to the input for a given stream, this mechanism is activated. First, the fallback stream configuration is used. If this setting is set, the stream will be re-routed to the given stream name internally, and all configuration is applied recursively. This means a fallback stream may itself have another fallback stream, and so further. There is no check for infinite recursion in fallback streams, so care must be taken to never introduce a 'loop' of fallback streams. If no fallback stream is configured, the default stream is attempted instead. This is a global setting, but may be overridden by by the "" trigger for more control. Default streams are safer to use as they **do** check for loops (defaulting to the current stream will not apply) and will only recurse once at most. Both default streams and fallback streams will apply on the new stream name before using it. DEFAULT\_STREAM trigger[​](#default_stream-trigger "Direct link to DEFAULT_STREAM trigger") -------------------------------------------------------------------------------------------- There is also a trigger that allows for a far more flexible configuration when it comes to fallbacks. The [DEFAULT\_STREAM trigger](/mistserver/integration/triggers/list/DEFAULT_STREAM) allows you redirect viewers on both unavailable and non-existing streams using your own scripts. Using this trigger will allow you to change the stream to redirect towards and also implement your own viewer tokenization. * [Fallback streams and default streams](#fallback-streams-and-default-streams) * [DEFAULT\_STREAM trigger](#default_stream-trigger) --- # Authentication | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Authentication ============== Localhost[​](#localhost "Direct link to Localhost") ---------------------------------------------------- If the API is accessed from the same machine that is running MistServer there is no need to authenticate. Any form of authentication or login is unnecessary both in API or interface. Authentication from other devices[​](#authentication-from-other-devices "Direct link to Authentication from other devices") ---------------------------------------------------------------------------------------------------------------------------- When connecting to MistServer from a different machine, you will need to authenticate each connection to the controller at least once. If the connection to the controller is not broken, repeating the authentication procedure is not mandatory, but allowed at any time. If the server requires authentication, its response will contain an "`authorize`" member, itself containing a "`status`" member with any other string than "`OK`". For example: { "authorize":{ "status": "CHALL", "challenge": "1234567890abcdef" }} When the status is anything other than "`OK`", MistServer will only respond to authorization API calls and nothing else. Authenticating is done by sending a request of the form: { "authorize": { //Username to login as "username": "test", //Hash of password to login with. Send empty value when no challenge for the hash is known yet. //When the challenge is known, the value to be used here can be calculated as follows: // MD5( MD5("secret") + challenge) //Where "secret" is the plaintext password. "password": "" }} MistServer will always provide an authentication response, regardless of whether one was sent or not. The response of of the form: { "authorize": { //current login status. Either "OK", "CHALL", "NOACC" or "ACC_MADE". "status": "CHALL", //Random value to be used in hashing the password. It contains the challenge parameter to be used above. "challenge": "abcdef1234567890" }} The challenge string is only sent for the status "`CHALL`". A status of "`OK`" means you are currently logged in and have access to all other API requests. A status of "`CHALL`" means you are not logged in, and a challenge has been provided to login with. A status of "`NOACC`" means there are no valid accounts to login with. In this case --- and _only_ in this case --- it is possible to create a initial login through the API itself. To do so, send a request as follows: { "authorize": { //username to create, as plain text "new_username": "test", //password to set, as plain text "new_password": "secret" }} Please note that creating accounts like this is **not secure at all. Never use this mechanism over a public network!** A status of "`ACC_MADE`" indicates the account was created successfully and can now be used to login as normal. HTTP header authentication[​](#http-header-authentication "Direct link to HTTP header authentication") ------------------------------------------------------------------------------------------------------- Alternatively to the regular in-band authentication, it is also possible to use HTTP header authentication. To use this method, make a request with a "`Authorization: json {}`" header present. The '`{}`' part should be a JSON object containing what is normally inside the '`authorize`' object. As a response, the server will send back a "`WWW-Authenticate: json {}`" header, where again the '`{}`' part contains a JSON object with what is normally inside the '`authorize`' object. This method of authentication is the only method supported when using the [Websocket API](/mistserver/integration/websocket_api) . * [Localhost](#localhost) * [Authentication from other devices](#authentication-from-other-devices) * [HTTP header authentication](#http-header-authentication) --- # RTSP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page RTSP ==== Real Time Streaming in RTSP, over both RTP UDP and TCP Pushing RTSP into MistServer[​](#pushing-rtsp-into-mistserver "Direct link to Pushing RTSP into MistServer") ------------------------------------------------------------------------------------------------------------- | Method | URL | | --- | --- | | RTSP | rtsp://`HOST`:`PORT`/`STREAMNAME`?pass=`PASSWORD` | Playing RTSP from MistServer[​](#playing-rtsp-from-mistserver "Direct link to Playing RTSP from MistServer") ------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | RTSP | rtsp | rtsp://`HOST`:`PORT`/`STREAMNAME` | RTSP Optional configurations[​](#rtsp-optional-configurations "Direct link to RTSP Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Ignore sending port #** | Ignore the sending port number of incoming data | Flag | false | ignsendport | \--ignore-sending-port | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **Max RTP packet size** | Maximum size of RTP packets in bytes | Number (unsigned integer) | 1472 | maxsend | \--max-packet-size | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 5554 | port | \--port | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Pushing RTSP into MistServer](#pushing-rtsp-into-mistserver) * [Playing RTSP from MistServer](#playing-rtsp-from-mistserver) * [RTSP Optional configurations](#rtsp-optional-configurations) --- # RTMP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page RTMP ==== Real time streaming over Adobe RTMP Pushing RTMP into MistServer[​](#pushing-rtmp-into-mistserver "Direct link to Pushing RTMP into MistServer") ------------------------------------------------------------------------------------------------------------- | Method | URL | | --- | --- | | RTMP | rtmp://`HOST`:`PORT`/`PASSWORD`/`STREAMNAME` | Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `rtmp://*` `rtmps://*` Playing RTMP from MistServer[​](#playing-rtmp-from-mistserver "Direct link to Playing RTMP from MistServer") ------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | RTMP | flash/10 | rtmp://`HOST`:`PORT`/play/`STREAMNAME` | RTMP Optional configurations[​](#rtmp-optional-configurations "Direct link to RTMP Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Acceptable connection types** | Whether to allow only incoming pushes (2), only outgoing pulls (1), or both (0, default) | 0Β =Β Allow both incoming and outgoing connections
1Β =Β Allow only outgoing connections
2Β =Β Allow only incoming connections | 0 | acceptable | \--acceptable | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **Max. kbps** | Maximum bitrate to allow in the ingest direction, in kilobits per second. | Number (unsigned integer) | 0 | maxkbps | \--maxkbps | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 1935 | port | \--port | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | RTMP Push parameters[​](#rtmp-push-parameters "Direct link to RTMP Push parameters") ------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing RTMP into MistServer](#pushing-rtmp-into-mistserver) * [Pushing/Recording](#pushingrecording) * [Playing RTMP from MistServer](#playing-rtmp-from-mistserver) * [RTMP Optional configurations](#rtmp-optional-configurations) * [RTMP Push parameters](#rtmp-push-parameters) --- # Commandline parameters | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Commandline parameters[​](#commandline-parameters "Direct link to Commandline parameters") ------------------------------------------------------------------------------------------- Commandline parameters allow you to change defaults for MistServer such as which port should be used for the API and interface, but also setting up the default log level and specific log locations. In general all options that can only be set up when booting MistServer go here. Environment variables[​](#environment-variables "Direct link to Environment variables") ---------------------------------------------------------------------------------------- These are variables that impact the inner workings of MistServer and can be set to specify certain behaviours. For example disabling "angel processes" who handle crash recovery for processes. ### List of Environment variables[​](#list-of-environment-variables "Direct link to List of Environment variables") | Variable | Information | | --- | --- | | `ATHEIST` | Do not spawn angel processes if this environment variable exists. | | `NOFORK` | equivalent to `ATHEIST`, but only works for MistInβ€” processes (still works for backward compatibility reasons) | | `MIST_CONTROL` | Set by the controller to indicate that the logs are being handled by the parent process. All non-controller processes obey this variable and will spawn a log parser process if unset. | | `MIST_COLOR` | If set forces color to be enabled in log output (enabled by default if standard output is a terminal, disabled otherwise). | | `MIST_LOG_SYSTEMD` | If set log output is in systemd compatible format. | | `MIST_COLOR_STREAM` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for stream names in logs, defaults to `CSI 2m` | | `MIST_COLOR_TIME` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for date in logs, defaults to `CSI 0;1;37m` | | `MIST_COLOR_CONF` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for log lines in the `CONF` category, defaults to `CSI 0;1;37m` | | `MIST_COLOR_FAIL` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for log lines in the `FAIL` category, defaults to `CSI 0;1;31m` | | `MIST_COLOR_ERROR` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for log lines in the `ERROR` category, defaults to `CSI 0;31m` | | `MIST_COLOR_WARN` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for log lines in the `WARN` category, defaults to `CSI 0;1;33m` | | `MIST_COLOR_INFO` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for log lines in the `INFO` category, defaults to `CSI 0;36m` | | `MIST_COLOR_END` | Sets the [color code](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
for ending a log line, resetting the color for the next line, defaults to `CSI 0m` | | `TMP`, `TEMP`, `TMPDIR` | These are checked in order, the first that is set will be used as temporary directory for MistServer. | | `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` | These can be set to S3 credentials and will be used if no credentials are provided in the URL itself. | | `http_proxy` | Proxy server used for outgoing HTTP requests | List of commandline options[​](#list-of-commandline-options "Direct link to List of commandline options") ---------------------------------------------------------------------------------------------------------- | Commandline option | Information | | --- | --- | | `--accesslog`, `-A` | (string) Where to write the access log. If set to 'LOG' (the default), writes to wherever the log is written to. If empty, access logging is turned off. Otherwise, writes to the given filename. | | `--account`, `-a` | (string) A username:password string to create a new account or overwrite an existing one. | | `--config`, `-c` | (string) Specify a config file other than default. | | `--configrw`, `-C` | (string) If 'r', read config changes from disk. If 'w', writes them to disk after 60 seconds of no changes. If 'rw', does both (default). In all other cases does neither. | | `--debug`, `-g` | (integer) The debug level at which messages need to be printed, 0-10. | | `--help`, `-h` | Display usage and version information, then exit. | | `--interface`, `-i` | (string) Interface address to listen on, or 0.0.0.0 for all available interfaces. | | `--logfile`, `-L` | (string) Redirect all standard output to a log file, provided with an argument. | | `--port`, `-p` | (integer) TCP port to listen on. | | `--prometheus`, `-S` | (string) If set, allows collecting of Prometheus-style stats on the given path over the API port. | | `--update`, `-D` | Check for and install updates before starting. | | `--uplink`, `-U` | Depricated option: (string) MistSteward uplink host and port. | | `--uplink-name`, `-N` | Depricated option: (string) MistSteward uplink username. | | `--uplink-pass`, `-P` | Depricated option: (string) MistSteward uplink password. | | `--username`, `-u` | (string) Username to transfer privileges to, default is root. | | `--version`, `-v` | Display library and application version, then exit. | * [Commandline parameters](#commandline-parameters) * [Environment variables](#environment-variables) * [List of Environment variables](#list-of-environment-variables) * [List of commandline options](#list-of-commandline-options) --- # JSON format stream information | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### JSON format stream information[​](#json-format-stream-information "Direct link to JSON format stream information") To retrieve this format, request the URL `/json_STREAMNAME.js` from the HTTP output (by default port 8080). The returned data will have an `application/json` mime type and contain a JSON object in the following format: { "type": "vod", //vod or live, depending on stream "width": 480, //Suggested display width "height": 360, //Suggested display height "redirected": ["from", "to"], //If fallback or default stream was applied, the original and final stream names used internally "meta": { //Summary of the stream's internal metadata "tracks": { //full listing of all media tracks in the stream "audio_AAC_2ch_22050hz_2": { //unique per-track identifier - do not depend on the formatting of this identifier, may change in the future "trackid": 2, //unique track ID within the stream "type": "audio", //type of track: audio, video, etc. "codec": "AAC", //codec used for this media track "firstms": 0, //first timestamp present in track, in milliseconds "lastms": 219985, //last timestamp present in track, in milliseconds "bps": 642, //average bytes per second for this track "init": "\u0013\u0088", //codec private data, as raw binary string //The following are only present in audio type tracks "channels": 2, //channel count "rate": 22050, //sampling rate in Hz "size": 16, //sample size in bits //The following are only present in video type tracks "fpks": 30000, //frames per kilo-second - e.g. 30000 = 30.00 FPS "height": 360, //native height of the video "width": 480 //native width of the video }, //All tracks in the stream will be represented }, "vod": 1 //only present if the file is a VoD asset "live": 1 //only present if the file is a live asset }, "source": [//listing of possible playback methods { "priority": 9, //quality of the playback method. Higher is better. "relurl": "/hls/test/index.m3u8", //relative URL to the media data "simul_tracks": 2, //amount of simultaneously playable tracks through this method "total_matches": 2, //total count of playable tracks through this method "type": "html5/application/vnd.apple.mpegurl", //type of playback method, see explanation below "url": "http://localhost:8080/hls/test/index.m3u8" //absolute URL to the media data }, //Each configured method applicable to this stream will be present, //ordered by simul_tracks, then total_matches, then priority. ]} This format is particularly suited to XHR requests. The `type` as used in the `source` array contains a proprietary typing of each playback method. The general format is `maintype/details`, and the only standardized form is the HTML5 variant as shown above. In this type, the main type is `html5` and the details are the HTML5-compatible mime type. * [JSON format stream information](#json-format-stream-information) --- # WebSocket format stream information | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### WebSocket stream information[​](#websocket-stream-information "Direct link to WebSocket stream information") Connecting to either the javascript or JSON format stream information URLs with a WebSocket will enable WebSocket mode stream information. This mode behaves a bit differently: instead of a single response, the socket is kept open and receives an update whenever the stream status changes. If the stream is online/active, the received data is identical to the JSON format. If the stream is in any other state, the received data is an object containing an "error" member variable, which has a value with a human-readable stream status. In the Pro version, the "on\_error" value can also be set to a configurable value. The WebSocket will persist through stream stops/starts and keep sending updates until either it is closed or the entire server shuts down. * [WebSocket stream information](#websocket-stream-information) --- # HTML format stream information | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### HTML stream embedding[​](#html-stream-embedding "Direct link to HTML stream embedding") To retrieve this format, request the URL `/STREAMNAME.html` from the HTTP output (by default port 8080). This will produce either a simple HTML page containing nothing more than a generated embed script with no-script fallback, or redirect the browser directly to a suitable stream URL if user-agent sniffing determines that in-browser display is sub-optimal for the device used. This link is suitable for direct linking from places that do not allow scripting (such as forums, e-mail, etcetera), and is the most widely compatible method to play back a stream on any device. * [HTML stream embedding](#html-stream-embedding) --- # RTP streams using SDP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page RTP streams using SDP ===================== Make streams available as a RTP stream, using the SDP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.sdp` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Make streams available as a RTP stream, using the SDP | Playing RTP streams using SDP from MistServer[​](#playing-rtp-streams-using-sdp-from-mistserver "Direct link to Playing RTP streams using SDP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | undefined | html5/application/sdp | http(s)://`HOST`:`PORT`/`STREAMNAME`.sdp | SDP Optional configurations[​](#sdp-optional-configurations "Direct link to SDP Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | SDP Push parameters[​](#sdp-push-parameters "Direct link to SDP Push parameters") ---------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing RTP streams using SDP from MistServer](#playing-rtp-streams-using-sdp-from-mistserver) * [SDP Optional configurations](#sdp-optional-configurations) * [SDP Push parameters](#sdp-push-parameters) --- # Development tool: Sanity checker | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Development tool: Sanity checker ================================ Does sanity check on a stream SanityCheck Optional configurations[​](#sanitycheck-optional-configurations "Direct link to SanityCheck Optional configurations") ---------------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [SanityCheck Optional configurations](#sanitycheck-optional-configurations) --- # SubRip (SRT/WebVTT) over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page SubRip (SRT/WebVTT) over HTTP ============================= Pseudostreaming in SubRip Text (SRT) and WebVTT formats over HTTP Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in SubRip Text (SRT) and WebVTT formats over HTTP | Playing SubRip (SRT/WebVTT) over HTTP from MistServer[​](#playing-subrip-srtwebvtt-over-http-from-mistserver "Direct link to Playing SubRip (SRT/WebVTT) over HTTP from MistServer") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | SRT subtitle progressive | html5/text/plain | http(s)://`HOST`:`PORT`/`STREAMNAME`.srt | | WebVTT subtitle progressive | html5/text/vtt | http(s)://`HOST`:`PORT`/`STREAMNAME`.webvtt | SubRip Optional configurations[​](#subrip-optional-configurations "Direct link to SubRip Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing SubRip (SRT/WebVTT) over HTTP from MistServer](#playing-subrip-srtwebvtt-over-http-from-mistserver) * [SubRip Optional configurations](#subrip-optional-configurations) --- # TS over TCP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TS over TCP =========== Real time streaming in MPEG2/TS format over TCP, UDP or RTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `tsudp://*` `tsrtp://*` `tstcp://*` TS Required configurations[​](#ts-required-configurations "Direct link to TS Required configurations") ------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Stream** | What streamname to serve. For multiple streams, add this protocol multiple times using different ports. | String | Unset | streamname | \--stream | TS Optional configurations[​](#ts-optional-configurations "Direct link to TS Optional configurations") ------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 8888 | port | \--port | | **Tracks** | The track IDs of the stream that this connector will transmit separated by spaces | String | | tracks | \--tracks | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | TS Push parameters[​](#ts-push-parameters "Direct link to TS Push parameters") ------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [TS Required configurations](#ts-required-configurations) * [TS Optional configurations](#ts-optional-configurations) * [TS Push parameters](#ts-push-parameters) --- # JavaScript format stream information | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### JavaScript format stream information[​](#javascript-format-stream-information "Direct link to JavaScript format stream information") To retrieve this format, request the URL `/info_STREAMNAME.js` from the HTTP output (by default port 8080). The returned data will have an `application/javascript` mime type and contain a JavaScript code in the following format: // Generating info code for stream testif (!mistvideo){var mistvideo = {};}mistvideo['test'] = {};//The exact same JSON object as in the JSON-based output will be output here. This format is particularly suited for embedding as a script onto a website. The mistvideo object is created as an empty object if it does not exist yet, and it is filled with a single entry with the stream name, containing the same JSON object as used in the JSON format. This allows for repeated embedding of one or multiple scripts like these without them conflicting with each other. ### JavaScript stream embedding[​](#javascript-stream-embedding "Direct link to JavaScript stream embedding") To retrieve this format, request the URL `/embed_STREAMNAME.js` from the HTTP output (by default port 8080). This will produce JavaScript code that is suitable for direct embedding onto a web page. It will attempt to embed the given stream in-line where the script is called, using all default options. Note that MistServer's web configuration interface can generated embed codes that are more flexible and contain a no-script fallback. It is advisable to use that version instead. This version remains available for legacy compatibility reasons. * [JavaScript format stream information](#javascript-format-stream-information) * [JavaScript stream embedding](#javascript-stream-embedding) --- # TS over RIST | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TS over RIST ============ Real time streaming of TS data over RIST Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `rist://*` TSRIST Optional configurations[​](#tsrist-optional-configurations "Direct link to TSRIST Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **RIST profile** | RIST profile to use | 0Β =Β Simple
1Β =Β Main | 1 | profile | \--profile | | **Stream** | What streamname to serve if no streamid is given by the other end of the connection | String | | streamname | \--stream | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | TSRIST Push parameters[​](#tsrist-push-parameters "Direct link to TSRIST Push parameters") ------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | \*\*\*\* | | String | | | undefined | | **AES Type** | Specifies the specific encrytion. Specify "128" for AES-128 or "256" for AES-256. Remember that you must also specify the pass phrase, and that encryption is not supported for the simple protocol at all. | Number (signed integer) | 0 | aes-type | undefined | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Bandwidth** | Sets the maximum bandwidth in Kbps. It is necessary to configure the bandwidth to be higher than the max bandwidth of your stream(s). This is in order to allow room for messaging headroom, plus the re-requested packets. When tuning a connection for the first time, analyze your stream statistics locally at first, then start at 10% higher for a constant bitrate, 100% higher for variable bitrate. Especially for VBR, provide generous "headroom" in your bandwidth. You can always reduce it when configuring and tuning the connection. | Number (signed integer) | 0 | bandwidth | undefined | | **Buffer size** | Sets the buffer size in milliseconds. The buffer size will work best at four to seven times the ping time. | Number (signed integer) | 0 | buffer | undefined | | **Cacnonical name** | Provides a canonical name for the media. If multi-plexing more than one stream through a tunnel, this provides a convenient way to identify a particular stream within the log. You should make it standard practice to assign a cononical name whenever multi-plexing. | String | | cname | undefined | | **Compression** | Utilizes liblz4 to compress all traffic in the GRE tunnel | 0Β =Β False
1Β =Β True | 0 | compression | undefined | | **Congestion control** | The three options for this parameter are 0=disabled, 1=normal and 2=aggressive. In general, don't set the parameter to "aggressive" unless you've definitely established that congestion is a problem. | Number (signed integer) | 0 | congestion-control | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Keepalive interval** | Time in milliseconds between pings. As is standard practice for GRE tunnels, the keep alive helps ensure the tunnel remains connected and open should no media be traversing it at a given time. | Number (signed integer) | 0 | keepalive-interval | undefined | | **Key rotation interval** | Sets the key rotation period in milliseconds when aes and a passphrases are specified. | Number (signed integer) | 0 | key-rotation | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Maximum retries** | Sets a maximum number of re-requests for a lost packet. | Number (signed integer) | 0 | max-retries | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Minimum retries** | Sets a minimum number of re-requests for a lost packet. Note that setting this too high can lead to congestion. Regardless of this setting, the size of the buffer and the roundtrip time will render too high a minimum value here irrelevant. | Number (signed integer) | 0 | min-retries | undefined | | **RIST profile** | RIST profile to use | 0Β =Β Simple
1Β =Β Main | 1 | profile | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Reorder buffer** | Sets the size for a secondary buffer in which after all re=requested packets have been received, the out-of-order packets are released in the correct order. in most cases there should be no need to adjust this setting, but it may be helpful in conjuction with very long distance/large buffer/poor network conditions. | Number (signed integer) | 0 | reorder-buffer | undefined | | **Return bandwidth** | Sets the maximum bandwidth in Kbps for just the receiver-to-sender direction. This is an option which may sometimes help avoid congestion insofar as it may limit re-request messages in poor network conditions. | Number (signed integer) | 0 | return-bandwidth | undefined | | **Maximum Round Trip Time** | Sets the maximum rtt setting in milliseconds. See rtt-min for a more complete description. in most cases, minimum and maximum should be set to be equal to one another. | Number (signed integer) | 0 | rtt-max | undefined | | **Minimum Round Trip Time** | Sets the minimum rtt setting in milliseconds. This can help reduce congestion by reducing the number of repeated re-requests in poor network conditions. More importantly, for very long-distance or connections that traverse under-sea cables, it may be important to adjust this setting. | Number (signed integer) | 0 | rtt-min | undefined | | **Passphrase** | Sets the specified passphrase for Main or Advanced profile encryption. Note that simple protocol does not support encryption, and that you must in addition to the passphrase specify the "AES Type" parameter. The rotating keys shall be placed inside the rtcp messages, using your passphrase as the pre-shared key. Be sure that the passphrase for sender and receiver match! | String | | secret | undefined | | **Session timeout** | Terminates the RIST connection after inactivity/lack of keepalive response for the limit (in milliseconds) which you set with this parameter. | Number (signed integer) | 0 | session-timeout | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Stream ID** | Sets the encapsulated udp destination port, this must be even. | Number (signed integer) | 0 | stream-id | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Virtual destination port** | The port within the GRE tunnel. This has nothing to do with the media port(s). If the GRE is device /dev/tun11, having an address of 1.1.1.2, and the virtual destination port is 10000, and your media is using port 8193/4, the operating system will use 1.1.1.2:10000 as the destination from the sender's point of view, or the inbound on the receiver's point of view. libRIST will make use of that device/IP/port. As far as your media source and media player are concerned, the media is on ports 8193/4 on their respective interfaces. The media knows nothing of the tunnel. | Number (signed integer) | 0 | virt-dst-port | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | | **Path weight** | Sets the relative share for load balanced connections. The best way to describe this will be to provide an example. The default is five, so in a setup where two paths are given weights of 5 and 10 respectively, the former would receive 1/3 of packets sent, and the latter would receive 2/3. | Number (signed integer) | 0 | weight | undefined | * [Pushing/Recording](#pushingrecording) * [TSRIST Optional configurations](#tsrist-optional-configurations) * [TSRIST Push parameters](#tsrist-push-parameters) --- # WAV over HTTP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page WAV over HTTP ============= Pseudostreaming in WAV format over HTTP Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `/*.wav` Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Pseudostreaming in WAV format over HTTP | Playing WAV over HTTP from MistServer[​](#playing-wav-over-http-from-mistserver "Direct link to Playing WAV over HTTP from MistServer") ---------------------------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | WAV progressive | html5/audio/wav | http(s)://`HOST`:`PORT`/`STREAMNAME`.wav | WAV Optional configurations[​](#wav-optional-configurations "Direct link to WAV Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | WAV Push parameters[​](#wav-push-parameters "Direct link to WAV Push parameters") ---------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing WAV over HTTP from MistServer](#playing-wav-over-http-from-mistserver) * [WAV Optional configurations](#wav-optional-configurations) * [WAV Push parameters](#wav-push-parameters) --- # WebRTC | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page WebRTC ====== Provides WebRTC output Dependency on other protocol(s)[​](#dependency-on-other-protocols "Direct link to Dependency on other protocol(s)") -------------------------------------------------------------------------------------------------------------------- | Dependency | Description | | --- | --- | | [HTTP(S)](/tags/provides-HTTP) | Provides WebRTC output | Playing WebRTC from MistServer[​](#playing-webrtc-from-mistserver "Direct link to Playing WebRTC from MistServer") ------------------------------------------------------------------------------------------------------------------- | Method | Type | URL | | --- | --- | --- | | WebRTC with WebSocket signalling | webrtc | ws(s)://`HOST`:`PORT`/webrtc/`STREAMNAME` | | WebRTC with WHEP signalling | whep | http(s)://`HOST`:`PORT`/webrtc/`STREAMNAME` | WebRTC Optional configurations[​](#webrtc-optional-configurations "Direct link to WebRTC Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **UDP bind address (internal)** | Interface address or hostname to bind SRTP UDP socket to. Defaults to originating interface address. | String | | bindhost | \--bindhost | | **Certificate** | (Root) certificate(s) file(s) to append to chain | String | | cert | \--cert | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **STUN/TURN config** | An array of RTCIceServer objects, each describing one server which may be used by the ICE agent; these are typically STUN and/or TURN servers. These will be passed verbatim to the RTCPeerConnection constructor as the 'iceServers' property. | json | | iceservers | \--iceservers | | **Write jitter log** | Writes log of frame transmit jitter to /tmp/ for each outgoing connection | Flag | 0 | jitterlog | \--jitterlog | | **Key** | Private key for SSL | String | | key | \--key | | **RTP lost timeout** | Amount of packets any track will wait for a packet to arrive before considering it lost | Number (unsigned integer) | 30 | losttimeout | \--losttimeout | | **RTP lost timeout (mobile)** | Amount of packets any track will wait for a packet to arrive before considering it lost, on mobile connections | Number (unsigned integer) | 90 | losttimeoutmobile | \--losttimeoutmobile | | **merge sessions** | if enabled, merges together all views from a single user into a single combined session. if disabled, each view (reconnection of the signalling websocket) is a separate session. | Flag | 0 | mergesessions | \--mergesessions | | **Disallow NACKs for viewers** | Disallows viewers to send NACKs for lost packets | Flag | 0 | nackdisable | \--nackdisable | | **RTP NACK timeout** | Amount of packets any track will wait for a packet to arrive before NACKing it | Number (unsigned integer) | 5 | nacktimeout | \--nacktimeout | | **RTP NACK timeout (mobile)** | Amount of packets any track will wait for a packet to arrive before NACKing it, on mobile connections | Number (unsigned integer) | 15 | nacktimeoutmobile | \--nacktimeoutmobile | | **Write packet log** | Writes log of full packet contents to /tmp/ for each connection | Flag | 0 | packetlog | \--packetlog | | **Preferred audio codecs** | Comma separated list of audio codecs you want to support in preferred order. e.g. opus,ALAW,ULAW | String | opus,ALAW,ULAW | preferredaudiocodec | \--webrtc-audio-codecs | | **Preferred video codecs** | Comma separated list of video codecs you want to support in preferred order. e.g. H264,VP8 | String | H264,VP9,VP8 | preferredvideocodec | \--webrtc-video-codecs | | **UDP bind address (public)** | Interface address or hostname for clients to connect to. Defaults to internal address. | String | | pubhost | \--pubhost | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | * [Dependency on other protocol(s)](#dependency-on-other-protocols) * [Playing WebRTC from MistServer](#playing-webrtc-from-mistserver) * [WebRTC Optional configurations](#webrtc-optional-configurations) --- # Streams Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "Streams" panel - setting up (new) streams ============================================== This panel shows all configured streams, both live and pre-recorded (Video on Demand - VoD). It shows vitals such as current viewer count and stream status, but also contains preview buttons to directly check the streams from your browser. This is also where you can create or edit streams. Each stream has two vital properties that must always be set: * The base stream name * The source. The stream name is the internal name used for a stream inside MistServer and is the main factor that controls the URLs under which your streams will be available. The source is the method or location where this stream receives its source material from: * Live streams this will usually be either another server or configuration that allows pushing a stream in from another location. * Video on Demand this will usually be an absolute filename or folder location. In addition to these two, various source types will have other optional or required parameters that you can set, which will show up in the interface as soon as they are selected in the "source" field. Wildcard streams[​](#wildcard-streams "Direct link to Wildcard streams") ------------------------------------------------------------------------- Wildcard streams are stream names that have a plus sign in them. The plus sign is not allowed as part of a base stream name, but allows extending the base stream name with a "wildcard" section that may contain any character. This wildcard section can then be used to configure a group of streams with a common shared configuration that are created and removed automatically as-needed. There are two base uses for this feature: For live streams, this allows setting an infinite amount of streams with a single configuration. For Video on Demand streams, this allows serving an entire folder of files or dynamically configured assets to be served with a single configuration. The "preview" button - previewing streams[​](#the-preview-button---previewing-streams "Direct link to The "preview" button - previewing streams") -------------------------------------------------------------------------------------------------------------------------------------------------- This button allows you to access the in-browser stream as the embed code provides it. Here you can try out various protocol and player combinations by using the "use player" and "use source" selection dropdowns. Basic information such as status and debug messages are given at the "player log". Stream type and track information is given at "meta information". The "embed" button - how to embed your streams into websites {#LSP:embed}[​](#LSP "Direct link to LSP") -------------------------------------------------------------------------------------------------------- This button allows you to generate and display the HTML code to embed a player onto a website. The embedded player will automatically detect the stream settings as well as browser/device capabilities and make sure optimal playback is realized. The "use a different host" can be used to change the host in the embedable url/codes in case the host used to connect to the web interface can not be used on the target website. ### Urls[​](#urls "Direct link to Urls") "Stream info json" and "stream info script" both give the same stream meta information available, but through different formats. "Stream info json" is XHR requestable, "stream info script" is embedable. "HTML page" is a link directly to the default embed code, but will also do a little bit of device detection and can redirect to a direct stream url if that suits the device better. ### Embed code[​](#embed-code "Direct link to Embed code") Here the embed code that is to be used on the webpage is posted. The contents will change depending on the set host and embed code options. If no changes have been made the default embed code settings as shown at "embed code options (optional)" will be used. #### Embed code options (optional)[​](#embed-code-options-optional "Direct link to Embed code options (optional)") Here you can set various options to change the behavior of the embedable player. Any changes in the settings will directly be applied to the embedable code above. There's no auto save of the options so be sure to copy the code once you've set the options. Please mouse over the options for an explanation ### Protocol stream urls[​](#protocol-stream-urls "Direct link to Protocol stream urls") Here a list of all supported direct stream urls is given. The list is generated based on the codecs available in the stream and protocols enabled in MistServer * [Wildcard streams](#wildcard-streams) * [The "preview" button - previewing streams](#the-preview-button---previewing-streams) * [The "embed" button - how to embed your streams into websites {#LSP}](#LSP) * [Urls](#urls) * [Embed code](#embed-code) * [Protocol stream urls](#protocol-stream-urls) --- # FLAC input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page FLAC input ========== Allows loading FLAC files for Audio on Demand. FLAC Core[​](#flac-core "Direct link to FLAC Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) FLAC Support Matrix[​](#flac-support-matrix "Direct link to FLAC Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.flac`,
`flac:*` | | Audio Codecs | `FLAC` | | Video Codecs | None | | Subtitle | None | | Metadata | None | | Passthrough | None | FLAC Optional configurations[​](#flac-optional-configurations "Direct link to FLAC Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [FLAC Core](#flac-core) * [FLAC Support Matrix](#flac-support-matrix) * [FLAC Optional configurations](#flac-optional-configurations) --- # Binaries | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) List of files and their purpose =============================== MistServer consists of multiple binaries, all working together to form the software as a whole. Each binary is dedicated to a specific task: * MistController This is the main binary, and the only mandatory one. It's functions include responding to API requests, discovering the other binaries, keeping track of statistics, logging, and starting and monitoring the various other binaries. It is the "brain" of MistServer, so to speak. * MistInβ€” These provide stream input capabilities, and their task is to act as the "source" of streams. Some of them read from files on the filesystem, others accept data through standard input or read data from a specific protocol connection. The specifics of each input are covered elsewhere in this manual. * MistInBuffer This is a special input: it expects live data to come in from some other location and maintains a buffer of the data, with metadata that is kept up-to-date. MistInBuffer also performs "mixing" functions, allowing you to combine multiple separate live sources into a single stream. * MistOutβ€” These provide stream output capabilities, and their task is to communicate with the outside world. This can mean maintaining an open listening socket, or automated activation through another MistServer component. Additionally, some outputs are capable of writing to files and standard output. * MistAnalyserβ€” These are not part of MistServer itself, and are not needed for the software to operate. They are utilities meant to assist in development and/or debugging and can provide information about the contents of buffers, various outputs, etcetera. Most users will not need to touch these under normal conditions. * MistUtilβ€” These provide specific utilities otherwise not important to MistServer itself. They are mostly useful for debugging and development purposes. * MistProcβ€” These are processes that can be ran adjacent to MistInBuffer processes (live streams), allowing for stream data manipulation. Things such as third-party encoders can be ran through these processes. It is safe to remove binaries that you do not plan on using, which will simply disable their related functionality in MistServer. Similarly, it is possible to write your own outputs and inputs to supplement MistServer's capabilities. For more information about this, please contact one of our engineers as it is outside of the scope of this document. Besides the binaries, there is one more file: the configuration file. This file is a JSON-formatted plain text file, containing the complete setup of your MistServer installation. This file is loaded when MistServer starts, and written as MistServer exits. You can also force a manual write of the configuration through the API or the configuration interface. Its location can be controlled through a command line parameter, but its default location is `config.json` in the current working directory of MistServer. When running MistServer as a system service, we recommend using the location `/etc/mistserver.conf` instead. --- # Protocols Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The protocol Panel ================== This panel controls the available "outputs" of MistServer. All protocols enabled here will be available for all configured streams (see the [streams panel](/mistserver/configuration/interface/streams) for more on configuring streams). By default, all protocols that do not require any settings are enabled. You can add a new protocol by clicking the "new protocol" button on the top right, and picking one from the drop down list that shows up. Each protocol has its own optional and required configuration parameters that are explained on the page itself. A particularly useful option that is present for all protocols is the "debug" option which allows you to set the debug verbosity level. The default is 3, which will print all production-level messages. Lowering the level to 1 or 2 can be useful for very busy servers, or raising the level to 4, 5 or 6 can be very useful when trying to find out why a particular protocol has issues. The debug level can also be set globally on the [General](/mistserver/configuration/interface/general) panel. Inputs[​](#inputs "Direct link to Inputs") ------------------------------------------- Some protocols could also serve as an input protocol. When these are set up they will become available as a `push` input. Push inputs are explained at [stream settings](/mistserver/concepts/streams/) * [Inputs](#inputs) --- # TS over SRT | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TS over SRT =========== Real time streaming of TS data over SRT Pushing/Recording[​](#pushingrecording "Direct link to Pushing/Recording") --------------------------------------------------------------------------- The following push targets are matched by this output: `srt://*` TSSRT Optional configurations[​](#tssrt-optional-configurations "Direct link to TSSRT Optional configurations") ---------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Acceptable connection types** | Whether to allow only incoming pushes (2), only outgoing pulls (1), or both (0, default) | 0Β =Β Allow both incoming and outgoing connections
1Β =Β Allow only outgoing connections
2Β =Β Allow only incoming connections | 0 | acceptable | \--acceptable | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Default track sorting** | What tracks are selected first when no specific track selector is used for playback. | =Β Default (last added for live, first added for VoD)
bps\_lthΒ =Β Bit rate, low to high
bps\_htlΒ =Β Bit rate, high to low
id\_lthΒ =Β Track ID, low to high
id\_htlΒ =Β Track ID, high to low
res\_lthΒ =Β Resolution, low to high
res\_htlΒ =Β Resolution, high to low | | default\_track\_sorting | \--default\_track\_sorting | | **Open file descriptor limit** | Increase open file descriptor to this value if current system value is lower. A higher value may be needed for handling many concurrent SRT connections. | Number (signed integer) | 1024 | filelimit | \--filelimit | | **Interface** | Address of the interface to listen on | String | 0.0.0.0 | interface | \--interface | | **TCP port** | TCP port to listen on | Number (unsigned integer) | 8889 | port | \--port | | **Stream** | What streamname to serve if no streamid is given by the other end of the connection | String | | streamname | \--stream | | **Username** | Username to drop privileges to - default if unprovided means do not drop privileges | String | root | username | \--username | TSSRT Push parameters[​](#tssrt-push-parameters "Direct link to TSSRT Push parameters") ---------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Append to file** | If set to any value, will (if possible) append to an existing file, rather than overwriting it | Boolean | Unset | append | undefined | | **Audio track(s)** | Override which audio tracks of the stream should be selected | string | Unset | audio | undefined | | **Congestion controller** | May be set to 'live' or 'file' | String | live | congestion | undefined | | **Connect timeout** | Milliseconds to wait before timing out a connection attempt for caller and rendezvous modes. | Number (signed integer) | 3000 | conntimeo | undefined | | **Duration of push** | How much media time to push, in seconds. Internally overrides "recstop" | Number (signed integer) | Unset | duration | undefined | | **Enforced Encryption** | If enabled, enforces that both sides either set no passphrase, or set the same passphrase. When disabled, falls back to no passphrase if the passphrases do not match. | 0Β =Β False
1Β =Β True | 1 | enforcedencryption | undefined | | **Flight Flag Size** | Maximum packets that may be 'in flight' without being acknowledged. | Number (signed integer) | 25600 | fc | undefined | | **Input bandwidth** | Estimated bandwidth of data to be sent. Default of 0 means automatic. | Number (signed integer) | 0 | inputbw | undefined | | **Type of Service** | TOS for IPv4 connections or Traffic Class for IPv6 connections. Defaults to system default. | Number (signed integer) | 0 | iptos | undefined | | **TTL** | Time To Live for IPv4 connections or unicast hops for IPv6 connections. Defaults to system default. | Number (signed integer) | 0 | ipttl | undefined | | **Latency** | Socket latency, in milliseconds. | Number (signed integer) | 120 | latency | undefined | | **Linger closed sockets** | Whether to keep closed sockets around for 180 seconds of linger time or not. | 0Β =Β False
1Β =Β True | 1 | linger | undefined | | **Reorder Tolerance** | Maximum amount of packets that may be out of order, or 0 to disable this mechanism. | Number (signed integer) | 0 | lossmaxttl | undefined | | **Playlist path (relative to segments)** | If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option. | string | Unset | m3u8 | undefined | | **Playlist max entries** | When writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | maxEntries | undefined | | **Maximum send bandwidth** | Maximum send bandwidth in bytes per second, -1 for infinite, 0 for relative to input bandwidth. | Number (signed integer) | \-1 | maxbw | undefined | | **Max buffer duration for GOP count wait** | When waiting for GOPs on the main track, give up when this much data is available in the main track buffer | Number (signed integer) | 5s, or 120s when using a non-default GOP count | maxwaittrackms | undefined | | **Message API** | When true, uses the default Message API. When false, uses the Stream API | 0Β =Β False
1Β =Β True | 1 | messageapi | undefined | | **Minimum SRT version** | Minimum SRT version to require the other side of the connection to support. | Number (signed integer) | 0 | minversion | undefined | | **Mode** | The connection mode. Can be listener, caller, or rendezvous. By default is listener if the host is missing from the URL, and is caller otherwise. | defaultΒ =Β Default
listenerΒ =Β Listener
callerΒ =Β Caller
rendezvousΒ =Β Rendezvous | Unset | mode | undefined | | **Maximum Segment Size** | Maximum size for packets including all headers, in bytes. The default of 1500 is generally the maximum value you can use in most networks. | Number (signed integer) | 1500 | mss | undefined | | **Repeat loss reports** | When enabled, repeats loss reports every time the retransmission timeout has expired. | 0Β =Β False
1Β =Β True | 1 | nakreport | undefined | | **Recovery Bandwidth Overhead** | Percentage of bandwidth to use for recovery. | Number (signed integer) | 25 | oheadbw | undefined | | **Packet Filter** | Sets the SRT packet filter string, see SRT library documentation for details. | String | | packetfilter | undefined | | **Encryption passphrase** | Enables encryption with the given passphrase. | String | | passphrase | undefined | | **Encryption key length** | May be 0 (auto), 16 (AES-128), 24 (AES-192) or 32 (AES-256). | Number (signed integer) | 0 | pbkeylen | undefined | | **Peer Idle Timeout** | Time to wait, in milliseconds, before the connection is considered broken if the peer does not respond. | Number (signed integer) | 5000 | peeridletimeo | undefined | | **Push delay** | Ensures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parameters | Number (signed integer) | Unset | pushdelay | undefined | | **Playback rate** | Multiplier for the playback speed rate, or 0 to not limit | Number (signed integer) | 1 | rate | undefined | | **Receive Buffer Size** | Size of the receive buffer, in bytes | Number (signed integer) | 0 | rcvbuf | undefined | | **Don't speed up output** | If set to any value, removes the rate override to unlimited normally applied to push outputs | Boolean | Unset | realtime | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | recstart | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | recstartunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | recstop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | recstopunix | undefined | | **Send Buffer Size** | Size of the send buffer, in bytes | Number (signed integer) | 0 | sndbuf | undefined | | **Send Drop Delay** | Extra delay before Too-late packet drop on sender side is triggered, in milliseconds. | Number (signed integer) | 0 | snddropdelay | undefined | | **Split interval** | Performs a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all. | Number (signed integer) | Unset | split | undefined | | **Media timestamp to start from** | What internal media timestamp to start from | Number (signed integer) | Unset | start | undefined | | **Unix timestamp to start from** | What unix timestamp to start from | unixtime | Unset | startunix | undefined | | **Media timestamp to stop at** | What internal media timestamp to stop at | Number (signed integer) | Unset | stop | undefined | | **Unix timestamp to stop at** | What unix timestamp to stop at | unixtime | Unset | stopunix | undefined | | **Stream ID** | Stream ID to transmit to the other side. MistServer uses this field for the stream name, but the field is entirely free-form and may contain anything. | String | | streamid | undefined | | **Subtitle track(s)** | Override which subtitle tracks of the stream should be selected | string | Unset | subtitle | undefined | | **Playlist target age** | When writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete. | Number (signed integer) | Unset | targetAge | undefined | | **Too-late Packet Drop** | Skips packets that cannot (sending) or have not (receiving) been delivered in time | 0Β =Β False
1Β =Β True | 1 | tlpktdrop | undefined | | **Transmission type** | This should be set to live (the default) unless you know what you're doing. | =Β Live
fileΒ =Β File | Unset | transtype | undefined | | **Timestamp-based Packet Delivery mode** | In this mode the packet's time is assigned at the sending time (or allowed to be predefined), transmitted in the packet's header, and then restored on the receiver side so that the time intervals between consecutive packets are preserved when delivering to the application. | 0Β =Β False
1Β =Β True | 1 | tsbpd | undefined | | **Unmask tracks** | If set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at all | Boolean | Unset | unmask | undefined | | **Video track(s)** | Override which video tracks of the stream should be selected | string | Unset | video | undefined | | **Wait for GOP count** | Before starting, wait until this number of GOPs is available in the main selected track | Number (signed integer) | 2 | waittrackcount | undefined | * [Pushing/Recording](#pushingrecording) * [TSSRT Optional configurations](#tssrt-optional-configurations) * [TSSRT Push parameters](#tssrt-push-parameters) --- # Stream_tags | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### stream\_tags[​](#stream_tags "Direct link to stream_tags") This request allows you to look up all tags on a stream. They are not in any way related to [session tags](/mistserver/integration/api/calls/tag_sessid) . A stream tag can be used to automatically start pushes or triggers depending on the tag. Which allows you to set up different workflows for streams in the same wildcard group. For example only adding recording for "some" of the current live streams. The request looks like this: { "stream_tags": "STREAMNAME", // Requests all tags for the given stream name // OR "stream_tags": ["STREAM1","STREAM2","STREAM3"], // Requests all tags for the given stream names // OR "stream_tags": true, // Requests all tags for all active streams // OR "stream_tags": {"STREAM":1,"STREAM2":1,"STREAM3":1} // Requests all tags for the given stream names // Value of Object is ignored }} The response to this call is the requested stream names and their tags: { "stream_tags":{ "STREAM1":["TAG1","TAG2"] "STREAM2":["TAG1"], "STREAM3":["TAG1","TAG2","TAG3"] } // Stream names without a tag will return null // Tags, if available, are always returned as an array} * [stream\_tags](#stream_tags) --- # USER_NEW | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)connection address (string)connection identifier (integer)connector (string)request url (string)session identifier (integer) | | Response | always | | Response Action | If false, denies the session while it remains in the cache. If true, accepts the session while it remains in the cache. | | Stream Specific | true | | When | Every time a new session is added to the session cache | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # FLV input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page FLV input ========= Allows loading FLV files for Video on Demand. FLV Core[​](#flv-core "Direct link to FLV Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) FLV Support Matrix[​](#flv-support-matrix "Direct link to FLV Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.flv`,
`flv:*` | | Audio Codecs | `AAC`,`MP3` | | Video Codecs | `H264`,`H263`,`VP6` | | Subtitle | None | | Metadata | None | | Passthrough | None | FLV Optional configurations[​](#flv-optional-configurations "Direct link to FLV Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [FLV Core](#flv-core) * [FLV Support Matrix](#flv-support-matrix) * [FLV Optional configurations](#flv-optional-configurations) --- # TSSRT input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TSSRT input =========== This input allows for processing MPEG2-TS-based SRT streams. Use mode=listener for push input. TSSRT Core[​](#tssrt-core "Direct link to TSSRT Core") ------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) TSSRT Support Matrix[​](#tssrt-support-matrix "Direct link to TSSRT Support Matrix") ------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `srt://*`,
`tssrt:*` | | Audio Codecs | `AAC`,`MP3`,`AC3`,`MP2`,`opus` | | Video Codecs | `H264`,`HEVC`,`MPEG2` | | Subtitle | None | | Metadata | None | | Passthrough | `rawts` | TSSRT Optional configurations[​](#tssrt-optional-configurations "Direct link to TSSRT Optional configurations") ---------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **Acceptable pushed streamids** | What to do with the streamids for incoming pushes, if this is a listener SRT connection | 0Β =Β Set streamid as wildcard
1Β =Β Ignore all streamids
2Β =Β Disallow non-matching streamid | 0 | acceptable | \--acceptable | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Raw input mode** | Enable raw MPEG-TS passthrough mode | Flag | Unset | raw | \--raw | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`srt://*` | Boolean | false | always\_on | undefined | * [TSSRT Core](#tssrt-core) * [TSSRT Support Matrix](#tssrt-support-matrix) * [TSSRT Optional configurations](#tssrt-optional-configurations) --- # Folder input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Folder input ============ The folder input will make available all supported files in the given folder as streams under this stream name, in the format STREAMNAME+FILENAME. For example, if your stream is called 'files' and you have a file called 'movie.flv', you could access this file streamed as 'files+movie.flv'. This input does not support subdirectories. To support more complex libraries, look into the documentation for the STREAM\_SOURCE trigger. Folder Core[​](#folder-core "Direct link to Folder Core") ---------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) Folder Support Matrix[​](#folder-support-matrix "Direct link to Folder Support Matrix") ---------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*/`,
`folder:*` | Folder Optional configurations[​](#folder-optional-configurations "Direct link to Folder Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [Folder Core](#folder-core) * [Folder Support Matrix](#folder-support-matrix) * [Folder Optional configurations](#folder-optional-configurations) --- # Docker installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) Docker specific instructions ============================ warning There are differences between running Docker on Linux, Mac and Windows. Linux can share the host network using `--network=host` Mac and Windows need port publishing using `--publish HOST_PORT:CONTAINER_PORT` . This makes using the ephemeral range for UDP protocols harder. Docker Desktop versions 4.34 can allow `--network=host`, please look at the [Docker documentation](https://docs.docker.com/engine/network/drivers/host/) The default `--shm-size` for Docker is 64MB, which is barely enough to do anything for MistServer, please do not forget to set this value! It's recommended to set a good amount of RAM depending on your hardware. We recommend using 95% if this is a dedicated server. Otherwise we would recommend at least 50% of your RAM. In the interest of keeping this quick and simple the `--shm-size=###` flag has been set to use 1GB of your RAM. **Set up the following values!** * `--network=host` To bind MistServer to the host network, allowing others to connect * `--publish HOST_PORT:CONTAINER_PORT` As alternative to `--network=host`, required for Mac/Window users * `/PATH/TO/CONFIG.JSON` Host location where you want to store the MistServer configuration. * `/FOLDER/WITH/VIDEOFILES` Host location where VoD content is available * `1g` Amount of shared memory available to the docker image docker run --detach --mount type=bind,source=/PATH/TO/CONFIG.JSON,destination=/config.json --mount type=bind,source=/FOLDER/WITH/VIDEOFILES,destination=/video --shm-size=1G --network=host ddvtech/mistserver For more details on which docker images are available visit our [official dockerhub page](https://hub.docker.com/r/ddvtech/) Keep in mind that some of our Docker images are just the MistServer binaries, while it will make the image itself super lightweight it does not allow for adding applications or running scripts within the Docker itself. Should you need an OS we recommend grabbing one of the images with an OS included or building your own version. info Docker works great with MistServer, however there is one technical limitation. Docker's default network set up will significantly impact the performance of network operations. We do not recommend running intense loads on this configuration. Please use bare metal instead! If you stay within ~50% of your network capabilities you will not notice any impact however. * Docker Compose * Docker Desktop * Docker run * Docker build In the examples below we will be using the `ddvtech/mistserver_alpine_minimal` container, make your own adjustments accordingly. **Minimal Docker compose.yml using `--network=host`** services: mistserver: image: ddvtech/mistserver_alpine_minimal container_name: mistserver volumes: - /PATH/TO/CONFIG/config.json:/config.json - /PATH/TO/VIDEOFOLDER:/video shm_size: '2gb' network_mode: 'host' restart: always **Minimal Docker compose.yml using `--publish`** services: mistserver: image: ddvtech/mistserver_alpine_minimal container_name: mistserver volumes: - /PATH/TO/CONFIG/config.json:/config.json - /PATH/TO/VIDEOFOLDER:/video shm_size: '2gb' ports: - 8080:8080 - 443:443 - 4242:4242 - 8889:8889/udp - 5554:5554 - 4200:4200 restart: always warning Make sure to edit the volumes binds to valid paths! info MistServer requires the `--shm-size` value set, which unfortunately is impossible directly from running a container using purely Docker Desktop. You will need to run a manual Docker command, but once done you can use Docker Desktop as usual from there on. **Grabbing the image** All our images will come from `ddvtech`, there could obviously be more available within Dockerhub. Feel free to pick any you like, however we obviously cannot give support/guarantees on images not from us. **Getting the docker run command** MistServer will require a `--shm-size=SIZE` flag, however shared memory cannot be set using an environment variable, it must be done through a docker run command. This means we cannot avoid running it through the terminal or power shell. However Docker Desktop will pass on all required settings except for `--shm-size` if you start setting it up. **First boot through Docker Desktop** To get the Docker run command we first boot it up, we then can set up the environment parameters. If you're running on Windows/Mac you will need to configure all the ports you will want to use from the outside. We have provided our defaults, but feel free to change/add ports as you like. ![Image of setting up the first boot of Docker Desktop](/img/blogs/dockerdesktop/docker_desktop_firstboot.png) **Copy the Docker Run command** Once set up, we will need to copy the docker run command and edit this. ![Image of copying the docker run command](/img/blogs/dockerdesktop/docker_desktop_docker_run.png) **Edit `docker run` to include `--shm-size`** Now open your terminal and paste the docker run command ![Image of pasting the docker run command into the terminal](/img/blogs/dockerdesktop/docker_desktop_terminal.png) We will need to add the `--shm-size=SIZE` setting. This is the amount of RAM available to MistServer to use, if you're only interested in testing MistServer with a few streams `1G` is plenty. A good rule of thumb is to take `bitrate` times `stream buffer` + 20%. Our default `stream buffer` is 50 seconds. Keep in mind you cannot go over your maximum RAM for this setting, if you want to use the maximum available the LOG of the container currently running will give you a number to copy in the first few lines. > It does not matter where you set the `--shm-size=SIZE` in the `docker run` command, we've set it before the `-d ddvtech:mistserver/3.4` flag and set it to `4G` to allow for some more streams. **Delete previous container and execute `docker run`** You can now delete the currently running container, you will no longer need it and it is blocking the ports you will want to use. Run the command and you will now have an extra container You can now start testing MistServer! ![Image of the final Docker Desktop image running](/img/blogs/dockerdesktop/docker_desktop_running.png). Docker run is the most basic method of starting a Docker container. A very minimal `docker run` script would be can be found here: **Docker run bare minimum sharing host network** docker run --shm-size=1G --network=host ddvtech/mistserver_alpine_minimal:latest \*\*Docker run bare minimum publishing ports docker run --shm-size=1G -p 8080:8080 -p 4242:4242 -p 4200:4200 -p 5444:5444 -p 8889:8889/udp -p 443:443 ddvtech/mistserver_alpine_minimal:latest tip We've noticed that most people tend to prefer to test a container quickly, if that is the case we recommend adding the following flags `--rm -ti` to both destroy the container once shut down & allow the terminal to be used by the Docker image. **Single run Docker container using host network** docker run --shm-size=1G --network=host --rm -ti ddvtech/mistserver_alpine_minimal:latest **Single run Docker container publishing default ports** docker run --shm-size=1G -p 8080:8080 -p 4242:4242 -p 4200:4200 -p 5444:5444 -p 8889:8889/udp -p 443:443 --rm -ti ddvtech/mistserver_alpine_minimal:latest warning Single run Docker images will NOT save settings between uses unless the configurations are stored outside Docker containers **Creating your own Docker container** Adding MistServer to your own Docker images is quite easy. Adding the binaries from the Docker image would run on any docker image. You can also choose to [compile](/mistserver/installation/compile) MistServer if you are creating a Docker image with a distro. An Ubuntu 22.04 bare minimum `Dockerfile` would look like this: FROM ubuntu:22.04RUN apt-get -y update && apt-get -y install build-essential git python3-pipRUN python3 -m pip install meson ninjaRUN git clone https://github.com/DDVTECH/mistserver.gitRUN cd mistserver && git checkout development && meson setup build --default-library static && cd build && ninja installCMD MistController -c /etc/mistserver.conf If you're building your own Dockers there's a good chance you know what you want configured. However keep in mind that you still need to give your Docker enough shared memory to work with. tip Do not forget to add `--shm-size=SIZE` and either `--network=host` or `--publish HOST_PORT:CONTAINER_PORT` to your docker run command. We recommend at least `1gb` for minimal testing. --- # H264 input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page H264 input ========== This input allows you to take raw H264 Annex B data over a standard input pipe, and turn it into a live stream. H264 Core[​](#h264-core "Direct link to H264 Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) H264 Support Matrix[​](#h264-support-matrix "Direct link to H264 Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `h264-exec:*`,
`h264:*` | | Audio Codecs | None | | Video Codecs | `H264` | | Subtitle | None | | Metadata | None | | Passthrough | None | H264 Optional configurations[​](#h264-optional-configurations "Direct link to H264 Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`h264-exec:*` | Boolean | false | always\_on | undefined | * [H264 Core](#h264-core) * [H264 Support Matrix](#h264-support-matrix) * [H264 Optional configurations](#h264-optional-configurations) --- # When to use triggers | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page When to use triggers ==================== Triggers provide infinite flexibility and customization to MistServer. Since the realm of possibilities is so broad it is hard to wrap your head around what is possible. After all nearly every event within MistServer can be used as a trigger for your own customization. To make it easier to understand what triggers can be used for we provide some of the more common usages here. List of examples[​](#list-of-examples "Direct link to List of examples") ------------------------------------------------------------------------- | Example usage | Description | | --- | --- | | [Access Control](#access-control-limiting-content-to-certain-viewers) | Blocking certain viewers from playback | | [Stream Push tokens](#using-stream-tokens-to-push-to-mistserver) | Using stream tokens for pushing into MistServer | | [Viewing tokens](#using-stream-tokens-to-push-to-mistserver) | Using view tokens with MistServer. | | [Redirect offline streams](#redirect-offline-streams-to-a-fallback) | Redirect viewers to other streams. | | [Only list watchable live streams](#only-list-active-live-streams) | Only show live streams that you can view. | | [Limit viewers on bandwidth](#block-viewers-on-bandwidth-limits) | Block viewers once a bandwidth limit has been reached. | Access control: Limiting content to certain viewers[​](#access-control-limiting-content-to-certain-viewers "Direct link to Access control: Limiting content to certain viewers") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### When do you want to use Access control?[​](#when-do-you-want-to-use-access-control "Direct link to When do you want to use Access control?") You use Access control if you need some method to determine whether viewers can watch content and need to block others for any reason. ### How it works[​](#how-it-works "Direct link to How it works") The [session system](/mistserver/concepts/sessions) determines what makes a new viewer based on various metrics. The [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) trigger will activate for any new viewer and will pass on whatever cookies or parameters you wish to use to identify them in your own systems. Using this information allows you to identify who is trying to watch content and grant them access based on your own information. | Components to use | Reason | | --- | --- | | [USER\_NEW trigger](/mistserver/integration/triggers/list/USER_NEW) | Allows you to run checks on new connecting users | | [Session system](/mistserver/concepts/sessions) | Determine when a viewer is "new" | | [invalidate\_sessions API call](/mistserver/integration/api/calls/invalidate_sessions) | Reset all sessions | * The [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) trigger allows you to run your own logic on newly connecting users. A very simple usage of this would be checking for a cookie or url parameter that you use to identify them in a database of users and if they have an account or paid for the content they are allowed to watch. All this trigger needs is a `true` response and the viewer can watch. * The [session system](/mistserver/concepts/sessions) is important to decide exactly when you consider someone a new viewer. Do want to identify them only based on IP? Should there be a Token that can be re-used over different playback protocols? Sessions will stay active for as long as the viewer is connected and 10 minutes afterwards. Once expired a viewer will have to renegotiate through the USER\_NEW trigger to determine whether access is allowed. * [invalidate\_sessions](/mistserver/integration/api/calls/invalidate_sessions) is there to reset the sessions for streams and have everyone renegotiate through the USER\_NEW trigger. This can be used to update restrictions on content, say a stream goes from free to paid content. A more detailed insight on how this would work can be found [here](https://news.mistserver.org/news/67/Building+an+access+control+system+with+triggers+and+PHP) Using stream tokens to push to MistServer[​](#using-stream-tokens-to-push-to-mistserver "Direct link to Using stream tokens to push to MistServer") ---------------------------------------------------------------------------------------------------------------------------------------------------- ### When do you want to use tokens to push to MistServer?[​](#when-do-you-want-to-use-tokens-to-push-to-mistserver "Direct link to When do you want to use tokens to push to MistServer?") Using tokens grants you security for pushing into MistServer while keeping playback of streams as easy as possible for your viewers. ### How it works[​](#how-it-works-1 "Direct link to How it works") Any push towards MistServer requires a `stream name`, however since the same `stream name` is used for playback viewers can potentially "steal" a stream push if there's no password or address whitelisting. Tokens serve to solve this by allowing users to push into Mistserver using a (preferably long & randomized) stream name which MistServer can match & redirect towards the correct easier to use stream name for playback. | Components to use | Reason | | --- | --- | | [PUSH\_REWRITE](/mistserver/integration/triggers/list/PUSH_REWRITE) | This trigger can redirect incoming pushes to other stream names | The [PUSH\_REWRITE](/mistserver/integration/triggers/list/PUSH_REWRITE) trigger is especially powerful as it unifies every push method to MistServer and will work regardless of which method your user has chosen to connect to your server. The only thing you need to do is redirect a `stream name` that corresponds with a token towards the right stream name by answering the `stream name` it should go to. If there's no match simply return an empty response and the push is denied. Make sure to only allow tokens and block the actual stream name being used, otherwise you haven't solved anything. > Note: An RTMP only version exists in RTMP\_PUSH\_REWRITE, this is considered deprecated and inferior to the PUSH\_REWRITE trigger. A more detailed example on why and how to use tokens can be found [here](https://news.mistserver.org/news/90/How+to+build+a+Twitch-alike+service+with+MistServer) . A very simple to understand token example can be found [here](https://news.mistserver.org/news/114/Simple+token+support+for+live+streams) . Using tokens to view from MistServer[​](#using-tokens-to-view-from-mistserver "Direct link to Using tokens to view from MistServer") ------------------------------------------------------------------------------------------------------------------------------------- ### When do you want to use tokens for viewing?[​](#when-do-you-want-to-use-tokens-for-viewing "Direct link to When do you want to use tokens for viewing?") Using tokens to view from MistServer is like [access control](#access-control-limiting-content-to-certain-viewers) . It allows you to block or limit playback depending on your choices, however using tokens also keeps the stream name private. ### How it works[​](#how-it-works-2 "Direct link to How it works") The trigger [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) redirects any offline (or invalid) stream. This allows you to redirect any `stream name` attempted to another `stream name`. This means you can have users attempt to view a unique token, match this with your own database/list and redirect them towards another stream if the token matches. Now whether a token can only be used once or multiple times is up to you. | Components to use | Reason | | --- | --- | | [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) | Allows redirecting of requested streams to another | | [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW)
(optional) | Allows blocking & allowing of new viewers | * [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) allows you to check whether a token matches with your own database/list and if it does you can redirect them towards the stream to view. You could keep track of how many times this token has been used and invalidate it after "x" attempts. The only thing the trigger needs to reply is the stream name to send the viewer to, or empty for denial. * [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) could be needed as well. As [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) only blocks view attempts that do not match an existing `stream name`. Meaning any direct view attempt on the correct `stream name` has nothing to block unwanted viewers. By adding the [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) trigger you can ensure that only viewers redirected by [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) can view. We recommend setting a cookie or parameter for [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) to check against for this. Redirect offline streams to a fallback[​](#redirect-offline-streams-to-a-fallback "Direct link to Redirect offline streams to a fallback") ------------------------------------------------------------------------------------------------------------------------------------------- ### When do you want to redirect to a fallback?[​](#when-do-you-want-to-redirect-to-a-fallback "Direct link to When do you want to redirect to a fallback?") If you want to make sure viewers always have something to view, or if you want to show the latest recording of a live stream when the stream itself goes offline. ### How it works[​](#how-it-works-3 "Direct link to How it works") [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) redirects any offline (or invalid) stream. In this case if a stream is unavailable (offline) you just have to point them to the latest recording instead by redirecting the playback attempt to whatever the recording has as `stream name` within MistServer. [STREAM\_BUFFER](/mistserver/integration/triggers/list/STREAM_BUFFER) will notify you if a stream is available again, which you can then in turn use to tell current viewers to reload to the now live stream. | Components to use | Reason | | --- | --- | | [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) | Allows the redirection of requested streams to another. | | [STREAM\_BUFFER](/mistserver/integration/triggers/list/STREAM_BUFFER) | Get notified if the stream goes back live. | | [stop\_sessid](/mistserver/integration/api/calls/stop_sessID)
(optional) | Disonnect sessions to move them to live. | * [DEFAULT\_STREAM](/mistserver/integration/triggers/list/DEFAULT_STREAM) will trigger if a stream has gone offline or is unavailable. By using the `stream name` attempted you can match this to the recordings and give them the latest recording instead. You will obviously need to keep track of this, but if you do the only thing you need to return is the `stream name` of the latest recording and you're done. * [STREAM\_BUFFER](/mistserver/integration/triggers/list/STREAM_BUFFER) will run with a stream state of `FULL` once a live stream is considered playable. At this point you will need to have any viewer currently playing a recording while they wanted to play the live stream to reload the player with the now live stream. * Once you know the stream is available, the "best" solution would be to provide the option to go to the live stream on the front end. After all surprising viewers with a stream suddenly switching might be considered bad. However should you wish to just force viewers to the live stream you can use the [stop\_sessid](/mistserver/integration/api/calls/stop_sessID) call. Once you know the stream is back live you can force viewers with sessions that attempted to view the live stream first be stopped, when the player reconnects they are connected to the live stream instead. Just make sure to track whether they have moved on from the live stream as well! Only list active live streams[​](#only-list-active-live-streams "Direct link to Only list active live streams") ---------------------------------------------------------------------------------------------------------------- ### When do you want to list only available live streams?[​](#when-do-you-want-to-list-only-available-live-streams "Direct link to When do you want to list only available live streams?") Nothing is more annoying than having a list of streams and some of them being offline or unwatchable. There's two good methods to ensure your listings only contain live streams. ### How it works[​](#how-it-works-4 "Direct link to How it works") [STREAM\_BUFFER](/mistserver/integration/triggers/list/STREAM_BUFFER) will notify you of every live stream that is currently playable. Once a stream hits the state `FULL` it means every playback protocol can start on immediate playback. This is the moment when you want to show the stream as available. [active\_streams](/mistserver/integration/api/calls/active_streams) is an alternative to the STREAM\_BUFFER trigger, but requires polling/monitoring of the state. Where STREAM\_BUFFER activates when the state changes active\_streams can be used to monitor all current live streams. Any stream that shows up in this call can be considered live. | Components to use | Reason | | --- | --- | | [STREAM\_BUFFER](/mistserver/integration/triggers/list/STREAM_BUFFER) | Get notified when a live stream is viewable | | [active\_streams](/mistserver/integration/api/calls/active_streams)
(alternative) | Pull in information about which streams are viewable | Both methods are valid and would work well, it's a matter of preference. Important is that you use either method to build a list of stream names that you can show on your website as available. Block viewers on bandwidth limits[​](#block-viewers-on-bandwidth-limits "Direct link to Block viewers on bandwidth limits") ---------------------------------------------------------------------------------------------------------------------------- When do you want to block viewers on bandwidth limits[​](#when-do-you-want-to-block-viewers-on-bandwidth-limits "Direct link to When do you want to block viewers on bandwidth limits") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Whenever you want to impose a maximum amount of bandwidth a stream can pull from your server limiting the amount of viewers is a good idea. ### How it works[​](#how-it-works-5 "Direct link to How it works") [totals API call](/mistserver/integration/api/calls/totals) can be used to generate the amount of bandwidth in use at any point in time. Requesting this 5 seconds ago guarantees that MistServer has all the information available. This can then be used to block viewers through USER\_NEW. [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) will be checked every time a new viewer tries to connect. This will have to check if the current bandwidth is above a limit and if so deny the viewer. [invalidate\_sessions API call](/mistserver/integration/api/calls/invalidate_sessions) can be used on any viewer no longer actively watching to clear up any blocks imposed on previous viewers. | Components to use | Reason | | --- | --- | | [Totals API call](/mistserver/integration/api/calls/totals) | Get the current bandwidth usage | | [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) | Run this when viewers want to watch a stream | | [invalidate\_sessions API call](/mistserver/integration/api/calls/invalidate_sessions) | Clear up previous blocks | The [totals API call](/mistserver/integration/api/calls/totals) can be used with: '"totals":{"streams":["STREAMNAME"],"fields":["upbps"],"start":-5}' This will give you the current total bytes served at the requested point. Requesting 5 seconds ago guarantees you of an reliable measure as some statistics backfill in about 1-3 seconds. The [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) trigger should use the totals call to determine whether a new viewer can be allowed at this time. [invalidate\_sessions API call](/mistserver/integration/api/calls/invalidate_sessions) should be used when the totals call goes under a "safe" number. That way you will re-allow any previous blocked sessions. Otherwise blocked sessions will stay blocked for 10 minutes (by default) after their last attempt to view. Previously allowed session will time-out after 15 seconds so these should be less of an issue * [List of examples](#list-of-examples) * [Access control: Limiting content to certain viewers](#access-control-limiting-content-to-certain-viewers) * [When do you want to use Access control?](#when-do-you-want-to-use-access-control) * [How it works](#how-it-works) * [Using stream tokens to push to MistServer](#using-stream-tokens-to-push-to-mistserver) * [When do you want to use tokens to push to MistServer?](#when-do-you-want-to-use-tokens-to-push-to-mistserver) * [How it works](#how-it-works-1) * [Using tokens to view from MistServer](#using-tokens-to-view-from-mistserver) * [When do you want to use tokens for viewing?](#when-do-you-want-to-use-tokens-for-viewing) * [How it works](#how-it-works-2) * [Redirect offline streams to a fallback](#redirect-offline-streams-to-a-fallback) * [When do you want to redirect to a fallback?](#when-do-you-want-to-redirect-to-a-fallback) * [How it works](#how-it-works-3) * [Only list active live streams](#only-list-active-live-streams) * [When do you want to list only available live streams?](#when-do-you-want-to-list-only-available-live-streams) * [How it works](#how-it-works-4) * [Block viewers on bandwidth limits](#block-viewers-on-bandwidth-limits) * [When do you want to block viewers on bandwidth limits](#when-do-you-want-to-block-viewers-on-bandwidth-limits) * [How it works](#how-it-works-5) --- # ISMV input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ISMV input ========== This input allows you to stream ISMV Video on Demand files. ISMV Core[​](#ismv-core "Direct link to ISMV Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) ISMV Support Matrix[​](#ismv-support-matrix "Direct link to ISMV Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.ismv`,
`ismv:*` | | Audio Codecs | `AAC` | | Video Codecs | `H264` | | Subtitle | None | | Metadata | None | | Passthrough | None | ISMV Optional configurations[​](#ismv-optional-configurations "Direct link to ISMV Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [ISMV Core](#ismv-core) * [ISMV Support Matrix](#ismv-support-matrix) * [ISMV Optional configurations](#ismv-optional-configurations) --- # MP3 input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page MP3 input ========= This input allows you to stream MP3 Video on Demand files. MP3 Core[​](#mp3-core "Direct link to MP3 Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) MP3 Support Matrix[​](#mp3-support-matrix "Direct link to MP3 Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.mp3`,
`mp3:*` | | Audio Codecs | `MP3` | | Video Codecs | None | | Subtitle | None | | Metadata | None | | Passthrough | None | MP3 Optional configurations[​](#mp3-optional-configurations "Direct link to MP3 Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [MP3 Core](#mp3-core) * [MP3 Support Matrix](#mp3-support-matrix) * [MP3 Optional configurations](#mp3-optional-configurations) --- # HLS input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page HLS input ========= This input allows you to both play Video on Demand and live HLS streams stored on the filesystem, as well as pull live HLS streams over HTTP and HTTPS. HLS Core[​](#hls-core "Direct link to HLS Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) HLS Support Matrix[​](#hls-support-matrix "Direct link to HLS Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.m3u8`,
`/*.m3u`,
`http://*.m3u8`,
`http://*.m3u`,
`https://*.m3u8`,
`https://*.m3u`,
`https-hls://*`,
`http-hls://*`,
`s3+http://*.m3u8`,
`s3+http://*.m3u`,
`s3+https://*.m3u8`,
`s3+https://*.m3u`,
`s3+https-hls://*`,
`s3+http-hls://*`,
`hls:*` | | Audio Codecs | `AAC`,`AC3`,`MP3` | | Video Codecs | `H264` | | Subtitle | None | | Metadata | None | | Passthrough | None | HLS Optional configurations[​](#hls-optional-configurations "Direct link to HLS Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | Live buffer window in ms. Segments within this range from the live point will be kept in memory | Number (unsigned integer) | 50000 | bufferTime | \--buffer | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`/*.m3u8`,
`/*.m3u`,
`http://*.m3u8`,
`http://*.m3u`,
`https://*.m3u8`,
`https://*.m3u`,
`https-hls://*`,
`http-hls://*`,
`s3+http://*.m3u8`,
`s3+http://*.m3u`,
`s3+https://*.m3u8`,
`s3+https://*.m3u`,
`s3+https-hls://*`,
`s3+http-hls://*` | Boolean | false | always\_on | undefined | * [HLS Core](#hls-core) * [HLS Support Matrix](#hls-support-matrix) * [HLS Optional configurations](#hls-optional-configurations) --- # MP4 input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page MP4 input ========= This input allows streaming of MP4 files as Video on Demand. MP4 Core[​](#mp4-core "Direct link to MP4 Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) MP4 Support Matrix[​](#mp4-support-matrix "Direct link to MP4 Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.mp4`,
`http://*.mp4`,
`https://*.mp4`,
`s3+http://*.mp4`,
`s3+https://*.mp4`,
`mp4:*` | | Audio Codecs | `AAC`,`AC3`,`MP3` | | Video Codecs | `HEVC`,`H264`,`H263`,`VP6`,`AV1` | | Subtitle | None | | Metadata | None | | Passthrough | None | MP4 Optional configurations[​](#mp4-optional-configurations "Direct link to MP4 Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [MP4 Core](#mp4-core) * [MP4 Support Matrix](#mp4-support-matrix) * [MP4 Optional configurations](#mp4-optional-configurations) --- # OGG input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page OGG input ========= This input allows streaming of OGG files as Video on Demand. OGG Core[​](#ogg-core "Direct link to OGG Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) OGG Support Matrix[​](#ogg-support-matrix "Direct link to OGG Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.ogg`,
`ogg:*` | | Audio Codecs | `vorbis`,`opus` | | Video Codecs | `theora` | | Subtitle | None | | Metadata | None | | Passthrough | None | OGG Optional configurations[​](#ogg-optional-configurations "Direct link to OGG Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [OGG Core](#ogg-core) * [OGG Support Matrix](#ogg-support-matrix) * [OGG Optional configurations](#ogg-optional-configurations) --- # Playlist input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Playlist input ============== Enables Playlist Input Playlist Core[​](#playlist-core "Direct link to Playlist Core") ---------------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) Playlist Support Matrix[​](#playlist-support-matrix "Direct link to Playlist Support Matrix") ---------------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `*.pls`,
`playlist:*` | Playlist Optional configurations[​](#playlist-optional-configurations "Direct link to Playlist Optional configurations") ------------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`*`,
`.`,
`p`,
`l`,
`s` | Boolean | false | always\_on | undefined | * [Playlist Core](#playlist-core) * [Playlist Support Matrix](#playlist-support-matrix) * [Playlist Optional configurations](#playlist-optional-configurations) --- # SDP input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page SDP input ========= This input allows pulling of RTP packets using a provided SDP file SDP Core[​](#sdp-core "Direct link to SDP Core") ------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) SDP Support Matrix[​](#sdp-support-matrix "Direct link to SDP Support Matrix") ------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `*.sdp`,
`sdp:*` | | Audio Codecs | `AAC`,`MP3`,`AC3`,`ALAW`,`ULAW`,`PCM`,`opus`,`MP2` | | Video Codecs | `H264`,`HEVC`,`MPEG2`,`VP8`,`VP9` | | Subtitle | None | | Metadata | None | | Passthrough | None | SDP Optional configurations[​](#sdp-optional-configurations "Direct link to SDP Optional configurations") ---------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`*.sdp` | Boolean | false | always\_on | undefined | * [SDP Core](#sdp-core) * [SDP Support Matrix](#sdp-support-matrix) * [SDP Optional configurations](#sdp-optional-configurations) --- # SubRip input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page SubRip input ============ undefined SubRip Core[​](#subrip-core "Direct link to SubRip Core") ---------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) SubRip Support Matrix[​](#subrip-support-matrix "Direct link to SubRip Support Matrix") ---------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.srt`,
`/*.vtt`,
`subrip:*` | | Audio Codecs | None | | Video Codecs | None | | Subtitle | `subtitle` | | Metadata | None | | Passthrough | None | SubRip Optional configurations[​](#subrip-optional-configurations "Direct link to SubRip Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | * [SubRip Core](#subrip-core) * [SubRip Support Matrix](#subrip-support-matrix) * [SubRip Optional configurations](#subrip-optional-configurations) --- # RTSP input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page RTSP input ========== This input allows pulling of live RTSP sources over either UDP or TCP. RTSP Core[​](#rtsp-core "Direct link to RTSP Core") ---------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) RTSP Support Matrix[​](#rtsp-support-matrix "Direct link to RTSP Support Matrix") ---------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `rtsp://*`,
`rtsp:*` | | Audio Codecs | `AAC`,`MP3`,`AC3`,`ALAW`,`ULAW`,`PCM`,`opus`,`MP2` | | Video Codecs | `H264`,`HEVC`,`MPEG2`,`VP8`,`VP9` | | Subtitle | None | | Metadata | None | | Passthrough | None | RTSP Optional configurations[​](#rtsp-optional-configurations "Direct link to RTSP Optional configurations") ------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Transport protocol** | Sets the transport protocol to either TCP (default) or UDP. UDP requires ephemeral UDP ports to be open, TCP does not. | TCPΒ =Β TCP
UDPΒ =Β UDP | TCP | transport | \--transport | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`rtsp://*` | Boolean | false | always\_on | undefined | * [RTSP Core](#rtsp-core) * [RTSP Support Matrix](#rtsp-support-matrix) * [RTSP Optional configurations](#rtsp-optional-configurations) --- # TS input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TS input ======== This input allows you to stream MPEG2-TS data from static files (/_.ts), streamed files or named pipes (stream://_.ts), streamed over HTTP (http(s)://_.ts, http(s)-ts://_), standard input (ts-exec:_), or multicast/unicast UDP sockets (tsudp://_). TS Core[​](#ts-core "Direct link to TS Core") ---------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) TS Support Matrix[​](#ts-support-matrix "Direct link to TS Support Matrix") ---------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `/*.ts`,
`/*.m2ts`,
`stream://*.ts`,
`tsudp://*`,
`ts-exec:*`,
`http://*.ts`,
`http-ts://*`,
`https://*.ts`,
`https-ts://*`,
`s3+http://*.ts`,
`s3+https://*.ts`,
`ts:*` | | Audio Codecs | `AAC`,`AC3`,`MP2`,`opus` | | Video Codecs | `H264`,`HEVC`,`MPEG2` | | Subtitle | None | | Metadata | None | | Passthrough | `rawts` | TS Optional configurations[​](#ts-optional-configurations "Direct link to TS Optional configurations") ------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | undefined | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Fallback stream** | Alternative stream to load for playback when there is no active broadcast | String | | fallback\_stream | undefined | | **Maximum live keep-away distance** | Maximum distance in milliseconds to fall behind the live point for stable playback. | Number (unsigned integer) | 45000 | maxkeepaway | undefined | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **Raw input mode** | Enable raw MPEG-TS passthrough mode | Flag | Unset | raw | \--raw | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Segment size (ms)** | Target time duration in milliseconds for segments. | Number (unsigned integer) | 1900 | segmentsize | undefined | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`stream://*.ts`,
`tsudp://*`,
`ts-exec:*`,
`http://*.ts`,
`http-ts://*`,
`https://*.ts`,
`https-ts://*`,
`s3+http://*.ts`,
`s3+https://*.ts` | Boolean | false | always\_on | undefined | * [TS Core](#ts-core) * [TS Support Matrix](#ts-support-matrix) * [TS Optional configurations](#ts-optional-configurations) --- # Triggers Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "triggers" panel - setting up event scripts/reactions[​](#the-triggers-panel---setting-up-event-scriptsreactions "Direct link to The "triggers" panel - setting up event scripts/reactions") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This panel allows adding, changing or removing triggers in the system. Triggers are a way of hooking into MistServer's processes, allowing you to make changes to the behaviour. This feature allows you to build things such as paywalls, region locking, but also feed data into external stream status indicators and other types of monitoring and control software. For a full list of all triggers available and their usage, check the [triggers section](/mistserver/integration/triggers/) * [The "triggers" panel - setting up event scripts/reactions](#the-triggers-panel---setting-up-event-scriptsreactions) --- # TSRIST input | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page TSRIST input ============ This input allows for processing MPEG2-TS-based RIST streams. TSRIST Core[​](#tsrist-core "Direct link to TSRIST Core") ---------------------------------------------------------- Every input within MistServer requires a `Stream name` and `Source` to understand what these mean exactly we recommend reading up on [Stream settings](/mistserver/concepts/streams) TSRIST Support Matrix[​](#tsrist-support-matrix "Direct link to TSRIST Support Matrix") ---------------------------------------------------------------------------------------- | Category | Support | | --- | --- | | Input URLs | `rist://*`,
`tsrist:*` | | Audio Codecs | `AAC`,`MP3`,`AC3`,`MP2`,`opus` | | Video Codecs | `H264`,`HEVC`,`MPEG2` | | Subtitle | None | | Metadata | None | | Passthrough | `rawts` | TSRIST Optional configurations[​](#tsrist-optional-configurations "Direct link to TSRIST Optional configurations") ------------------------------------------------------------------------------------------------------------------- | Option | Description | Type | Default | API | Commandline | | --- | --- | --- | --- | --- | --- | | **Buffer time (ms)** | The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback. | Number (unsigned integer) | 50000 | DVR | \--buffer | | **MPEG Data track parser** | Which parser to use for data tracks | =Β None / disabled
jsonΒ =Β 2b size-prepended JSON | | datatrack | \--datatrack | | **debug** | The debug level at which messages need to be printed. | [debug](/mistserver/concepts/debug_levels) | Inherited from parent process | debug | \--debug | | **Memory page timeout** | For bufferless or live inputs like HLS, set the timeout in seconds for old, inactive pages to be deleted. A longer value results in more memory usage, but ensures that recently buffered data stays in memory for longer | Number (unsigned integer) | 15 | pagetimeout | \--pagetimeout | | **RIST profile** | RIST profile to use | 0Β =Β Simple
1Β =Β Main | 1 | profile | \--profile | | **Raw input mode** | Enable raw MPEG-TS passthrough mode | Flag | Unset | raw | \--raw | | **Simulated Live** | Make this input run as a simulated live stream | Flag | Unset | realtime | \--realtime | | **Always on** | Automatically starts this stream, regardless of viewers requesting it or not. Only available if the source is set to one of:
`rist://*` | Boolean | false | always\_on | undefined | * [TSRIST Core](#tsrist-core) * [TSRIST Support Matrix](#tsrist-support-matrix) * [TSRIST Optional configurations](#tsrist-optional-configurations) --- # Server Stats Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "statistics" panel - statistics for the last few minutes[​](#the-statistics-panel---statistics-for-the-last-few-minutes "Direct link to The "statistics" panel - statistics for the last few minutes") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Here you can view the live statistics kept by MistServer. Statistics data for inactive sessions is only kept in memory for approximately ten minutes, so any data points older than that will most likely be inaccurate. When using a Pro edition, it is highly recommended to not use the statistics panel, but instead the much more modern built-in . See the section on integration for more details on this. The "server stats" panel - basic server statistics[​](#the-server-stats-panel---basic-server-statistics "Direct link to The "server stats" panel - basic server statistics") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This panel shows some of the current vitals of the machine MistServer is running on. Consider this purely informational and do not rely on its accuracy, particularly on non-x86-Linux systems. * [The "statistics" panel - statistics for the last few minutes](#the-statistics-panel---statistics-for-the-last-few-minutes) * [The "server stats" panel - basic server statistics](#the-server-stats-panel---basic-server-statistics) --- # Push Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "Push" panel - pushing out and recording ============================================ This panel allows configuring, controlling and monitoring automated pushes. In MistServer terminology, a "push" is a stream being sent to another host or to a file on disk. In other words: recordings are a special type of push (a push to disk). There are two types of pushes you can create: a regular push and an automatic push. A regular push is a one-time only action, that is started and then disappears when the stream ends or the connection to the target is broken. An automatic push is remembered, and will activate both immediately upon creation as well as every time a matching stream becomes active. Additionally, if retries are turned on, automatic pushes will re-activate every time they are shut off and/or fail until the matching stream becomes inactive again. A stream "matches" for push purposes under either of these conditions: * An exact match (e.g. 'foo' matches the stream 'foo', 'foo+bar' matches the stream 'foo+bar', but neither matches 'bar+foo'). * A wildcard match (e.g. 'foo+' matches 'foo+bar' and 'foo+baz' but not simply 'foo') Automatic push settings[​](#automatic-push-settings "Direct link to Automatic push settings") ---------------------------------------------------------------------------------------------- There are two more settings on this screen that can be configured for automatic pushes: The `delay before retry` setting decides how many seconds a failed automatic push will wait before a retry attempt. If this is set to zero (the default) there will be no retry attempts at all. In other words, it must be set to at least one to enable the automatic retry feature for pushes. The `maximum retries` setting decides how many retries per second will happen. This feature can be used to rate-limit retries to prevent overloading a target and/or the server itself. The default is zero, which here means "no limit". Target URLs and settings[​](#target-urls-and-settings "Direct link to Target URLs and settings") ------------------------------------------------------------------------------------------------- When using MistServer to push or record it will always be done through a target URL specifying the type of push or recording followed by parameters. Every target URL will apply and may contain to select tracks and apply specific commands/requests to the push. The current outputs available to MistServer are: * `FLV file` Setup by setting the target URL to a path ending with `.flv` * `TS file` Setup by setting the target URL to a path ending with `.ts` * `WAV file` Setup by setting the target URL to a path ending with `.wav` * `RTMP stream` Setup by setting the target URL to a full RTMP URL `rtmp://hostname:port/passphrase/streamname` * `TS UDP stream` Setup by setting the target URL to a full TS UDP URL `tsudp://[host]:port[/interface[,interface[,...]]]` * `TS over standard input to executable` Setup by setting the target URL to an executable `ts-exec:PATH` * `TS over SRT` Setup by setting the target URL to an SRT url `srt://[host]:port` * `TS over RIST` Setup by setting the target URL to an RIST url `rist://[host]:port` * `HLS segmented files` Setup by setting the target URL to TS adding a playlist and how to handle segments `/path/to/file/$segmentCounter.ts?index=/path/to/index.m3u8` Note that for URL-based push targets, MistServer will assume that the last '`?`' character in your target URL is the start of your . If your target URL itself should include a '`?`' character this means that you will have to add a second '`?`' character at the end to make sure your target URL is preserved as-is and not parsed by MistServer. Three scheduling parameters are available as optional parameters. These are used schedule recording or pushes in advance. The available scheduling parameters are: * `Schedule time` - The date and time when the recording/push should become active. Note that this only starts the recording process, not the actual recording itself. * `Recording start time` - This is the same option as `recstartunix` listed above. The date and time when the recording/push should start. Note that a keyframe will be required before video playback is possible. * `Complete time` - The date and time when the recording/push will be terminated. * `Based on a variable` - This allows you to use default MistServer or custom variables to decide on pushing logic. Target URL examples[​](#target-url-examples "Direct link to Target URL examples") ---------------------------------------------------------------------------------- In all of the below examples we will assume a whole stream name of 'foo+bar' and a date/time of February 1st, 2018 at 12:34:56 (UTC). As shown in the examples below parameters can be used with any type of target URL. If parameters are repeated only the last repetition will be used. `/media/recording/$stream-$datetime.ts` Records the stream in TS format to the file `/media/recording/foo+bar-2018.02.01.12.34.56.ts`. `/media/recording/$basename/$wildcard.flv` Records the stream in FLV format to the file `/media/recording/foo/bar.flv`. `/media/recording/$year/$month/$day/$stream-$hour$minute$seconds.ts` Records the stream in TS format to the file `/media/recording/2018/02/01/foo+bar-123456.ts`.\\ `/media/recording/$stream.ts?recstartunix=1517490000` Records the stream in TS format to the file `/media/recording/foo+bar.ts` with the data inserted into the stream starting at February 1st, 2018 13:00:00 until either the stream ends or the recording is aborted manually.\\ `/media/recording/$stream.ts?recstopunix=1517490000` Records the stream in TS format to the file `/media/recording/foo+bar.ts` and stops the recording at February 1st, 2018 at 13:00:00.\\ `/media/recording/$stream.ts?recstartunix=1517490000&recstopunix=1517493600` Records the stream in TS format to the file `/media/recording/foo+bar.ts` with the data inserted into the stream between February 1st, 2018 13:00:00 and 14:00:00.\\ `/media/recording/$stream.ts?recstartunix=1517486400&recstopunix=1517490000` Records the stream in TS format to the file `/media/recording/foo+bar.ts` with the data that was inserted into the stream between February 1st, 2018 12:00:00 and 13:00:00, assuming that this section of the stream was still in the buffer at the time (otherwise the biggest part of that duration that still was available in buffers).\\ `/media/recording/$stream.ts?recstart=5000&recstop=65000` Records the stream in TS format to the file `/media/recording/foo+bar.ts` with the data that was inserted into the stream between timestamp 5000 milliseconds and 65000 milliseconds.\\ `/media/recording/$stream.ts?video=h264&audio=aac&subtitle=eng` Records the stream in TS format to the file `/media/recording/foo+bar.ts` while selecting the first available H264 video track, the first available AAC audio track and the first available English subtitle track until stream end or manual abort.\\ `/media/recording/$stream.ts?video=1&audio=2&subtitle=7` Records the stream in TS format to the file `/media/recording/foo+bar.ts` while selecting the first track for video, the second track for audio and the seventh track for the subtitle.\\ `/media/recording/$stream.ts?video=english&audio=english&subtitle=en` Records the stream in TS format to the file `/media/recording/foo+bar.ts` while selecting the first available English track for video, audio and subtitle until stream end or manual abort.\\ `/media/recording/$stream.ts?video=all&audio=&subtitle=all` Records the stream in TS format to the file `/media/recording/foo+bar.ts` while selecting all available tracks for video, audio and subtitle until stream end or manual abort.\\ `/media/recording/$stream.ts?video=all&audio=0&subtitle=0` Records the stream in TS format to the file `/media/recording/foo+bar.ts` while selecting all available tracks for video, while removing all audio and subtitle tracks until stream end or manual abort.\\ `/media/recording/$stream.ts?passthrough=1` Records the stream in TS format to the file `/media/recording/foo+bar.ts` including every track in the stream, even unsupported or unrecognized codecs until stream end or manual abort.\\ `/media/recording/$stream/$segmentCounter.ts?m3u8=../index.m3u8&split=6` Records the stream as a segmented TS playlist. Segments will be stored at `/media/recording/foo+bar/` starting at `1.ts` adding a new segment each 6 seconds. The playlist to play the stream is stored at `/media/recording/index.m3u8` `rtmp://example.com/live/stream01` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application 'live' and stream key 'stream01' until stream end or manual abort.\\ `rtmp://example.com/live/` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application 'live' and stream key 'foo+bar' until stream end or manual abort.\\ `rtmp://example.com:1950/live/$basestream` Pushes out the stream in RTMP format to host 'example.com' using port 1950, application 'live' and stream key 'foo' until stream end or manual abort.\\ `rtmp://example.com/1234567890/stream01` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application '1234567890' and stream key 'stream01' (application can be used as password for streaming to MistServer) until stream end or manual abort.\\ `rtmp://example.com` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application 'default' and stream key 'foo+bar' until stream end or manual abort.\\ `rtmp://example.com/` Pushes out the stream in RTMP format to host 'example.com' using port 1935, a blank application and stream key 'foo+bar' until stream end or manual abort.\\ `rtmp://example.com/live/streamtoken?withaquestionmark?` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application 'live' and stream key 'streamtoken?withaquestionmark' until stream end or manual abort. Adding the extra '?' on the end is something to remember for pushing locations that tend to use '?' in their stream tokens. Youtube and Facebook often have these. `rtmp://example.com/live/stream?01?recstartunix=1517490000` Pushes out the stream in RTMP format to host 'example.com' using port 1935, application 'live' and stream key 'stream?01' starting with the data inserted starting at February first, 2018 at 13:00:00 until stream end or manual abort.\\ `tsudp://example.com:8765` Pushes out the stream in TS format to host 'example.com' using port 8765 selecting the first video and audio track.\\ `tsudp://example.com:8765?recstartunix=1517490000&passthrough=1` Pushes out the stream in TS format to host 'example.com' using port 8765 selecting all tracks even unsupported/unrecognized tracks starting with the data inserted starting at February first, 2018 at 13:00:00 until stream end or manual abort.\\ `srt://example.com:8877?streamid=$basename` Pushes out the stream as SRT towards 'example.com' using port 8877 and setting the streamid to 'foo' until stream end or manual abort. `rist://example.com:8888` Pushes out the stream as RIST towards 'example.com' using port 8888 until stream end or manual abort. * [Automatic push settings](#automatic-push-settings) * [Target URLs and settings](#target-urls-and-settings) * [Target URL examples](#target-url-examples) --- # Statistics Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "statistics" panel - statistics for the last few minutes[​](#the-statistics-panel---statistics-for-the-last-few-minutes "Direct link to The "statistics" panel - statistics for the last few minutes") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Here you can view the live statistics kept by MistServer. Statistics data for inactive sessions is only kept in memory for approximately ten minutes, so any data points older than that will most likely be inaccurate. These statistics are meant mostly as a quick look up. For a complete coverage of stastistics and analytics we recommend the [prometheus integration](/mistserver/integration/prometheus_instrumentation) . * [The "statistics" panel - statistics for the last few minutes](#the-statistics-panel---statistics-for-the-last-few-minutes) --- # Logs Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "logs" panel - view the server log[​](#the-logs-panel---view-the-server-log "Direct link to The "logs" panel - view the server log") ----------------------------------------------------------------------------------------------------------------------------------------- This panel shows a semi-live auto-updating view of the system logs generated by MistServer. The most recent logs are shown at the top of the screen. Only approximately 100 lines of logs are kept in memory, then older entries are thrown away. When running MistServer as a system service, the full logs can usually be found either in: * `/var/mistserver.log` (when running as an init service) * `systemctl -u mistserver` through the system journal (when running as a systemd service). When running MistServer from a console window, the full logs are printed to the console, colour-coded by their type. * [The "logs" panel - view the server log](#the-logs-panel---view-the-server-log) --- # Addprotocol | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### AddProtocol[​](#addprotocol "Direct link to AddProtocol") This call can be used to add outputs, without modifying other outputs. It has two calling variants, each identical in behaviour: //Either...{ "addprotocol": { "connector": "HTTP" //Name of the output to enable //any required and/or optional settings may be given here as "name": "value" pairs inside this object. }}//Or...{ "addprotocol": [ { "connector": "HTTP" //Name of the output to enable //any required and/or optional settings may be given here as "name": "value" pairs inside this object. }, //Multiple outputs may be added simultaneously ]} It's usage is identical to the call "`protocols`" property, but outputs are never deleted or updated when this call is used, only added. A new output will not be added (silently) when it is already configured identically to the newly added protocol. * [AddProtocol](#addprotocol) --- # No_unconfigured_streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### No\_Unconfigured\_Streams[​](#no_unconfigured_streams "Direct link to No_Unconfigured_Streams") This call goes through the active streams on the system and compares that to the currently configured streams on the system. If a stream is either not configured or configured to use a difference source than is currently active, it calls `nuke_stream` on that stream. It is sent as follows: { "no_unconfigured_streams": true // value is ignored} There is no response to this call. * [No\_Unconfigured\_Streams](#no_unconfigured_streams) --- # Deleteprotocol | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### DeleteProtocol[​](#deleteprotocol "Direct link to DeleteProtocol") This call can be used to remove particular outputs, without modifying other outputs. It has two allowed forms, behaving identically: // Either...{ "deleteprotocol": { //the exact configuration of a single output here }}// Or...{ "deleteprotocol": [ { //the exact configuration of a single output here }, //multiple outputs may be deleted simultaneously ]} Only exact matches are deleted. If no exact match is found, the call fails silently. If multiple exact matches are found, all of them are deleted. * [DeleteProtocol](#deleteprotocol) --- # Updateprotocol | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### UpdateProtocol[​](#updateprotocol "Direct link to UpdateProtocol") This call can be used to update particular outputs, without modifying other outputs. It is called in the following form: // Either...{ "updateprotocol": [ { //the exact configuration of a single output here },{ //the newly updated configuration of that same output here } }}\ \ Only exact matches are updated. If no exact match is found, the call fails silently. If multiple exact matches are found, all of them are updated. Afterwards a de-duplicator is run over the configured outputs, deleting any duplicates and preserving only the first identical entry.\ \ * [UpdateProtocol](#updateprotocol) --- # INPUT_ABORT | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)source URI (string)binary name (string)pid (integer)machine-readable reason for exit (string, enum)human-readable reason for exit (string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Every time an Input process exits with an error | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # LIVEPEER_SEGMENT_REJECTED | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | transcode options (json string)raw segment that was rejected (base64 encoded)information about the source track (json string)first attempted broadcaster URLsecond attempted broadcaster URL or the text "N/A" if no secondary was available | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Whenever a segment is rejected by MistProcLivepeer with a 422 status code either twice in a row for different broadcasters, or once with no secondary broadcasters available. | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # LIVE_TRACK_LIST | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)track list (JSON) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | After the list of valid tracks has been updated | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Log | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Log[​](#log "Direct link to Log") These responses provide access to the last 100 lines of MistServer's log. The only way to request these is to not set "`"minimal":1`", in which case it is always sent in the response. The responses look as such: { "log": [ [ 1398978357, //unix timestamp of this log message "CONF", //shortcode indicating the type of log message "Starting connector: {\"connector\":\"HTTP\"}", //string containing the log message itself "" //Optional name of stream the message relates to. Empty if not applicable (i.e. global messages that are not related to a specific stream). ], //the above structure repeated up to 99 more times ]} * [Log](#log) --- # OUTPUT_START | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | connector configuration (JSON) | | Response | ignored | | Response Action | None. | | Stream Specific | false | | When | Before a connector starts listening for connections | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # PROCESS_SWITCH_SOURCE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | sink stream name (string)current source stream name (string)intended new source stream name, after switch (string)Current process timestamp (milliseconds)stream process configuration (JSON) | | Response | always | | Response Action | Overrides the intended new source stream name to the response value. If empty, the source switch is aborted. Aborting a fallback-related source switch will shut down the process, aborting other source switch types will prevent the switch from happening and keep the source attached to the previous source stream. | | Stream Specific | true | | When | Whenever a stream process is about to switch source stream, for any reason | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # OUTPUT_END | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)push target (string)connector / filetype (string)bytes recorded (integer)seconds spent recording (integer)unix time output started (integer)unix time output stopped (integer)total milliseconds of media data recorded (integer)millisecond timestamp of first media packet (integer)millisecond timestamp of last media packet (integer)machine-readable reason for exit (string, enum)human-readable reason for exit (string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | When an output finishes | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # OUTPUT_STOP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | connector configuration (JSON) | | Response | ignored | | Response Action | None. | | Stream Specific | false | | When | Before a connector stops listening for connections | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Clearstatlogs | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### ClearStatLogs[​](#clearstatlogs "Direct link to ClearStatLogs") Sending this request will truncate the log that is sent in responses. It is sent as follows: { "clearstatlog": true //contents ignored} If a log response is sent by the server at the same time this request is responded to, it contains the log before truncating took place. There is no other reply to this request. * [ClearStatLogs](#clearstatlogs) --- # PUSH_END | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | push ID (integer)stream name (string)target URI, before variables/triggers affected it (string)target URI, afterwards, as actually used (string)last 10 log messages (JSON array string)most recent push status (JSON object string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Every time a push stops, for any reason | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # PUSH_OUT_START | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)push target (string) | | Response | when-blocking | | Response Action | A non-empty response will set the push target to the response value. An empty response will abort the push. Variable substitution will still take place. | | Stream Specific | true | | When | Before a push out (to file or other target type) is started | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # RECORDING_END | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)push target (string)connector / filetype (string)bytes recorded (integer)seconds spent recording (integer)unix time recording started (integer)unix time recording stopped (integer)total milliseconds of media data recorded (integer)millisecond timestamp of first media packet (integer)millisecond timestamp of last media packet (integer)machine-readable reason for exit (string, enum)human-readable reason for exit (string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | When a push to file finishes | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # LIVE_BANDWIDTH | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)current bytes per second (integer) | | Response | always | | Response Action | If false, shuts down the stream buffer. | | Stream Specific | true | | When | Every time a new live stream key frame is received | | Argument | Triggers only if current bytes per second exceeds this amount (integer) | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Browse | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Browse[​](#browse "Direct link to Browse") These requests can be used to browse the filesystem. Given a path (relative to the working directory or absolute), it will respond with the full absolute path as well as a list of files and a list of directories inside it. Requests look as follows: { "path": "/path/here" //If empty, the current working directory is assumed} And responses look as follows: { "path": { //The full absolute folder path "path":"/tmp/example" //An array of strings showing all files "files": ["file1.dtsc", "file2.mp3", "file3.exe" ] //An array of strings showing all subdirectories "subdirectories":[ "folder1" ] }} * [Browse](#browse) --- # DEFAULT_STREAM | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | current defaultStream setting (string)requested stream name (string)viewer host (string)output type (string)full request URL (string, may be blank for non-URL-based requests!) | | Response | always | | Response Action | Overrides the default stream setting (for this view) to the response value. If empty, fails loading the stream and returns an error to the viewer/user. | | Stream Specific | true | | When | When any user attempts to open a stream that cannot be opened (because it is either offline or not configured), allows rewriting the stream to a different one as fallback. Supports variable substitution. | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # PUSH_REWRITE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | full current push url (string)connection hostname (string)currently parsed stream name (string) | | Response | when-blocking | | Response Action | If non-empty, overrides the parsed stream name to the response value. If empty, denies the incoming push. | | Stream Specific | false | | When | On all incoming pushes on any protocol, allows parsing the push URL to/from custom formatting to an internal stream name | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Capabilities | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) Capabilities ============ The capabilities call allows collecting data from MistServer on what it is able to do. The response contains basic system information like the current load, CPU power available, memory available, and an estimate on the overall speed of the system. More importantly, the response also contains the list of installed outputs (called connectors internally, for historical reasons) and inputs, as well as their lists of required and optional parameters and what codecs they can handle. To request capabilities to be sent, make a request as follows: { "capabilities": true //Any value is accepted - it is ignored.} The response then looks like this: { "capabilities": { "connectors": { // a list of installed connectors. These are the MistOut* executables. "FLV": { //name of the connector. This is based on the executable filename, with the "MistOut" prefix stripped. "codecs": [ //supported combinations of codecs. [["H264","H263","VP6"],["AAC","MP3"]] //one such combination, listing simultaneously available tracks and the codec options for those tracks. The special character * may be used to indicate any codec. ], "deps": "HTTP", //dependencies on other connectors, if any. "desc": "Enables HTTP protocol progressive streaming.", //human-friendly description of this connector "methods": [ //list of supported request methods { "handler": "http", //what handler to use for this request method. The "http://" part of a URL, without the "://". "priority": 5, // priority of this request method, higher is better. "type": "flash/7" //type of request method - usually name of plugin followed by the minimal plugin version, or 'HTML5' for pluginless. } ], "name": "FLV", //Name of this connector. "optional": { //optional parameters "username": { //name of the parameter "help": "Username to drop privileges to - default if unprovided means do not drop privileges", //human-readable help text "name": "Username", //human-readable name of parameter "option": "--username", //command-line option to use "type": "str" //type of option - "str" or "num" } //above structure repeated for all (optional) parameters }, //above structure repeated, as "required" for required parameters, if any. "url_match": "/$.flv", //String (or array of strings) of URL pattern to match, if any. The $ substitutes the stream name and may not be the first or last character. "url_prefix": "/progressive/$/", //String (or array of strings) of URL prefix to match, if any. The $ substitutes the stream name and may not be the first or last character. "url_rel": "/$.flv", //relative URL where to access a stream through this connector. "push_urls": ["http://*.flv"] //Optional array of URL patterns that can be pushed out by this connector. A connector need not be enabled to be used for push out, being listed in capabilities is enough. } //... above structure repeated for all installed connectors. }, "inputs": { // a list of installed inputs. These are the MistIn* executables. "Buffer": { //Name of the input. This is based on the executable filename, with the "MistIn" prefix stripped. "codecs": [ //supported combinations of codecs [["*"],["*"],["*"]] //one such combination, listing simultaneously available tracks and the codec options for those tracks. The special character * may be used to indicate any codec. ], "desc": "Provides buffered live input", //human-friendly description of this input "name": "Buffer", //Name of this input "optional": {}, //optional parameters. Same format as in the "connectors" structure "required": {}, //required parameters. Same format as the optional parameters. "priority": 9, //When multiple inputs source_match a source, the highest priority input is used. "source_match": "push://*" //String (or array of strings) that is matched against a source parameter to determine if this input should be used. The * character may appear only once, anywhere in the string. } //... above structure repeated for all installed inputs. }, "cpu_use": 500, //Current CPU usage in tenths of percent (i.e. 500 = 50%) "cpu": [ //a list of installed CPUs { "cores": 4, //amount of cores for this CPU "mhz": 1645, //speed in MHz for this CPU "model": "Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz", //model identifier, for humans "threads": 8 //amount of simultaneously executing threads that are supported on this CPU } //above structure repeated for all installed CPUs ], "load": { "fifteen": 72, "five": 81, "memory": 42, "one": 124 }, "mem": { "cached": 1989, //current memory usage of system caches, in MiB "free": 2539, //free memory, in MiB "swapfree": 0, //free swap space, in MiB "swaptotal": 0, //total swap space, in MiB "total": 7898, //total memory, in MiB "used": 3370 //used memory, in MiB (excluding system caches, listed separately) }, "speed": 6580, //total speed in MHz of all CPUs cores summed together "threads": 8 //total count of all threads of all CPUs summed together }} --- # RTMP_PUSH_REWRITE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | full current RTMP url (string)connection hostname (string) | | Response | when-blocking | | Response Action | If non-empty, overrides the full RTMP url to the response value. If empty, denies the incoming RTMP push. | | Stream Specific | false | | When | On incoming RTMP pushes, allows rewriting the RTMP URL to/from custom formatting | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # STREAM_ADD | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)stream configuration (JSON) | | Response | always | | Response Action | If false, does not accept the new stream. | | Stream Specific | true | | When | Before a new stream is configured | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Nuke_stream | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Nuke\_Stream[​](#nuke_stream "Direct link to Nuke_Stream") This call can shut down a running stream completely and/or clean up any potentially left over stream data in memory. It attempts a clean shutdown of the running stream first, followed by a forced shut down, and then follows up by checking for left over data in memory and cleaning that up if any is found. It is sent as follows: { "nuke_stream": "stream name here"} There is no response to this call. * [Nuke\_Stream](#nuke_stream) --- # CONN_CLOSE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)connection address (string)connector (string)request url (string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | After a new connection is closed | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # CONN_OPEN | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)connection address (string)connector (string)request url (string) | | Response | always | | Response Action | If false, rejects the connection. | | Stream Specific | true | | When | After a new connection is accepted | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Addstream | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### AddStream[​](#addstream "Direct link to AddStream") This call can be used to add or update streams, without modifying other streams. An example call: { "addstream": { "streamname_here": {},//contents identical to streams call //multiple streams may be added/updated simultaneously }} It's usage is identical to the [streams call](/mistserver/integration/api/calls/API_streams) , with the following changes: * Streams are never deleted when this call is used, only added or updated. * As such, sending an empty "`addstream`" request will not delete all streams. * The resulting "`streams`" reply from MistServer will not contain all streams, but instead only updated/new streams. To indicate this, a special stream "`"incomplete list":1`" is added to the list of streams. Push stream example with optional parameters { "addstream":{ "streamname_here": { "name": "livestream01", "source": "push://localhost@password", "stop_sessions": false, "DVR": "120000", "cut": null, "debug": null, "fallback_stream": null, "maxkeepaway": null, "resume": null, "segmentsize": "6000", "processes": [] } }} As a reminder, the full list of optional parameters can be found through the [capabilities](/mistserver/integration/api/calls/capabilities) call. * [AddStream](#addstream) --- # Deletestreamsource | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### DeleteStreamSource[​](#deletestreamsource "Direct link to DeleteStreamSource") This call can be used to remove particular streams together with their source files, without modifying other streams. It has three allowed forms, all behaving identically: // Either...{ "deletestreamsource": "streamname_here"}// Or...{ "deletestreamsource": [ "streamname_here", //multiple streams may be deleted simultaneously ]}// Or...{ "deletestreamsource": { "streamname_here": {},//contents ignored //multiple streams may be deleted simultaneously }} This call behaves identically to the "" call, with two exceptions. It does not result in a "streams" reply but does have its own API response, and it additionally attempts to delete the source file of the deleted stream, where possible. The source file is only deleted if there is a single unambiguous source file (e.g. not a HLS playlist or similar, which is multi-file). If the delete succeeded and there is a DTSH header file present, the DTSH header file will be attempted to be deleted as well. The response is in the same form as the request (a plain string, array of strings, or object of strings), where the string for each stream name gives a status response on what action was taken. Currently, possible responses are: * 0: No action taken * 1: Source file deleted * 2: Source file and dtsh deleted * : Stream deleted, source remains * : Stream and source file deleted * : Stream, source file and dtsh deleted The number at te beginning of the string will always be related to the meaning behind it, even in future API updates, but the rest of the string may change in the future. In addition to these guarantees, a negative number will always indicate the stream was removed from the server configuration while a positive number will always indicate the stream wasn't removed from the server configuration (e.g. it was a wildcard-based / temporary / non-configured stream). * [DeleteStreamSource](#deletestreamsource) --- # Config | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Config[​](#config "Direct link to Config") This call allows changing the core server configuration, including enabled outputs and the API port. Requests take the following form: { "config": { //All of the below members are optional, and will only override their currently set values when given. //To unset a value, set it to null, which will activate the default setting. "controller": { //controller settings. Any of these may be left out or null to set the default. "interface": "0.0.0.0", //interface to listen on. Defaults to 0.0.0.0 = all interfaces. "port": 4242, //port to listen on. Defaults to 4242. "username": "root", //username to drop privileges to. Defaults to root. "debug": 3 // Debug level to run entire server under. Defaults to 3 (production level). }, "protocols": [ //enabled outputs (named protocols here for historical reasons) { "connector": "HTTP" //Name of the output to enable //any required and/or optional settings may be given here as "name": "value" pairs inside this object. }, //above structure repeated for all enabled connectors / protocols ], "triggers": { //Pro-only: list of enabled triggers "SOME_TRIGGER": [ { "handler": "/some/handler", //handler of trigger "sync": true, //true if blocking, false otherwise "streams": ["optional", "stream", "list"], //List of streams to trigger for "params": "optional parameters" }, //Or... (deprecated syntax) ["handler", nonblocking, ["optional", "stream", "list"]], //Multiple handlers may be defined, a mixture of the above syntaxes is supported ], //Multiple triggers may be defined. For details, see manual chapter on triggers! }, "serverid": "", //human-readable server identifier "prometheus": "", //Passphrase for prometheus access. When empty, prometheus access is disabled (default). "accesslog": "LOG", //Where to write the access log. When set to LOG, prints to regular log (default). "defaultStream": "" //Global default stream setting, when a requested stream cannot be opened by an output }} Similarly to the call, all enabled outputs must be given at once. To add or remove outputs incrementally, see the "", "" and "" calls. Any/all changed settings will take immediate effect. MistServer will respond as follows: { "config": { "controller": {}, //controller settings, same as in request. "protocols": [ //enabled outputs { "connector": "HTTP" //Name of the output //any required and/or optional settings will be included here as well "online": 1 //0 = offline, 1 = online, 2 = enabled (on demand) }, //above structure repeated for all enabled outputs ], "triggers": {},//Configured trigger list. Same format as in request. "serverid": "", //human-readable server identifier, as configured. "iid": "12345678", //Instance ID. Unique ID for this currently running instance, changes every restart. "time": 1398982430, //Current server unix time. "version": "2.7/Generic_64", //Currently running server version string. "prometheus": "", //Passphrase for prometheus access. "accesslog": "LOG" //Current accesslog storage location. }} * [Config](#config) --- # Config_backup | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Config\_Backup[​](#config_backup "Direct link to Config_Backup") This call can be used to retrieve a full backup of the current system configuration, in the same format as would be written to the config file if the server were to do so right now. Config backup/restore are guaranteed to be executed first, before any other API call is evaluated. If both `config_backup` and `(`config\_restore) are called simultaneously, the backup is executed before the restore. This is to allow for atomically backing up the existing config while overriding it with a complete new config. It is sent as follows: { "config_backup": true //value ignored} The response looks like: { "config_backup": { //Object containing the exact same JSON as the config file would contain when written }} * [Config\_Backup](#config_backup) --- # Config_restore | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Config\_Restore[​](#config_restore "Direct link to Config_Restore") This call can be used to restore a full backup of the current system configuration, in the same format as would be read from the config file if the server were to do boot cleanly right now. Config backup/restore are guaranteed to be executed first, before any other API call is evaluated. If both `config_backup` and `(`config\_restore) are called simultaneously, the backup is executed before the restore. This is to allow for atomically backing up the existing config while overriding it with a complete new config. It is sent as follows: { "config_restore": { //Object containing the exact same JSON as the config file would contain when written }} There is no response to this call. * [Config\_Restore](#config_restore) --- # Save | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Save[​](#save "Direct link to Save") Normally the controller saves the configuration on clean exit or a minute of no configuration changes, so that any temporary configuration changes that were not yet persisted to the configuration file are rolled back in the event of a malfunction. This API request forces an instantaneous safe of the configuration to disk, persisting any changes made without needing to shut down the controller to do so. The requests looks as follows: { "save": true //value is ignored} There is no response. * [Save](#save) --- # CONN_PLAY | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)connection address (string)connector (string)request url (string) | | Response | always | | Response Action | If false, rejects the playback attempt. | | Stream Specific | true | | When | Before a connection first starts playback | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # STREAM_BUFFER | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)buffer state: EMPTY, FULL, DRY or RECOVER (string)buffer health information (only if not EMPTY) (JSON) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Every time a live stream buffer changes state | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # STREAM_PUSH | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)connection address (string)connector (string)request url (string) | | Response | always | | Response Action | If false, rejects the incoming push. | | Stream Specific | true | | When | Before an incoming push is accepted | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # STREAM_READY | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)input type (string) | | Response | always | | Response Action | If false, shuts down the stream input. | | Stream Specific | true | | When | When a stream finished loading and is ready for playback | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Stop_sessions | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Stop\_Sessions[​](#stop_sessions "Direct link to Stop_Sessions") This call will disconnect sessions matching either stream name or protocol requirements. A disconnected session will kill any currently open connections, both input and output. Stream names and protocols are all case-sensitive. There are two special protocols: "`INPUT`" and "`OUTPUT`". The input protocol identifies all sessions currently used as a stream source, while the output protocol identifies all sessions currently used as a console-based output or as an output that is being pulled from elsewhere. This call has several forms, and is requested as follows: //Either...{ "stop_sessions": "streamname" //All sessions for the given stream are stopped}//Or...{ "stop_sessions": [ "streamname", //All sessions for the given stream are stopped //Multiple streams may be stopped simultaneously ]}//Or...{ "stop_sessions": { "streamname": "protocol", //All sessions for the given stream and protocol combination are stopped //Multiple stream+protocol combinations may be given. //An empty streamname will stop all sessions matching only the protocol: "": "protocol" }} There is no response to this call. * [Stop\_Sessions](#stop_sessions) --- # Streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Streams[​](#streams "Direct link to Streams") The streams call allows getting and setting the list of configured streams. It only supports overwriting the entire list at once. _For adding or removing streams incrementally, see the [addstream](/mistserver/integration/api/calls/addstream) and [deletestream](/mistserver/integration/api/calls/deletestream) calls._ To change the list of configured streams, request as follows: { "streams": { "streamname_here": { //name of the stream "source": "/mnt/media/a.dtsc" //stream source // Any optional and/or required parameters for the input of the given source must be supplied here as well }, //the above structure repeated for all configured streams }} See the inputs of the call for more details on the formats allowed for stream sources and their optional/required parameters. Do note that because of the above behaviour, sending an empty streams request will clear all configured streams! The server will respond with a full list of all configured streams, as follows: { "streams": { "streamname_here": { //name of the configured stream "error": "Available", //error state, if any. "Available" is a special value for VoD streams, indicating it has no current viewers (is not active), but is available for activation. "name": "a", //the stream name, guaranteed to be equal to the object name. "online": 2, //online state. 0 = error, 1 = active, 2 = inactive. "source": "/mnt/media/a.dtsc" //source for this stream, as configured. //any optional/required parameters set for the stream, will be present here as well }, //the above structure repeated for all configured streams }} As a reminder, the full list of optional parameters can be found through the [capabilities](/mistserver/integration/api/calls/capabilities) call. * [Streams](#streams) --- # STREAM_LOAD | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string) | | Response | always | | Response Action | If false, prevents loading of stream input. | | Stream Specific | true | | When | Before a stream input is loaded | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Deletestream | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### DeleteStream[​](#deletestream "Direct link to DeleteStream") This call can be used to remove particular streams, without modifying other streams. It has three allowed forms, all behaving identically: // Either...{ "deletestream": "streamname_here"}// Or...{ "deletestream": [ "streamname_here", //multiple streams may be deleted simultaneously ]}// Or...{ "deletestream": { "streamname_here": {},//contents ignored //multiple streams may be deleted simultaneously }} The resulting "`streams`" reply from MistServer will not contain all streams, but instead only updated/new streams. To indicate this, a special stream "`"incomplete list":1`" is added to the list of streams. If no "" call is done at the same time as this call, the streams list will thus be empty. * [DeleteStream](#deletestream) --- # STREAM_REMOVE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string) | | Response | always | | Response Action | If false, prevents removal and reverts to current configuration. | | Stream Specific | true | | When | Before an existing stream is removed | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # API_endpoint | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Api\_Endpoint[​](#api_endpoint "Direct link to Api_Endpoint") This request allows retrieving the current TCP API endpoint configuration, and is read-only. The request looks like this: { "api_endpoint": true //Actual contents ignored, the mere presence of this member is enough} The response is a string as follows: { "api_endpoint": "http://127.0.0.1:4242/"} The response is a full HTTP URL that can be used to access the TCP API port from the local machine, at least. If the API port is bound to a specific interface or address, the correct address will be listed. If the port was changed from the default, the response will reflect this change as well. The mean purpose of this method is to be used over the UDP API to reliably establish the correct means to connect to the TCP API, but it can also be used to retrieve a canonical address for other purposes. When the API is bound to all interfaces ("::" (IPv6) or "0.0.0.0" (IPv4)), it will respond with an appropriate IPv6 or IPv4 localhost address ("::1" or "127.0.0.1"), since the catch-all address cannot be connected to. This means the call is not reliable for external connections, and should only be used to infer information about configuration on the local host. * [Api\_Endpoint](#api_endpoint) --- # Overview Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The "Overview" panel - global server settings[​](#the-overview-panel---global-server-settings "Direct link to The "Overview" panel - global server settings") -------------------------------------------------------------------------------------------------------------------------------------------------------------- This panel gives a summary of the server status. In earlier versions global server settings would be available here too, these are moved to the [general panel](/mistserver/configuration/interface/general) . MistServer will save the current configurations 1 minute after the last configuration edit and upon shut down. Should you wish to force the configuration save right away tick the "force configuration save" checkbox and click the "save" button underneath. ### Version check[​](#version-check "Direct link to Version check") The version check only works for personal builds that are linked to user accounts. The fully open source build of MistServer does not have a version checker. Please keep an eye on our website for new versions! #### For personal builds[​](#for-personal-builds "Direct link to For personal builds") The version check allows you to check if you have the latest version of MistServer and do a rolling update to the newest version available. These rolling updates provide as little interruption to your services as possible, and in most cases will not disconnect anyone from the server in the process. The rolling update updates the currently running MistServer installation by first replacing all the binaries, then restarting any updated outputs with listening sockets. This will not break existing connections (they will remain on the old version). New connections will be handled by the updated version, but there is a window of up to five seconds during which new connections cannot be accepted because the listening socket is temporarily closed. After this the controller itself will reload to the new version if needed. Such a reload can be triggered manually by sending a `USR1` signal to it. * [The "Overview" panel - global server settings](#the-overview-panel---global-server-settings) * [Version check](#version-check) --- # UI_settings | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### UI\_Settings[​](#ui_settings "Direct link to UI_Settings") This request and response can be used to store arbitrary JSON data into MistServer's configuration file. It is intended as a persistent storage for interfaces to safe server-wide settings in. The server itself will ignore any and all data stored using this method. Requests look as such: // To store arbitrary data:{ "ui_settings": { //data to store here. Must be an object. }}//To retrieve without altering:{ "ui_settings": true / any non-object value will work for retrieving} The response is always: { "ui_settings": { //Previously stored data here }} * [UI\_Settings](#ui_settings) --- # STREAM_SOURCE | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string) | | Response | when-blocking | | Response Action | A non-empty response will set the stream source to the response value. An empty response will cause the stream source to not be changed from the normally configured stream source. | | Stream Specific | true | | When | When a stream's source setting is loaded | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # STREAM_UNLOAD | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)input type (string) | | Response | always | | Response Action | If false, aborts the unload and keeps the stream loaded. | | Stream Specific | true | | When | Before a stream input is unloaded | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Stop_sessID | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Stop\_SessID[​](#stop_sessid "Direct link to Stop_SessID") This call will disconnect sessions with matching session ID. The session ID can be retrieved using the trigger, where it is part of the payload. A disconnected session will kill any currently open connections, and, if the trigger is in use, prevent new connections from opening for at least ten seconds. This call has several forms, and is requested as follows: //Either...{ "stop_sessid": "session ID here" //Given session is stopped}//Or...{ "stop_sessid": [ "session ID here", //Given session is stopped //Multiple sessions may be stopped simultaneously ]} There is no response to this call. * [Stop\_SessID](#stop_sessid) --- # Totals | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Totals[​](#totals "Direct link to Totals") Totals requests are analogous to requests over a period of time, and give you the sum of clients active in that period and/or the total average bytes per second transferred in that period, for as many points along the period as possible/feasible. The request looks like this: { "totals": { //array of stream names to accumulate. Empty (or left out) means all. "streams": ["streama", "streamb", "streamc"], //array of protocols to accumulate. Empty (or left out) means all. "protocols": ["HLS", "HSS"], //list of requested data fields. Empty (or left out) means all. "fields": ["clients", "downbps", "upbps"], //unix timestamp of data start. Negative means X seconds ago. Empty (or left out) means earliest available. "start": 1234567 //unix timestamp of data end. Negative means X seconds ago. Empty (or left out) means latest available (usually 'now'). "end": 1234567 }}//Or, when requesting multiple clients responses simultaneously:{ "totals": [ {},//request object as above {}//repeat the structure as many times as wanted ]} The calls are responded to as follows: { "totals": { //unix timestamp of start of data. Always present, always absolute. "start": 1234567, //unix timestamp of end of data. Always present, always absolute. "end": 1234567, //array of actually represented data fields. "fields": [...] // Time between datapoints. Here: 10 points with each 5 seconds afterwards, followed by 10 points with each 1 second afterwards. "interval": [[10, 5], [10, 1]], //the data for the times as mentioned in the "interval" field, in the order they appear in the "fields" field. "data": [[x, y, z], [x, y, z], [x, y, z]] }} In case of the second method, the response is an array of responses like this, in the same order as the requests. * [Totals](#totals) --- # Clients | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Clients[​](#clients "Direct link to Clients") Clients requests allow you to retrieve a list of clients connected at a point in time, and their details. The request looks like this: { "clients": { //array of streamnames to accumulate. Empty (or left out) means all. "streams": ["streama", "streamb", "streamc"], //array of protocols to accumulate. Empty (or left out) means all. "protocols": ["HLS", "HSS"], //list of requested data fields. Empty (or left out) means all. "fields": ["host", "stream", "protocol", "conntime", "position", "down", "up", "downbps", "upbps"], //unix timestamp of measuring moment. Negative means X seconds ago. Empty (or left out) means now. "time": 1234567 }}//Or, when requesting multiple clients responses simultaneously:{ "clients": [ {},//request object as above {}//repeat the structure as many times as wanted ]} Since MistServer collects data continuously and requests might be segmented or sporadic, for most accurate results requestdata slightly in the past (e.g. 20-30 seconds in the past). The more current the data is, the higher the chance that data is incomplete. The calls are responded to as follows: { "clients": { //unix timestamp of data. Always present, always absolute. "time": 1234567, //array of actually represented data fields. "fields": [...] //for all clients, the data in the same order as the "fields" field. "data": [[x, y, z], [x, y, z], [x, y, z]] }} In case of the second method, the response is an array of responses like this, in the same order as the requests. The fields represent: * **host:** IP address of connected user * **stream:** Stream name user is connected to * **protocol:** Protocol user is using to connect * **conntime:** Amount of seconds connection has been active * **position:** Current playback position in seconds user is at in the stream * **down:** Total bytes transferred down * **up:** Total bytes transferred up * **downbps:** Current bytes per second down * **upbps:** Current bytes per second up * [Clients](#clients) --- # Stop_tag | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Stop\_Tag[​](#stop_tag "Direct link to Stop_Tag") This call will disconnect sessions with the given tag. A disconnected session will kill any currently open connections, and, if the trigger is in use, prevent new connections from opening for at least ten seconds. This call has several forms, and is requested as follows: //Either...{ "stop_tag": "tag here" //All sessions with the given tag are stopped}//Or...{ "stop_tag": [ "tag here", //All sessions with the given tag are stopped //Multiple tags may be stopped simultaneously ]} There is no response to this call. * [Stop\_Tag](#stop_tag) --- # Tag_sessID | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Tag\_SessID[​](#tag_sessid "Direct link to Tag_SessID") This call will tag sessions matching the session ID with the given tag. It is not in any way related to [stream tags](/mistserver/integration/api/calls/tag_stream) The session ID can be retrieved using the trigger, where it is part of the payload. This call is requested as follows: { "tag_sessid": { "session ID here": "tag here", //Given session ID is tagged //Multiple sessions may be tagged simultaneously. }} There is no response to this call. If the given session was not found in the session cache, a warning message is sent to the log saying as much. * [Tag\_SessID](#tag_sessid) --- # SYSTEM_START | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | | | Response | always | | Response Action | If false, shuts down the server. | | Stream Specific | false | | When | After MistServer boot | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # MacOS installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### MacOS specific instructions[​](#macos-specific-instructions "Direct link to MacOS specific instructions") First download the MacOS build from our [downloads page](https://mistserver.org/download) . MistServer in MacOS requires permissions to create temporarily files, as such running MistServer as root is recommended. The easiest way to do this is to boot MistController from the `Terminal` using sudo. You can do this by opening the `Terminal`, typing `sudo` and dragging the MistController inside the terminal window. Make sure there is a space between sudo and the file path. You will be promped to enter the root password before you can continue. * [MacOS specific instructions](#macos-specific-instructions) --- # Invalidate_sessions | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Invalidate\_Sessions[​](#invalidate_sessions "Direct link to Invalidate_Sessions") Sending this request will invalidate all the currently active sessions that match. This has the effect of re-triggering the [USER\_NEW](/mistserver/integration/triggers/list/USER_NEW) trigger, allowing you to selectively close some of the existing connections after they have been previously allowed. If the trigger is not used, this API call is still executed but will have no noticeable effect. It has two variants, which behave identically, and can be called as follows: //Either...{ "invalidate_sessions": "streamname" //name of stream to invalidate sessions for}//Or...{ "invalidate_sessions": [ "streamname", //name of stream to invalidate sessions for //multiple streams may be specified simultaneously ]} There is no response to this request, and the effect is immediate. * [Invalidate\_Sessions](#invalidate_sessions) --- # Active_streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Active\_Streams[​](#active_streams "Direct link to Active_Streams") This requests a list of streams that are currently active, and only those. The list includes any wildcard versions of streams as well as temporary streams that may be active. It has two forms: //Either...{ "active_streams": true //Any non-array value will work, value is ignored.}//Or...{ "active_streams": [ //Array of string values of stream properties that are to be retrieved. Possible options are: "clients", //Current count of connected clients (viewers+inputs+outputs) "lastms", //Newest/last (currently) available timestamp in milliseconds "firstms", //Oldest/first requestable timestamp in milliseconds "viewers", //Current viewers count "inputs", //Current inputs count "outputs", //Current outputs count "views", //Total viewer session count since stream start "viewseconds", //Total sum of seconds watched by viewers since stream start "upbytes", //Total bytes uploaded since stream start "downbytes", //Total bytes downloaded since stream start "packsent", //Total packets sent since stream start "packloss", //Total packets lost since stream start "packretrans", //Total packets retransmitted since stream start "zerounix", //Unix time in seconds of timestamp epoch (zero point), if known "health", //Stream health object, identical to payload of STREAM_BUFFER health data "tracks", //Count of currently valid tracks in this stream "status" //Current stream status in human readable format ]}//Or...{ "active_streams": { //Object that describes what information you want. All properties optional. Possible properties are: "fields": [], //array of strings with field names requested, same list as described above is supported "streams": [], //string or array of strings with stream names "stream": "streamname", //string with stream name "longform": true //If set to true, changes output format to long form (defaults to false) }} The form of the response depends on the request form used. //First form:{ "active_streams": ["stream1", "stream2", "stream3", ...]}//Second form:{ "active_streams": { "stream1": [1,0], //the stream properties requested, in the same order as requested. "stream2": [365,0], //the stream properties requested, in the same order as requested. "stream3": [26,0] //the stream properties requested, in the same order as requested. //Etcetera }}//Third form:{ "active_streams":{ "fields":["array", "of", "field", "names"] "data":{ //object containing an array with fields in same order as "fields", for each stream } }}//Third form with "longform" flag set to true:{ "active_streams":{ //object of objects, where each object contains each field with it's corresponding value. For example: "streamname":{ "lastms": xxx, "firstms": yyy, //etc } }} * [Active\_Streams](#active_streams) --- # Stats_streams | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Stats\_Streams[​](#stats_streams "Direct link to Stats_Streams") This requests a list of streams that currently have statistics, and only those. The list includes any wildcard versions of streams as well as temporary streams that may have been. Since the stats window is roughly ten minutes large, this usually includes all streams active in the past approximately ten minutes. It has two forms: //Either...{ "stats_streams": true //Any non-array value will work, value is ignored.}//Or...{ "stats_streams": [ //Array of string values of stream properties that are to be retrieved. Possible options are: "clients", //Current count of connected clients "lastms" //Current timestamp in milliseconds of a live stream. Always zero for VoD streams. ]} The form of the response depends on the request form used. //First form:{ "stats_streams": ["stream1", "stream2", "stream3", ...]}//Second form:{ "stats_streams": { "stream1": [1,0], //the stream properties requested, in the same order as requested. "stream2": [365,0], //the stream properties requested, in the same order as requested. "stream3": [26,0] //the stream properties requested, in the same order as requested. //Etcetera }} * [Stats\_Streams](#stats_streams) --- # STREAM_CONFIG | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)new stream configuration (JSON) | | Response | always | | Response Action | If false, rejects new configuration and reverts to current configuration. | | Stream Specific | true | | When | Every time a stream's configuration changes | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Checkupdate | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### CheckUpdate (deprecated)[​](#checkupdate-deprecated "Direct link to CheckUpdate (deprecated)") Identical to the "" request. In the past, this call updated the internal cache of update data. This now happens automatically and this request has been deprecated as a result. It now behaves identical to the "" request. * [CheckUpdate (deprecated)](#checkupdate-deprecated) --- # Push_start | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Start[​](#push_start "Direct link to Push_Start") This call will instantly start a new push of "`STREAMNAME`" to the given "`URI`". The possible values for "`URI`" can be gathered from the capabilities of the output protocols, and is in the "`push_urls`" field, which may be either a string or array of strings. It is also possible to use various variables inside the `URI`, as detailed in [variable substitution](/mistserver/concepts/variable_substitution) , and there are also URL parameters as detailed in [url parameters](/mistserver/concepts/parameters) . The "`STREAMNAME`" may take any of three forms, representing a full stream name, a partial wildcard stream name, or a full wildcard streamname: * **foo** --- Only the stream named "foo", without a wildcard. * **foo+** --- All streams named "foo" that have a wildcard behind them, but not without wildcard. * **foo+bar** --- Only the stream named "foo" with a wildcard value of "bar". It is requested as follows: //Either...{ "push_start":{ "stream": "STREAMNAME", "target": "URI", }}//Or...{ "push_start":["STREAMNAME", "URI"]} There is no response to this call. * [Push\_Start](#push_start) --- # Push_list | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_List[​](#push_list "Direct link to Push_List") This requests a list of currently active pushes. The request looks like this: { "push_list": true //value is ignored} And is responded to as follows: { "push_list":[ [ID, "STREAMNAME", "URI", "URI", logs, pushstatus], //Etcetera ]} The ID is a unique per-push identifier that can be used to stop the given push (see "`push_stop`" below), the stream name and first `URI` are the values from the original call. The second `URI` is after handling any triggers and/or , which may be identical to the first if neither was applicable. `logs` is a JSON array of log messages applicable o this push. `pushstatus` is a JSON object containing the latest push status (containing output-specific name/value pairs). If an entry is missing, it is no longer running/functional. Thus, all entries are currently active. If this call is done simultaneously with a start push call, it may not yet contain the push as starting a push takes a moment. The same goes for stop push calls. Refreshing a few times afterwards to make sure the push started (or stopped) correctly is advisable. * [Push\_List](#push_list) --- # Push_auto_add | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Auto\_Add[​](#push_auto_add "Direct link to Push_Auto_Add") This call is similar in workings to the "" call (see that call for details), with the following changes: Pushes are only started for currently active (active meaning they have at least one sessions attached to them of any type) streams matching the request, and only if no matching push is already active. As such, duplicate pushes will not be created by this call. Any matching streams that become active in the future, will upon activation also start a push as requested here, until the automatic push is removed again (using the "`push_auto_remove`" call, see below). If a push stops while the stream is still active, it will only be restarted if the current "" behaviour dictates such (by default, it will not be). The behaviour is slightly different if a '`scheduletime`' and/or '`completetime`' are given. The automatic push will activate automatically at the given '`scheduletime`'. If no '`completetime`' is given, the automatic push is removed as soon as it activates (effectively turning the automatic push into a regular push on '`scheduletime`'). If a '`completetime`' is given, it will automatically restart between '`scheduletime`' and '`completetime`' as-needed, and actively kill the push process at '`completetime`' as-needed. After '`completetime`' has passed, the automatic push is automatically removed. Should you want to alter or add the '`scheduletime`' or '`completetime`' of an automatic push after it has been created, this can be done by another '`push_auto_add`' call where identical '`stream`' and '`target`' parameters are given. The push will then update the existing entry and immediately start behaving according to the new values. This method can also be used to remove the parameters after creation. In either case it does not matter if the same form of request is used (array or object form), they can be used interchangeably. It is requested as follows: //Either...{ "push_auto_add":{ "stream": "STREAMNAME", "target": "URI", "scheduletime": 1234567, //Unix timestamp when the push process should be started, optional "completetime": 1234567 //Unix timestamp when the push process should be terminated, optional }}//Or...{ //Same parameters as above, in order //the scheduletime and completetime are both optional "push_auto_add":["STREAMNAME", "URI", 1234567, 1234567]} There is no response to this call. * [Push\_Auto\_Add](#push_auto_add) --- # Push_auto_remove | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Auto\_Remove[​](#push_auto_remove "Direct link to Push_Auto_Remove") This call will stop automatic pushing of matching stream/target combinations. It does not cancel currently active pushes, however. The "`push_stop`" call can be used for that. It has four forms, and is called as follows: //Either...{ "push_auto_remove":{EXACT ENTRY AS USED IN PUSH_AUTO_ADD}}//Or...{ "push_auto_remove":[{EXACT ENTRY AS IN PUSH_AUTO_ADD}, {}, {}, ...] //Multiple entries may be removed simultaneously}//Or...{ "push_auto_remove":"STREAMNAME" //Removes all entries for the given stream name.}//Or...{ "push_auto_remove":["STREAMNAME", "STREAMNAME", "STREAMNAME", ...] //All entries for multiple stream names may be removed at once.} There is no response to this call. * [Push\_Auto\_Remove](#push_auto_remove) --- # Push_auto_list | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Auto\_List[​](#push_auto_list "Direct link to Push_Auto_List") This call returns a list of currently active automatic push entries (which can be used in "`push_auto_remove`" calls). It is called as such: { "push_auto_list": true //value is ignored} And is responded to as follows: { "push_auto_list":[ ["STREAMNAME", "URI"], //Etcetera ]} * [Push\_Auto\_List](#push_auto_list) --- # Push_settings | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Settings[​](#push_settings "Direct link to Push_Settings") This request allows both retrieving and setting the configuration of automatic pushes. There are currently two settings that can be changed: * `wait` --- The amount of time in seconds to wait before restarting a push that stopped or failed, while the corresponding stream is active. If set to zero, a restart is never performed. Default: 0. * `maxspeed` --- The maximum amount of automatic pushes restarted per second. If set to zero, there is no limit. Default: 0. The request looks like this: { "push_settings":{ "wait": 0, //Setting for the wait option. May be left out to not change it. "maxspeed": 0 //Setting for the maxspeed option. May be left out to not change it. //Note: sending an empty object is a forward-compatible way to request the current settings without changing them. }} The response contains the current settings (after applying any changes made through the request): { "push_settings":{ "wait": 0, //Current setting for the wait option. "maxspeed": 0 //Current setting for the maxspeed option. }} * [Push\_Settings](#push_settings) --- # USER_END | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | session identifier (hexadecimal string)stream name (string)connector (string)connection address (string)duration in seconds (integer)uploaded bytes total (integer)downloaded bytes total (integer)tags (string) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Every time a session ends (same time it is written to the access log) | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Proc_list | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Proc\_List[​](#proc_list "Direct link to Proc_List") This requests a list of currently active processes. The request looks like this: //Either...{ "proc_list": "" //value is empty string or non-string value}//Or...{ "proc_list": "streamname"} And is responded to as follows: { "proc_list":{ "pid_of_process": { "source": "source stream name", "sink": "sink stream name", "process": "process name", "logs": [], "terminated": true //Only set if the process has terminated since starting }, //Etcetera }} If the terminated flag is set, this process will not be shown in further calls and is cleared from memory. Until this call is performed, such entries are cached in memory so that short-lived processes can not be missed in between calls. * [Proc\_List](#proc_list) --- # Login | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page First setup[​](#first-setup "Direct link to First setup") ---------------------------------------------------------- If MistServer is completely unconfigured instead of a login you will be met with an account creation panel. Here you'll make an account and decide upon the defaults of MistServer. We always recommend going with the default protocols enabled, but should you wish to make your own selection you can boot MistServer with no protocols enabled at all. Login[​](#login "Direct link to Login") ---------------------------------------- When connecting from a non-local address MistServer will prompt you to log in. This is where you fill in the account information in order to log in. Should you forget your account information the only method to retrieve it is to recreate the account through [MistController commandline parameters](/mistserver/configuration/commandline) . * [First setup](#first-setup) * [Login](#login) --- # Running without installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Running without installation[​](#running-without-installation "Direct link to Running without installation") ------------------------------------------------------------------------------------------------------------- MistServer can be started without installing it, simply by extracting all its binaries to a single folder and executing the MistController. It will by default store its configuration in the current working directory as `config.json`. It will walk you through a first-time setup on the command line, and then start listening for requests as well as make available the API port and configuration interface. Many choose to run MistServer in a screen session during testing or if they do not have root access to the machine MistServer needs to run on. Do note that some of MistServer's automatic error recovery features will not function properly when not running as a system service. * [Running without installation](#running-without-installation) --- # Compile from the source code | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page The source code =============== MistServers source code is available [here](https://github.com/DDVTECH/mistserver) . Dependencies[​](#dependencies "Direct link to 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). Compiling[​](#compiling "Direct link to Compiling") ---------------------------------------------------- We support both [Meson](https://mesonbuild.com/) and [CMake](https://cmake.org/) . 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[​](#compile-flags "Direct link to Compile flags") For an up to date list of compile flags please look at the output of: meson configure Some of the more common compile flags are: | Flag | Default | Description | | --- | --- | --- | | Debug | 4 | Default debug level. Recommended value for development is 4, recommended value for production is 3 | | NOAUTH | false | Disable API authentication entirely (insecure!) | | NORIST | false | Disable RIST support, regardless of the library being present | | NOSRT | false | Disable SRT support, regardless of the library being present | 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 -DNORIST=true -DNOSRT=true The above sets the default debug level to 3, removes the authorization for the browser interface and disables RIST & SRT. ### Meson[​](#meson "Direct link to Meson") Compiling with the defaults is as easy as: meson setup buildmeson compile -C build Compiling with setting compile flags: meson setup build -DDEBUG=3meson compile -C build Then visit the build folder for the newly compiled MistServer binaries. * [Dependencies](#dependencies) * [Compiling](#compiling) * [Compile flags](#compile-flags) * [Meson](#meson) --- # Windows installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Windows specific instructions ============================= Installing MistServer can be done by downloading the installer from our [downloads page](https://mistserver.org/download) and following the instructions. Once installed you can start and stop MistServer through the MistTray application available in your taskbar. 3.4 and up ========== Current 3.4 installs of MistServer under Windows no longer have the MistTray application. The way to boot MistServer under Windows has slightly changed, instead of a MistTray application you will have a `MistServer shell` application to boot through your Windows boot menu. Booting that will show direct console output & have MistServer ready to use. To close this shell please use `ctrl+c` or the cross mark in the top right corner. However note that pressing the cross mark could make you lose your last changes were less than a minute ago. Firewalls & Windows Defender[​](#firewalls--windows-defender "Direct link to Firewalls & Windows Defender") ------------------------------------------------------------------------------------------------------------ By Nature Server software like MistServer is blocked by most Firewall and Defender processes. It is because of this that we recommend running Mistserver in a Linux environment. However should you want to run MistServer on Windows that is possible, you just need to make additional configurations. ### Firewall[​](#firewall "Direct link to Firewall") Windows will most likely have the ports necessary for MistServer blocked off. These ports can be configured, using MistServers defaults would be: * TCP: 1936 (RTMP), 8080 (HTTP), 5554 (RTSP) * UDP: 8889 (SRT) Protocols like WebRTC and RTSP (over UDP) will open a random UDP port. These will most likely not work at all unless you open all UDP ports, please keep this in mind. ### Defender[​](#defender "Direct link to Defender") As MistServer spawns a process per connection there's a good chance that depending on your Windows version the Defender will find this questionable behaviour. Please add the MistServer folder or processes to the exceptions list in order to avoid getting prompted for each connection. * [Firewalls & Windows Defender](#firewalls--windows-defender) * [Firewall](#firewall) * [Defender](#defender) --- # General Panel | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) General Settings ================ The general settings are settings within MistServer that do not fit well within any other specific category. These could be integration options such as the `Prometheus` integration, but also the `human readable name` for the server itself. All options have a help text that should identify their purpose quite easily. Session settings ================ A session within MistServer could be both input and output and can be quite impactful when it comes to identifying viewers or inputs when it comes to Integration. It allows you to fine-tune exactly when a user should be considered a new Session and get hit by any authorization/admission logic. For more details on sessions we recommend looking at our chapter on [sessions](/mistserver/concepts/sessions) . Custom Variables ================ Custom variables allow you to set your own variables within MistServer. These can either be static or dynamic. In most fields where you can fill in text MistServer will allow you to use these variables. A static variable can just be a shorter way to write something down. For example instead of writing a whole path location like `/path/to/media/folder/` you just shorten it to `/$path/`. You can also use it to store a password and avoid accidentally leaking it by visiting a configuration that would use it. A dynamic variable can change depending on your own scripts, which grants you near unlimited freedom in setting things up. A very simple usage would be something simple as calling upon `date +%s` to get the current POSIX time. Load Balancer ============= If the MistServer load balancer is used the given information will be passed along for usage. External Writer =============== This allows you to write your own custom outputs for MistServer using your own scripts. This is quite an advanced usage of MistServer. We recommend reading our article about the [external writer](/mistserver/integration/external_writer) for more information. --- # Autoupdate | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### AutoUpdate[​](#autoupdate "Direct link to AutoUpdate") Sending this request, as follows: { "autoupdate": true //value is ignored} Will trigger a rolling update to the latest version, if an update is available. Does nothing if no updates are available. This request will send the same response as the "" request, and cause "`progress`" to be set to a non-zero value until the update is either complete or has been cancelled due to errors. It is not possible to abort a currently running update through the API. The only way to abort a running update is to send a kill/interrupt signal to the controller, which will then abort at the earliest safe time to do so (which may be mid-update, but will never result in a broken system). * [AutoUpdate](#autoupdate) --- # Linux installation | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page Linux specific instructions =========================== MistServer as a Service[​](#mistserver-as-a-service "Direct link to MistServer as a Service") ---------------------------------------------------------------------------------------------- The easiest method to start with MistServer is to install it through the terminal. There's 2 requirements: * You are running the script as root * `curl` is installed Linux 64-bits[​](#linux-64-bits "Direct link to Linux 64-bits") ---------------------------------------------------------------- Install using: curl -o - https://releases.mistserver.org/is/mistserver_64Vlatest.tar.gz 2>/dev/null | sh Uninstall using: curl -o - https://releases.mistserver.org/uninstallscript.sh 2>/dev/null | sh The configurations are stored in `/etc/mistserver.conf`. Linux 32-bits[​](#linux-32-bits "Direct link to Linux 32-bits") ---------------------------------------------------------------- Install using: curl -o - https://releases.mistserver.org/is/mistserver_32Vlatest.tar.gz 2>/dev/null | sh Uninstall using: curl -o - https://releases.mistserver.org/uninstallscript.sh 2>/dev/null | sh The configurations are stored in `/etc/mistserver.conf`. ARMv7 Linux[​](#armv7-linux "Direct link to ARMv7 Linux") ---------------------------------------------------------- Install using: curl -o - https://releases.mistserver.org/is/mistserver_armv7Vlatest.tar.gz 2>/dev/null | sh Uninstall using: curl -o - https://releases.mistserver.org/uninstallscript.sh 2>/dev/null | sh The configurations are stored in `/etc/mistserver.conf`. ARMv8 64-bits Linux[​](#armv8-64-bits-linux "Direct link to ARMv8 64-bits Linux") ---------------------------------------------------------------------------------- Install using: curl -o - https://releases.mistserver.org/is/mistserver_aarch64Vlatest.tar.gz 2>/dev/null | sh Uninstall using: curl -o - https://releases.mistserver.org/uninstallscript.sh 2>/dev/null | sh The configurations are stored in `/etc/mistserver.conf`. Changing boot options for service scripts[​](#changing-boot-options-for-service-scripts "Direct link to Changing boot options for service scripts") ---------------------------------------------------------------------------------------------------------------------------------------------------- All service scripts attempt to install at `/etc/systemd/system/mistserver.service`. The default install script for systemd looks like this: [Unit]Description=MistServerAfter=network.target[Service]Type=simpleExecStart=/usr/bin/MistController -c /etc/mistserver.confRestart=alwaysRestartSec=2TasksMax=infinityTimeoutStopSec=8ExecStopPost=/bin/bash -c "rm -f /dev/shm/*Mst*"[Install]WantedBy=multi-user.target Simply add the optional [boot parameters](/mistserver/configuration/commandline#list-of-commandline-options) of your choice to the `ExecStart=` line. * [MistServer as a Service](#mistserver-as-a-service) * [Linux 64-bits](#linux-64-bits) * [Linux 32-bits](#linux-32-bits) * [ARMv7 Linux](#armv7-linux) * [ARMv8 64-bits Linux](#armv8-64-bits-linux) * [Changing boot options for service scripts](#changing-boot-options-for-service-scripts) --- # Update | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Update[​](#update "Direct link to Update") These requests can be used to ask MistServer if it is aware of any updates being available. The requests look as such: { "update": true //value is ignored} And responses are as follows: { "update": { "error": "Something went wrong", // Any errors, if they occurred. Optional. "release": "LTS64_99", //The current release name, both before and after update. "version": "1.2 / 6.0.0", //The version string of the latest available version. "date": "January 5th, 2014", //Date that the latest available version became available. "uptodate": 0, //0 if an update is available, 1 if already up to date. "needs_update": ["MistBuffer", "MistController"], //List of binaries that have updated. Controller is guaranteed to be last if it is present in the list. "progress": 1, //Percentage of currently active update progress. Only present when an update is in progress. "MistController": "abcdef1234567890", //md5 sum of latest version of this binary //... all other MD5 sums of binaries follow }} Note that this call only returns cached data, and may be out of date. It refreshes roughly once per hour, as well as directly after each rolling update/reboot. * [Update](#update) --- # SYSTEM_STOP | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | shutdown reason (string) | | Response | always | | Response Action | If false, aborts shutdown. | | Stream Specific | false | | When | Before MistServer shuts down | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Shutdown | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Shutdown[​](#shutdown "Direct link to Shutdown") This request allows triggering a clean shutdown over the API. Since there is no means to restart MistServer afterwards, this command will **only** be honored when it comes from a local interface. The assumption is that when you have access to the local machine itself, you will also have the means to restart MistServer yourself. The request looks like this: { "shutdown": "human-readable reason for shutdown here" //Any type will work, conversion to string happens automatically} The response is a string as follows: { "shutdown": "Shutting down" //When correctly access over a local interface "shutdown": "Ignored - only local users may request shutdown" // When the request is ignored} The given shutdown reason will be logged in MistServer logging output during the shutdown for tracability purposes. * [Shutdown](#shutdown) --- # Tag_stream | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### tag\_stream[​](#tag_stream "Direct link to tag_stream") This request allows you to set a specific tag on a stream. They are not in any way related to [session tags](/mistserver/integration/api/calls/tag_sessid) . A stream tag can be used to automatically start pushes or triggers depending on the tag. Which allows you to set up different workflows for streams in the same wildcard group. For example only adding recording for "some" of the current live streams. The request looks like this: { "tag_stream": { "STREAMNAME":"TAG", // OR "STREAMNAME":["TAG1","TAG2","TAG3"] // More than 1 stream may be tagged simultaneously. // The above two styles may be mixed within the same call. }} There is no response to this call * [tag\_stream](#tag_stream) --- # Push_stop | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### Push\_Stop[​](#push_stop "Direct link to Push_Stop") When this call is used, The given IDs from the "`push_list`" call response (see above) will be stopped. It has two forms, which are as follows: //Either...{ "push_stop": ID}//Or...{ "push_stop":[ID, ID, ID, ...] //multiple IDs may be stopped simultaneously} There is no response to this call. * [Push\_Stop](#push_stop) --- # STREAM_END | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) | | | | --- | --- | | Payload | stream name (string)downloaded bytes (integer)uploaded bytes (integer)total viewers (integer)total inputs (integer)total outputs (integer)viewer seconds (integer) | | Response | ignored | | Response Action | None. | | Stream Specific | true | | When | Every time a stream ends (no more viewers after a period of activity) | | Argument | null | `Response`: Whether a response is required or ignored. If `always` a response is needed to continue, if `ignored` the response will be ignored. `Response Action`: What will happen if the trigger is given a certain response. If the response action is `none` then the trigger cannot directly interrupt the server flow. `Stream Specific` : Whether the trigger applies only to selected streams (or all if none are chosen) or whether it always applies. `When` : The timing of when the trigger activates. `Argument`: If applicable, when the trigger should activate. If you're having issues working with the trigger we recommend reading up on the [Trigger introduction](/mistserver/integration/triggers/) . --- # Untag_stream | MistServer documentation [Skip to main content](#__docusaurus_skipToContent_fallback) On this page ### untag\_stream[​](#untag_stream "Direct link to untag_stream") This request allows you to remove a specific tag on a stream. They are not in any way related to [session tags](/mistserver/integration/api/calls/tag_sessid) . A stream tag can be used to automatically start pushes or triggers depending on the tag. Which allows you to set up different workflows for streams in the same wildcard group. For example only adding recording for "some" of the current live streams. The request looks like this: { "untag_stream": { "STREAMNAME":"TAG", // OR "STREAMNAME":["TAG1","TAG2","TAG3"] // More than 1 stream may be untagged simultaneously. // The above two styles may be mixed within the same call. }} There is no response to this call * [untag\_stream](#untag_stream) ---