YAML Templates and Overrides

You don’t always have to build your workflows by hand in the UI. Norsk Studio lets you save workflows as YAML templates, so you can reuse, share, and version them just like code.

A YAML template describes your workflow components (inputs, processors, outputs), their configuration, and how they are connected.

Why Overrides?

Sometimes you’ll want to run the same workflow with slightly different settings — for example:

  • Different bitrates or frame rates.

  • Changing ports or credentials for inputs.

  • Switching between HD and SD ladders.

Instead of duplicating entire YAML templates, you can create a YAML override file. This file only specifies the changes, which are merged with the base template when the workflow starts.

Example

Here’s a simple workflow template with an SRT input, an ABR ladder processor, and an LL-HLS output:

components:
  - type: input.srt-listener
    config:
      displayName: SRT Input
      port: 5001
      host: 0.0.0.0
      id: srt_input
    subscriptions: []
  - type: processor.fixedLadder
    config:
      displayName: ABR Ladder
      rungs:
        - name: h264_1280x720
          software:
            width: 1280
            height: 720
            codec:
              type: x264
              bitrateMode:
                value: 2500
                mode: abr
            frameRate: { frames: 25, seconds: 1 }
      id: abr_ladder
    subscriptions:
      - source: srt_input
  - type: output.autoCmaf
    config:
      displayName: LL-HLS
      id: ll-hls
    subscriptions:
      - source: abr_ladder

Now let’s say we want to test at 50fps instead of 25fps, and add a 1080p rung. Instead of editing the base template, we can create an override file:

FIXEDLADDER_0_RUNGS:
  - name: h264_1920x1080
    software:
      width: 1920
      height: 1080
      codec:
        type: x264
        bitrateMode:
          value: 5000
          mode: abr
      frameRate: { frames: 50, seconds: 1 }
  - name: h264_1280x720
    software:
      width: 1280
      height: 720
      codec:
        type: x264
        bitrateMode:
          value: 2500
          mode: abr
      frameRate:
        frames: 50,
        seconds: 1

Running with Overrides

STUDIO_DOCUMENT and STUDIO_DOCUMENT_OVERRIDES are environment variables on Studio itself. Under Norsk CTL you set them with an overrides file — a small Docker Compose fragment naming only the environment you want to add to the studio service:

# /etc/norsk/50fps.yml
services:
  studio:
    environment:
      STUDIO_DOCUMENT: data/studio-save-files/02-SRT-to-HLS-Ladder.yaml
      STUDIO_DOCUMENT_OVERRIDES: data/studio-save-files/srt-hls-ladder-50fps.yaml

Then name that file when you launch the instance:

norsk-ctl instance launch-template my-studio \
  --template studio-examples \
  --overrides /etc/norsk/50fps.yml

Norsk Studio will load the base template, apply the overrides, and start the workflow with your updated configuration.

--overrides can be repeated, and later files win key by key — useful for keeping one shared file alongside a per-event one. The file may only set environment and env_file on services the instance already runs; anything else is refused at launch rather than silently ignored.

For the wider picture — per-service environment, credentials kept out of the daemon’s database — see Set environment variables in the Norsk CTL documentation.