Metadata Operators
The following metadata operators can be applied to a video
, audio
or subtitle
stream.
detach
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.
Property | Type | Description |
---|---|---|
type | string | Four character code identifying the type of metadata to detach. |
root | string | Four character code identifying the root element. |
filter | object | A 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
attach
The attach
operator inserts a specific type
of metadata into a media stream. The metadata is inserted into a specific root
element.
Property | Type | Description |
---|---|---|
type | string | Four character code identifying the type of metadata to attach. |
root | string | Four character code identifying the root element. |
filter | object | A 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
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
oraudio
stream - convert a
subtitle
stream to the equivalent caption or teletext metadata and inject that metadata into avideo
stream
Property | Type | Description |
---|---|---|
name | string | Identifies the input stream to merge. |
filter | array | A list of filters that are applied to the named stream before the metadata is merged. |
combine | object | Combines 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"
}
}
]
}
]
}
}
Updated about 1 year ago