.. _Configuration: Configuration ============= Settings are stored in ``/usr/local/antmedia/conf/scout.properties`` as YAML. You can edit the file directly or use the :ref:`web UI `. Changes to configuration can be applied without restarting AntMedia Server using the hot reload feature (Dashboard → "Reload Configuration" button or ``POST /rest/scout/reload``). Active streams continue with their existing configuration; new streams use the reloaded settings. Example configuration --------------------- .. code-block:: yaml licenseKey: "YOUR-LICENSE-KEY" delivery: headers scope: both # MQA — per-stream settings are via the REST API; only the VMAF model path goes here # cmsdVmafModelPath: "" # Telemetry / Prometheus (Standard tier+; enabled by default) prometheusEnabled: true prometheusPort: 9090 prometheusPath: /metrics # MQA REST ingest (Standard tier+; disabled by default) restApiEnabled: false restApiPort: 8090 # Quality alerting (Enterprise tier; disabled by default) alertingEnabled: false alertingWebhookUrl: "" vmafThreshold: 70 applications: LiveApp: delivery: headers scope: both VodApp: delivery: both scope: manifests The plugin only activates for applications that appear under ``applications:``. The application name must match the AntMedia webapp context name exactly (case-sensitive). An application is enabled when it has an entry under ``applications:`` and disabled when that entry is absent. Using the web UI to disable an application removes its entry from the file. CMSD settings ------------- These settings control how CMSD-Static data is injected. They can be set globally and overridden per-application (see :ref:`Per-application settings`). .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``licenseKey`` - Your Scout license key (see :ref:`License`). - — * - ``delivery`` - Where CMSD-Static data is injected: ``headers``, ``tags``, or ``both`` (see :ref:`Delivery modes` below). - ``headers`` * - ``scope`` - Which request types receive CMSD data: ``manifests``, ``segments``, or ``both`` (see :ref:`Scope` below). - ``both`` .. _Delivery modes: Delivery modes ^^^^^^^^^^^^^^ The ``delivery`` setting controls how CMSD-Static data is surfaced on each response: .. list-table:: :widths: 20 80 :header-rows: 1 * - Value - Behaviour * - ``headers`` - Adds a ``CMSD-Static:`` HTTP response header formatted as an RFC 8941 Dictionary, e.g. ``CMSD-Static: br=500, ot=m, sf=h, st=l``. * - ``tags`` - For ``.m3u8`` manifests: inserts ``#EXT-X-CMSD-STATIC:`` on the line after ``#EXTM3U``. For ``.mpd`` manifests: inserts a ```` element with ``schemeIdUri="urn:mpeg:dash:cmsd:2020"`` as the first child of ````. No body modification is applied to segments. * - ``both`` - Applies both ``headers`` and ``tags`` behaviour simultaneously. .. _Scope: Scope ^^^^^ The ``scope`` setting limits which request types receive CMSD data: .. list-table:: :widths: 20 80 :header-rows: 1 * - Value - Behaviour * - ``manifests`` - Only ``.m3u8`` and ``.mpd`` requests are annotated. * - ``segments`` - Only ``.ts`` and ``.m4s`` requests are annotated (header only — body injection is skipped for segments). * - ``both`` - All four file types are annotated. .. _CMSD keys: CMSD keys --------- Scout emits up to five CMSD-Static keys per response. Keys that cannot be resolved are omitted; the output remains valid with a partial key set. .. list-table:: :widths: 10 20 70 :header-rows: 1 * - Key - Type - Description * - ``d`` - Integer (ms) - Content duration in milliseconds. Currently emitted for VOD manifests only when the duration can be determined. * - ``br`` - Integer (kbps) - Encoded video bitrate. Resolved first from the ``_kbps`` suffix in the filename (e.g. ``stream_500kbps.ts``), then from cached encoder settings populated when the stream starts. * - ``ot`` - Token - Object type: ``m`` (manifest), ``i`` (init segment), ``v`` (video/muxed TS), ``a`` (audio fMP4), ``av`` (muxed fMP4). * - ``sf`` - Token - Streaming format: ``h`` (HLS), ``d`` (DASH). * - ``st`` - Token - Stream type: ``l`` (live), ``v`` (VoD). MQA settings ------------ Per-stream MQA configuration (enabling PSNR / SSIM / VMAF per stream) is done via the REST API — see :ref:`MQA`. The only plugin-level MQA setting is the VMAF model path. .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``cmsdVmafModelPath`` - Absolute path to a custom libvmaf ``.json`` model file. Leave blank to use the built-in ``vmaf_v0.6.1`` model. Only relevant when libvmaf is present in the bundled FFmpeg (see :ref:`MQA`). - (built-in model) Telemetry settings ------------------ Scout exposes a Prometheus metrics endpoint for per-stream quality scores. This feature requires a **Standard** or higher license and starts automatically when ``prometheusEnabled`` is true (the default). See :ref:`Telemetry` for the full metrics reference. .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``prometheusEnabled`` - Enable the Prometheus metrics HTTP endpoint. - ``true`` * - ``prometheusPort`` - TCP port the Prometheus endpoint listens on. - ``9090`` * - ``prometheusPath`` - HTTP path for the metrics endpoint. - ``/metrics`` MQA REST ingest settings ------------------------ Scout can accept MQA scores pushed by an external encoder or quality-assessment tool. Injected scores feed the Prometheus endpoint and quality alerts (they do **not** appear in the ``CMSD-MQA`` response header, which is populated from on-device computed scores only). This feature requires a **Standard** or higher license and is **disabled by default**. See :ref:`MQA` for the ingest API reference. .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``restApiEnabled`` - Enable the MQA REST score-ingest endpoint. - ``false`` * - ``restApiPort`` - TCP port the ingest endpoint listens on. - ``8090`` Alerting settings ----------------- Scout can send webhook alerts when stream quality degrades below a configurable VMAF threshold. This feature requires an **Enterprise** license and is **disabled by default**. See :ref:`Alerting` for details. .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``alertingEnabled`` - Enable quality alerting. - ``false`` * - ``alertingWebhookUrl`` - URL to POST alert payloads to. Required when alerting is enabled. - (none) * - ``vmafThreshold`` - VMAF score below which an alert fires (0–100). - ``70`` .. _Per-application settings: Per-application settings ------------------------ These go under ``applications.``. Any setting not specified falls back to the global value, then to the built-in default. Telemetry, alerting, and MQA ingest settings cannot be overridden per-application — they apply globally. .. list-table:: :widths: 30 55 15 :header-rows: 1 * - Key - Description - Default * - ``delivery`` - Override the delivery mode for this application: ``headers``, ``tags``, or ``both``. - (global) * - ``scope`` - Override the scope for this application: ``manifests``, ``segments``, or ``both``. - (global)