Metadata Operators

The following metadata operators can be applied to a video, audio or subtitle stream.

OperatorTypeDescription
detachobjectExtracts metadata from a media stream.
attachobjectInserts metadata into a media stream.
mergeobjectMerges metadata from another media stream.

detach

The detach operator extracts a specific type of metadata from a media stream. If a root is specified the metadata is extracted from that element type, otherwise the operator searches all root elements.

PropertyTypeDescription
typestringFour character code identifying the type of metadata to detach.
rootstringFour character code identifying the root element.
filterobjectA filter that is applied to the stream after the metadata is dettached.

For example the following will extract c708 metadata (CEA-708 captions) from the a72c metadata (ATSC A72 SEI messages):

---
input:
  container:
  - name: input1
    video:
    - name: v1
      detach:
      - type: 'c708'
        root: 'a72c'
{
  "input": {
    "container": [
      {
        "name": "input1",
        "video": [
          {
            "name": "v1",
            "detach": [
              {
                "type": "c708",
                "root": "a72c"
              }
            ]
          }
        ]
      }
    ]
  }
}

attach

The attach operator inserts a specific type of metadata into a media stream. The metadata is inserted into a specific root element.

PropertyTypeDescription
typestringFour character code identifying the type of metadata to attach.
rootstringFour character code identifying the root element.
filterobjectA filter that is applied to the stream before the metadata is attached.

For example the following copies c708 metadata (CEA-708 captions) from the input rd11 element (SMPTE RDD11 Ancillary Data) to the output a72c element (ATSC A72 SEI messages):

---
input:
  container:
  - name: input1
    video:
    - name: v1
      detach:
      - type: 'c708'
        root: 'rd11'
output:
  container:
  - name: output1
    type: 'mp4 '
    video:
    - route:
        name: v1
      attach:
      - type: 'c708'
        root: 'a72c'
{
  "input": {
    "container": [
      {
        "name": "input1",
        "video": [
          {
            "name": "v1",
            "detach": [
              {
                "type": "c708",
                "root": "rd11"
              }
            ]
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output1",
        "type": "mp4 ",
        "video": [
          {
            "route": {
              "name": "v1"
            },
            "attach": [
              {
                "type": "c708",
                "root": "a72c"
              }
            ]
          }
        ]
      }
    ]
  }
}

merge

The merge operator combines the metadata from a source input stream with the metadata in the target input or output stream. This operator is used to:

  • inject the metadata from a "sidecar" container into a video or audio stream
  • convert a subtitle stream to the equivalent caption or teletext metadata and inject that metadata into a video stream
PropertyTypeDescription
namestringIdentifies the input stream to merge.
filterarrayA list of filters that are applied to the named stream before the metadata is merged.
combineobjectCombines multiple subtitle streams (typically containing different languages) into a single stream. The combined subtitle stream is then merged as metadata (typically captions or teletext) into the target stream.

For example the following merges sidecar HDR10+ metadata:

---
input:
  container:
  - name: hdr10plus
    video:
    - name: metadata
  - name: media
    video:
    - name: picture
      merge:
        name: metadata
{
  "input": {
    "container": [
      {
        "name": "hdr10plus",
        "video": [
          {
            "name": "metadata"
          }
        ]
      },
      {
        "name": "media",
        "video": [
          {
            "name": "picture",
            "merge": {
              "name": "metadata"
            }
          }
        ]
      }
    ]
  }
}