Configuration File
When starting the ew-cmaf-ingest service, a configuration file may be provided. This file enables starting ew-cmaf-ingest service with predefined general configuration and channels information. These items can also be added and updated via the manually configured REST API when the service is running.
If a path to a configuration is set, any change of the configuration, such as auto-configured channels or manual configuration changes, results in the complete configuration information being written to a file at that path. On the restart, an existing file at this path is used to restore the last dynamic configuration.
If a configuration file does not exist at the specified path, a new file with empty content will be created. If the file is empty, the current configuration will be written to it.
JSON Schema for configuration file
The JSON schema below provides a description of the schema and the parameters that applies to configuration file for ew-cmaf-ingest.
{
"defaultUser": {
"description": "Default username for all channels",
"type": "string"
},
"defaultPassword": {
"description": "Default password for all channels",
"type": "string"
},
"autoConfig": {
"description": "AutoConfig is a flag that enables or disables automatic configuration. Default is true",
"type": "boolean"
},
"Channels": {
"description": "Channels for ew-cmaf-ingest at startup",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Unique channel name",
"type": "string"
},
"startNr": {
"description": "The start number for the first segment. Default is 0",
"type": "integer"
},
"authUser": {
"description": "The username for the channel to authenticate. If not set, the default username will be used",
"type": "string"
},
"authPassword": {
"description": "The password for the channel to authenticate. If not set, the default password will be used",
"type": "string"
},
"timeShiftBufferDepthS": {
"description": "The timeShiftBufferDepth in seconds for circularBuffer. Default is 90s",
"type": "integer"
},
"receiveNrRawSegments": {
"description": "The number of raw segments to receive before starting to process. Default is 0",
"type": "integer"
},
"reps": {
"description": "The Representations for the channel",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Unique representation name",
"type": "string"
},
"language": {
"description": "The language for the representation",
"type": "string"
},
"role": {
"description": "The role for the representation",
"type": "string"
},
"displayName": {
"description": "The display name for the representation",
"type": "string"
},
"bitrate": {
"description": "The bitrate for the representation",
"type": "integer"
},
"ignore": {
"description": "The Ignore means that the representation should be ignored",
"type": "boolean"
}
}
}
},
"ignore": {
"description": "The Ignore means that the channel should be ignored",
"type": "boolean"
}
}
}
},
"DisabledChannels" {
"description": "DisabledChannels is a list of channel names that should be disabled or blocked",
"type": "array"
}
}
Example configuration
An example configuration file for two channels where all assets have relative paths may look like:
{
"defaultUser": "admin",
"defaultPassword": "password123",
"autoConfig": true,
"Channels": [
{
"name": "channel_test_1",
"startNr": 0,
"authUser": "admin",
"authPassword": "password123",
"timeShiftBufferDepthS": 90,
"receiveNrRawSegments": 0,
"reps": [
{
"name": "track1",
"language": "en",
"role": "main",
"displayName": "track1",
"bitrate": 1000000,
"ignore": false
},
{
"name": "track2",
"language": "vie",
"role": "alternative",
"displayName": "track2",
"bitrate": 16000000,
"ignore": true
}
],
"ignore": false
},
{
"name": "channel_test_2",
"startNr": 1,
"authUser": "admin",
"authPassword": "password123",
"timeShiftBufferDepthS": 90,
"receiveNrRawSegments": 0,
"reps": [
{
"name": "track1",
"language": "swe",
"role": "description",
"displayName": "track1",
"bitrate": 8000000,
"ignore": false
}
],
"ignore": true
}
]
"DisabledChannels": [
"channel_test_2",
"channel_test_3"
]
}