Configuration
Settings are stored in /usr/local/antmedia/conf/scotty.properties as YAML. You can edit
the file directly or use the web UI.
Changes to configuration can be applied without restarting AntMedia Server using the hot reload
feature (Dashboard → “Reload Configuration” button or POST /rest/scotty/reload). Active
streams continue with their existing configuration; new streams use the reloaded settings.
Example configuration
licenseKey: "YOUR-LICENSE-KEY"
mode: both
ssaiTagFormat: EXT_X_CUE_OUT_IN
# SGAI — Apple HLS Interstitials
sgaiAdAssetUri: "https://ads.example.com/ad.m3u8"
sgaiResumeOffset: 0
sgaiRestrict: "SKIP,JUMP"
applications:
LiveApp:
mode: ssai
WebRTCAppEE:
mode: both
sgaiAdAssetUri: "https://ads.example.com/special.m3u8"
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.
Global settings
These settings apply to all applications unless overridden at the application level.
Key |
Description |
Default |
|---|---|---|
|
Your Scotty license key. |
— |
|
Ad-insertion mode: |
|
|
SSAI HLS tag format (see SSAI tag formats below). |
|
|
URI for the ad asset playlist used in SGAI mode. The placeholders |
— |
|
|
|
|
Comma-separated |
|
SSAI tag formats
The ssaiTagFormat setting controls which HLS tags Scotty injects for SSAI:
Value |
Tags injected |
|---|---|
|
|
|
|
|
|
Per-application settings
These go under applications.<appName>. Any setting not specified falls back to the global
value, then to the built-in default.
Key |
Description |
Default |
|---|---|---|
|
Override the ad-insertion mode for this application: |
(global) |
|
Override the SSAI tag format for this application. |
(global) |
|
Override the SGAI ad asset URI for this application. Supports |
(global) |
|
Override the |
(global) |
|
Override the |
(global) |
Per-stream settings
Within an application block you can define streamNameTemplates to apply different settings
to individual streams based on their stream ID. Keys are Java regular expressions matched
against the full stream ID; the first matching pattern wins.
applications:
LiveApp:
mode: both # default for all streams in this app
sgaiAdAssetUri: "https://ads.example.com/default.m3u8"
streamNameTemplates:
"^sports-.*": # streams whose ID starts with "sports-"
sgaiAdAssetUri: "https://ads.example.com/sports.m3u8"
".*-test$": # streams whose ID ends with "-test"
mode: ssai
Any per-application setting can be overridden inside a stream template. Settings absent from the matching template fall back to the application-level value, then to the global value.
Behaviour |
Detail |
|---|---|
Order matters |
Patterns are evaluated top-to-bottom; the first match is used. |
Full-string match |
The regex must match the entire stream ID. Anchors |
Runtime behaviour |
Stream templates are resolved when a stream starts. Changing templates requires a configuration reload; streams already in progress retain their original settings until they are restarted. |
Overridable settings per stream template
All per-application settings can appear inside a stream template:
mode, ssaiTagFormat, sgaiAdAssetUri, sgaiResumeOffset, sgaiRestrict.