Configuration and command-line arguments

Configuration and command-line

Typically ew-hlsingest is run as a systemd service with command-line arguments specified in /usr/lib/systemd/system/ew-hlsingest.service.

In can also be started from the command-line.

Command-line arguments

ew-hlsingest -h
Usage of ew-hlsingest:
  -cfg string
    	Config file (default "/etc/edgeware/ew-hlsingest/config.json")
    	Print default configuration
  -logFormat string
    	Format and type of log: [consolejson consolepretty journald discard] (default "consolepretty")
  -logLevel string
    	log level (default "trace")
    	Get version, date, and possible expiration date

Configuration parameters

The configuration file, in the location specified as above, controls the service.

Review note: generate JSON-schema

This is an example configuration with two channels:

  "outDir": "/tmp/ew-hlsingest",
  "startCatchup": 20,
  "logFormat": "journald",
  "logLevel": "info",
  "maxAdBreakDuration": 600,
  "channels": [
           "name": "ch1",
           "url": "",
           "configID": 0,
           "maxBandwidth": 100000000,
           "liveWindowS": 180,
           "logLevel": "info"
           "name": "ch2",
           "url": "",
           "configID": 0,
           "maxBandwidth": 100000000,
           "liveWindowS": 180,
           "logLevel": "info"

Some fields may need clarification:

maxAdBreakDuration Sometimes upstreams may fail to insert ad-break-end-markers (i.e. #EXT-X-CUE-IN) After the specified duration inside an ad-break ew-hlsingest will insert an end-marker.

maxBandwidth variants with bitrates above this threshold will be dropped from the output

configID allows the “downstream” CBM to distinguish between channel configurations. For example if maxBandwidth is modified the number output variants change, and configID must be incremented.

Review note: part of defaultconfig and internal struct, never referenced, remove! startCatchup

Review note: maxAdBreakDuration [etc] should have Sin its name to clarify unit

Configuration updates

Channels can be modified/added/removed without restarting the service. Any modification to the configuration file are automatically detected, and channels will be restarted/started/stopped accordingly. Changes not directly related to the service itself, such as logLevel, will not trigger a restart.