Environment variables

common parameters

SUBSTANCE_SOURCE

string

The URL from which the source playlist without subtitles is pulled by SubStance. If the stream is not available, the service exits with error.

The source playlist file extension determines whether substance will run an HLS or DASH workflow.

required

SUBSTANCE_OUTPUT

string

The URL where the updated playlist, as well as generated subtitles segments are pushed by SubStance.

For instance:
- DASH: when SUBSTANCE_OUTPUT=https://host:port/path/master_updated.mpd, then master_updated.mpd and all *.m4s subtitle segments it references are pushed to https://host:port/path/.
- HLS: when SUBSTANCE_OUTPUT=https://host:port/path/master_updated.m3u8, then master_updated.m3u8 and all *.m4s subtitle segments it references are pushed to https://host:port/path/.

The output playlist format must match the source format. The source playlist file extension determines whether substance will run an HLS or DASH workflow. An HLS workflow produces .m3u8 playlists and subtitles in WebVTT format. A DASH workflow produces .mpd playlists and subtitles in TTML format.

required

SUBSTANCE_SUBTITLE_DELAY

int

The delay configuration, in seconds, to align subtitles display with the media timeline.
If subtitles are displaying too early compared to the audio, this value must be increased in order to add delay to the subtitles.
If subtitles are displaying too late, this value must be decreased (eg. changing from -10 to -20 is decreasing the value).

required

SUBSTANCE_GLOBAL_DELAY

int

Adds delay to the updated live stream edge. This basically instructs the HLS or DASH player to delay playback, to ensure the subtitles are available.
If subtitles are available too late, pulling the player’s playhead slightly back in time, or pausing the player for some time and then resuming, should display them as expected. If so, then it is a clear sign that global delay should be increased.

optional - Default: 0

SUBSTANCE_SEGDUR_MS

int

The subtitle segment duration, in milliseconds. This value must match the duration of the source video and audio segments duration.
The default value

optional - Default: 2000

SUBSTANCE_EBUTT_SEQUENCE_ID

string

The sequence IDof the EBU-TT Live subtitle documents at which the websocket ingest endpoint will be expecting subtitles.

optional - default: ebu-tt

SUBSTANCE_SSL_CERT

string

Path to the certificate to use for secured websocket. If undefined, a regular unsecured websocket server
is used.

optional - default: undefined

SUBSTANCE_SSL_KEY

string

Path to the private key to use for secured websocket. If undefined, a regular unsecured websocket server
is used.

optional - default: undefined

SUBSTANCE_WS_PORT

SUBSTANCE_WS_PORT

string

Configure the port number to be used for websocket.

optional - default: 9998

SUBSTANCE_DISPLAY_NAME

string

The name to be used to represent the subtitles added to the stream.

Note that MPEG-DASH mandates an unsigned integer.

optional - Default to "subtitle" for HLS and "900" for DASH.

SUBSTANCE_BASEURL_SUB

string

The URL from which artifacts produced by SubStance (eg. subtitles, edited playlists) will be available for playback.

optional - Default: "."

SUBSTANCE_TIMESHIFT_BUFFER

float

Value in seconds. By default Substance attempts to remove the subtitle segments on the CDN by calling the http DELETE method on the segments. This setting allows configuring this behavior. A value of 0 effectively disables subtitle segments deletion in substance. A value of -1 uses the source playlist to configure the delay after which the segments should be disabled.
The implementation is slightly different for HLS and DASH: when processing a live DASH stream, Substance supports configuring a custom value. when processing an HLS live stream, Substance only supports 0/-1 and other values result in an error.

optional - Default: -1

SUBSTANCE_REMOVE_SOURCE_SUBDIRS

boolean

Sub-folders from the source will not be added to the destination. This is needed for Akamai entry point detections when using subfolders.
Take care it may lead to URL collisions if misused.

optional - Default: 0

SUBSTANCE_PASSTHROUGH

boolean

When enabled - SUBSTANCE_PASSTHROUGH=1 - this option disables any format conversion and delay adjustment. The payload sent over websocket is inserted as is in the output segments.

optional - Default: 0