Caption and Subtitle Filters

Transform has extensive support for captions and subtitles. Captions and subtitle both represent timed text but differ in the following way:

  • Captions are carried as metadata attached to the samples in a video stream.
  • Subtitles are carried as a separate stream independent of the video and audio.

Format Conversion

Transform supports a broad range of Subtitle Formats. A subtitle stream can be converted to a different format using the ciem subtitle converter. For example the following composition will convert DVB Teletext dvbt to WebVTT vtt format:

---
input:
  container:
  - name: input1
    video: []
    audio: []
    subtitle:
    - name: s1
output:
  container:
  - type: 'vtt '
    name: output1
    subtitle:
    - route:
        name: s1
      filter:
      - type: ciem
        properties:
          OutputFormat: 'vtt '
{
  "input": {
    "container": [
      {
        "name": "input1",
        "video": [],
        "audio": [],
        "subtitle": [
          {
            "name": "s1"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "type": "vtt ",
        "name": "output1",
        "subtitle": [
          {
            "route": {
              "name": "s1"
            },
            "filter": [
              {
                "type": "ciem",
                "properties": {
                  "OutputFormat": "vtt "
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

The ciem subtitle converter supports the following properties:

PropertyTypeDescription
OutputFormatstringSubtitle format as a four character code.
CaptionRetimeRatenumberSpecifies the rate multiplier applied to caption and subtitle times. For example a rate of 1.001 compensates for drop frame.
CaptionOffsetTimenumberSpecifies the offset (in seconds) applied to caption and subtitle times.
CaptionRetimeStartTimenumberSpecifies the start time (in seconds) of the retimed captions and subtitles.
CaptionRippleTimecodenumberSpecifies the offset (in seconds) applied to caption and subtitle timecode values.
CaptionOutputFrameRatenumberSpecifies the output frame rate for captions and subtitles.
CaptionOutputDropFramebooleanIndicates whether timecode values should be specified in drop frame format.
StartingTimecodeModeintegerSpecifies the mode use to convert caption and subtitle timecode values to 0 based times:
0 Subtract the value of the StartFrame property.
1 Subtract the first frame timecode.
2 Subtract the starting timecode rounded to the nearest hour. For example 10:00:01:00 is converted to 00:00:01:00.
StartFrameintegerSpecifies the starting frame number.
PadOutputDurationbooleanPads the output duration by 1 second to ensure that program ends on an empty frame rather than a caption or subtitle.

Captions

PropertyTypeDescription
CaptionReformatRollUpToPoponintegerSpecifies the number of text lines used to reformat roll-up captions to pop-on captions.
Encode708WideModebooleanEnables or disables CEA-708 wide mode (42 column). Note that some decoders do not properly handle wide mode.
SccSourceFieldintegerSpecifies the field number used when decoding SCC captions:
0 Field 1 (CC1/CC2)
1 Field 2 (CC3/CC4)
SubtitleCaptionChannelintSpecifies the caption channel, caption service or Teletext page to decode:
0-3 CEA-608 CC1-CC3
10 - 15 CEA-708 Service 1-6
888 Teletext Page

DVB Subtitles

PropertyTypeDescription
SubtitleDvbPageNumberintegerSpecifies the subtitle page number.
SubtitleDvbAncillaryPageNumberintegerSpecifies the subtitle ancillary page number.
SubtitleDvbColorDepthintegerSpecifies the size of the bitmap color palette in bits, allowable values are 4, 16 or 256.
SubtitleDvbTypeintegerSpecifies the DVB subtitle type according to ETSI EN 300 468 Table 26:
16 Normal
32 Hard of hearing

EBU STL

PropertyTypeDescription
SubtitleTeletextDIsplayStandardintegerSpecifies the Display Standard Code (DSC):
0 Open subtitling
1 Level-1 teletext
2 Level-2 teletext

Teletext

PropertyTypeDescription
SubtitleTeletextPageintegerSpecifies the page number (e.g. 888).
SubtitleTeletextHeightbooleanEnables or disables double height mode (default is true).
SubtitleTeletextFillTypeintSpecifies the type of filler data:
0 Packet 31 (default)
1 Null page headers
2 None
SubtitleTeletextNationalOptionintSpecifies the national option character set. See ETSI EN 300 706, default is 0 (english).
SubtitleTeletextVancLine1
SubtitleTeletextVancLine2
intSpecifies the VANC line numbers.
SubtitleTeletextVbiLine1
SubtitleTeletextVbiLine2
SubtitleTeletextVbiLine3
SubtitleTeletextVbiLine4
SubtitleTeletextVbiLine5
intSpecifies the VBI line numbers.

TTML

PropertyTypeDescription
SubtitleTtmlProfileintegerSpecifies a particular TTML output variant:
0 Basic
1 SMPTE ST2052
2 ISMC1
3 iTT
4EBU-TT
5 ISMC1_1

Defaults to basic for subtitle inputs and ST2052 for caption inputs.
TtmlTimeExpressionModeintegerSpecifies the TTML time expression mode:
0 Default
1 HH:MM:SS:FF
2 HH:MM:SS.SSS
3 Frames
4 Ticks
5 Seconds

Default is HH:MM:SS:FF for ST2052 and iTT, HH:MM:SS.SSS for other profiles.
TtmlForceIncludeFrameRatebooleanIndicates whether to include the frame rate in the TTML.
TtmlIncludeAspectRatiobooleanIndicates whether to include the aspect ratio in the TTML.

Web VTT

PropertyTypeDescription
SubtitleWebVttTimestampMapstringSets the value of the X-TIMESTAMP-MAP=MPEGTS: header.

XDS/V-chip

PropertyTypeDescription
XdsProgramNamestringSpecifies the XDS program name.
XdsProgramTypestringSpecifies the XDS program type.
XdsRatingstringSpecifies the XDS V-chip content rating:
TV-MA
TV-14
TV-PG
TV-Y7
TV-Y

Rating flags are added in parentheses:
V Violence/Fantasy Violence
S Sexual Situations
L Adult Language
D Sexually Suggestive Dialog

For example: TV-MA (VSL)
XdsCgmsstringSpecifies the XDS CGMS value:
No copying is permitted
PSP On; 4
PSP On; 2
PSP On; Split Burst Off
One generation of copies may be made

For example the following composition inserts CEA-708 captions from a sidecar SCC and adds a V-chip TV-MA (VSL) content rating:

---
input:
  container:
  - name: media-input
    video:
    - name: v1
  - name: subtitle-input
    subtitle:
    - name: s1
output:
  container:
  - name: output
    type: m2ts
    video:
    - route:
        name: v1
      merge:
        name: s1
        filter:
        - type: ciem
          properties:
            OutputFormat: c708
            XdsProgramName: Test Name
            XdsProgramType: Test Type
            XdsRating: TV-MA (VSL)
            XdsCgms: One generation of copies may be made
        - type: sccc
      encode:
        type: mcm2
        properties:
          OutputFormat: mp2v
          Profile: 4
          Level: 4
      attach:
      - type: c708
        root: a53c
{
  "input": {
    "container": [
      {
        "name": "media-input",
        "video": [
          {
            "name": "v1"
          }
        ]
      },
      {
        "name": "subtitle-input",
        "subtitle": [
          {
            "name": "s1"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output",
        "type": "m2ts",
        "video": [
          {
            "route": {
              "name": "v1"
            },
            "merge": {
              "name": "s1",
              "filter": [
                {
                  "type": "ciem",
                  "properties": {
                    "OutputFormat": "c708",
                    "XdsProgramName": "Test Name",
                    "XdsProgramType": "Test Type",
                    "XdsRating": "TV-MA (VSL)",
                    "XdsCgms": "One generation of copies may be made"
                  }
                },
                {
                  "type": "sccc"
                }
              ]
            },
            "encode": {
              "type": "mcm2",
              "properties": {
                "OutputFormat": "mp2v",
                "Profile": 4,
                "Level": 4
              }
            },
            "attach": [
              {
                "type": "c708",
                "root": "a53c"
              }
            ]
          }
        ]
      }
    ]
  }
}

This example adds V-chip metadata while converting the input stream to CEA-708 format. See XDS Metadata for V-chip insertion to an existing closed caption stream.

Bitmap Format

The bmap format is used internally to render subtitles to graphic images for display. In this format each subtitle is represented by a canvas. The canvas has specific image dimensions and contains one or more regions positioned at specific image coordinates.

Each region has layout properties such as background fill, text justification, text alignment and text progression. A region typically contains one or more text strings. Each string has style properties that control text font, color and emphasis (bold, italic). The text is flowed into the region based on the layout properties.

Subtitle Bitmap Converter

This type of filter converts a subtitle stream to bitmap format. The following bitmap converters are available:

TypeDescription
c8bmCavena 890 Subtitle Bitmap Converter
ccbmCaption Bitmap Converter
dcbmDCP Subtitle Bitmap Converter
dvbmDVB Subtitle Bitmap Converter
lcbmLambda CAP Subtitle Bitmap Converter
pabmScreen PAC Subtitle Bitmap Converter
srbmSubRip SRT Bitmap Converter
sfbmSpruce STL Bitmap Converter
stbmEBU Subtitle Bitmap Converter
tebmEBU Teletext Bitmap Converter
ttbmTTML Bitmap Converter
vtbmWebVTT Bitmap Converter

Bitmap converters support the following properties:

PropertyTypeFilterDescription
StringForegroundColorstringSpecifies the foreground color of the subtitle text as a TTML color: #rrggbbaa, rgba(r,g,b,a) or namedcolor.
StringBackgroundColorstringSpecifies the background color of the subtitle text as a TTML color.
RegionBackgroundColorstringSpecifies the background color of the subtitle regions.
CaptionChannelintegerccbmSpecifies the caption decoder channel: 0-3 CEA-608 CC1-CC4, 10-15 CEA-708 Service 1-6.
CaptionXDSbooleanccbmIndicates whether to display CEA-608 XDS (Extended Data Services).

Bitmap Style Converter

The ssty filter changes the style of the bmap subtitles. The converter supports the following properties:

PropertyTypeDescription
SubtitleStringFontFamilystringSpecifies the font family name.
SubtitleStringFontFamilySecondarystringSpecifies the font family name used for secondary subtitles.
SubtitleStringForceBoldbooleanSets the force bold setting.
SubtitleRegionBackgroundColorstringSets the region background color. This property contains a TTML .
#rrggbb
#rrggbbaa
rgb(r,g,b)
rgba(r,g,b,a)
<namedcolor>
SubtitleStringBackgroundColorstringSets the text background color. This property contains a TTML . See above.
SubtitleStringForegroundColorstringSets the text foreground color. This property contains a TTML . See above.
SubtitleStringForegroundColorSecondarystringSets the text foreground color used for secondary subtitles. This property contains a TTML . See above.
SubtitleStringOutlineColorstringSets the text outline color.
SubtitleStringOutlineColorSecondarystringSets the text outline color used for secondary subtitles.
SubtitleStringOutlineSizedoubleSets the text outline size.
SubtitleStringOutlineSizeSecondarydoubleSets the text outline size used for secondary subtitles.
SubtitleRegionBackgroundColorOverrideModeintegerSets whether the background color applies to all regions or only certain regions.
SubtitleStringBackgroundColorOverrideModeintegerSets whether the background color applies to all strings or only certain strings.
SubtitleRegionFontScaledoubleSets the region font scaling.
SubtitleRegionFontScaleSecondarydoubleSets the region font scaling used for secondary subtitles.
SubtitleRegionMarginTopdoubleSets the region top margin.
SubtitleRegionMarginBottomdoubleSets the region bottom margin.
SubtitleRegionMarginLeftdoubleSets the region left margin.
SubtitleRegionMarginRightdoubleSets the region right margin.
SubtitleStringBackgroundPaddingTypeintegerSets the text background padding type.
SubtitleStringDropShadowbooleanSets the drop shadow setting.
SubtitleStringDropShadowBlurRadiusbooleanSets the drop shadow blur radius setting.
SubtitleStringDropShadowColorbooleanSets the drop shadow color setting.
SubtitleStringDropShadowDistancebooleanSets the drop shadow distance setting.

Bitmap Video Converter

The bmvc filter converts a subtitle stream in bmap format to a video stream in rgba format. The converter supports the following properties:

PropertyTypeDescription
TimescaleintegerThe time scale of the video stream in ticks/seconds.
FrameDurationintegerThe nominal duration of each video frame in ticks.

Subtitle Overlay

Use the overlay operator to display open (or burned-in) subtitles. For example the following composition will overlay DVB teletext dvbt onto the video stream:

---
input:
  container:
  - name: input1
    video:
    - name: v1
    subtitle:
    - name: s1
      format: 'dvbt'
output:
  container:
  - name: output1
    type: 'mp4 '
    video:
    - overlay:
      - name: v1
      - name: s1
        filter:
        - type: 'dvbm'
        - type: 'ssty'
          properties:
            SubtitleStringFontFamily: helvetica
        - type: 'bmvc'
          properties:
            TimeScale: 30000
            FrameDuration: 1001
{
  "input": {
    "container": [
      {
        "name": "input1",
        "video": [
          {
            "name": "v1"
          }
        ],
        "subtitle": [
          {
            "name": "s1",
            "format": "dvbt"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output1",
        "type": "mp4 ",
        "video": [
          {
            "overlay": [
              {
                "name": "v1"
              },
              {
                "name": "s1",
                "filter": [
                  {
                    "type": "dvbm"
                  },
                  {
                    "type": "ssty",
                    "properties": {
                      "SubtitleStringFontFamily": "helvetica"
                    }
                  },
                  {
                    "type": "bmvc",
                    "properties": {
                      "TimeScale": 30000,
                      "FrameDuration": 1001
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

Combining Subtitles

Use the combine operator to combine multiple subtitle streams. For example the following composition combines multiple sidecar subtitle files (each containing a different language) into a single subtitle stream:

---
input:
  container:
  - name: main-input
    video:
    - name: v1
    audio:
    - name: a1
  - name: sidecar-input1
    subtitle:
    - name: s1
  - name: sidecar-input2
    subtitle:
    - name: s2
output:
  container:
  - name: output
    type: m2ts
    video:
    - route:
        name: v1
    audio:
    - route:
        name: a1
    subtitle:
    - combine:
        type: txfi
        properties:
          OutputFormat: ttxt
        stream:
        - name: s1
          properties:
            Page: 888
            CharacterSet: Hebrew
        - name: s2
          properties:
            Page: 889
            CharacterSet: Arabic
{
  "input": {
    "container": [
      {
        "name": "main-input",
        "video": [
          {
            "name": "v1"
          }
        ],
        "audio": [
          {
            "name": "a1"
          }
        ]
      },
      {
        "name": "sidecar-input1",
        "subtitle": [
          {
            "name": "s1"
          }
        ]
      },
      {
        "name": "sidecar-input2",
        "subtitle": [
          {
            "name": "s2"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output",
        "type": "m2ts",
        "video": [
          {
            "route": {
              "name": "v1"
            }
          }
        ],
        "audio": [
          {
            "route": {
              "name": "a1"
            }
          }
        ],
        "subtitle": [
          {
            "combine": {
              "type": "txfi",
              "properties": {
                "OutputFormat": "ttxt"
              },
              "stream": [
                {
                  "name": "s1",
                  "properties": {
                    "Page": 888,
                    "CharacterSet": "Hebrew"
                  }
                },
                {
                  "name": "s2",
                  "properties": {
                    "Page": 889,
                    "CharacterSet": "Arabic"
                  }
                }
              ]
            }
          }
        ]
      }
    ]
  }
}

Teletext Combiner

The txfi combiner accepts EBU STL stl input streams and produces an EBU Teletext ttxt stream. The combiner supports the following properties:

PropertyTypeDescription
OutputFormatstringSpecifies the output subtitle format as a four character code:
ttxt EBU Teletext (default)
VancLine1integerSpecifies the VANC line for field 1 Teletext data (default 12).
VancLine2integerSpecifies the VANC line for field 2 Teletext data (default 575).
VbiLine1integerSpecifies the first VBI line for Teletext data (default 21).
VbiLine2integerSpecifies the second VBI line for Teletext data (default 334).
VbiLine3integerSpecifies the third VBI line for Teletext data (default 0).
VbiLine4integerSpecifies the fourth VBI line for Teletext data (default 0).
VbiLine5integerSpecifies the fifth VBI line for Teletext data (default 0).
FillTypeintegerSpecifies the type of filler data.
0 Packet 31 (default)
1 Null page headers
2 None

The combiner supports the following properties for each input stream:

PropertyTypeDescription
PageintegerSpecifies the teletext page number.
`CharacterSetstringSpecifies the text encoding:
Latin
Cyrillic-1
Cyrillic-2
Cyrillic-3
Greek
Hebrew
Arabic

If not specified the default is the input EBU STL stream encoding.
NationalOptionintegerSpecifies the National Option character set which adds special characters to the base Latin set.
0 English (default)
1 German
2 Swedish/Finnish
3 Italian
4 French
5 Portuguese/Spanish

Caption Metadata

Closed captions and Teletext are specific types of metadata carried in a video stream. Transform supports the following types of captions and teletext metadata:

TypeDescription
c608CEA-608 Closed Captions
c708CEA-708 Closed Captions
ttxtEBU Teletext (VBI or VANC)

Closed captions and Teletext may appear in multiple locations within a media container. Each location is represented by a specific metadata type. See Metadata Types the for more details.

Caption Subtitle Converter

The ccsc filter converts a video stream with caption or teletext metadata to the equivalent subtitle stream.

Subtitle Caption Converter

The sccc filter converts a subtitle stream to a video stream with the equivalent closed caption or teletext metadata.

PropertyTypeDescription
SccFieldTypestringFour character code either c618 (field 1) or c628 (field 2).

Caption Extraction

Use the detach operator to extract closed caption or teletext metadata from a video stream. By default the operator searches all known root locations for the caption metadata.

Use the route operator to convert a video stream to a subtitle stream using the caption or teletext metadata.

For example the following composition extracts c708 closed caption metadata to a sidecar scc container.

---
input:
  container:
  - name: input
    video:
    - name: v1
      detach:
      - type: c708
      - type: time
output:
  container:
  - name: output
    type: 'scc '
    subtitle:
    - route:
        name: v1
      filter:
      - type: ccsc
        properties:
          OutputFormat: c708
      - type: ciem
        properties:
          OutputFormat: 'scc '
{
  "input": {
    "container": [
      {
        "name": "input",
        "video": [
          {
            "name": "v1",
            "detach": [
              {
                "type": "c708"
              },
              {
                "type": "time"
              }
            ]
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output",
        "type": "scc ",
        "subtitle": [
          {
            "route": {
              "name": "v1"
            },
            "filter": [
              {
                "type": "ccsc",
                "properties": {
                  "OutputFormat": "c708"
                }
              },
              {
                "type": "ciem",
                "properties": {
                  "OutputFormat": "scc "
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

This example also uses the detach operator to preserve the input timecode in the output SCC file. See Timecode Extraction for more details.

Caption Overlay

Use the overlay operator to display open (or burned-in) captions and teletext. For example the following composition will overlay c608 captions onto the video stream:

---
input:
  container:
  - name: input1
    video:
    - name: v1
      detach:
      - type: c608
output:
  container:
  - type: 'mp4 '
    name: output1
    video:
    - name: v2
      overlay:
      - name: v1
      - name: v1
        filter:
        - type: ccsc
          properties:
            OutputFormat: c608
        - type: ccbm
          properties:
            Immediate: true
            CaptionChannel: 0
        - type: ssty
          properties:
            SubtitleStringFontFamily: helvetica
        - type: bmvc
          properties:
            VariableFrameDuration: false
      encode:
        type: h264
        properties:
          OutputFormat: avc1
{
  "input": {
    "container": [
      {
        "name": "input1",
        "video": [
          {
            "name": "v1",
            "detach": [
              {
                "type": "c608"
              }
            ]
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "type": "mp4 ",
        "name": "output1",
        "video": [
          {
            "name": "v2",
            "overlay": [
              {
                "name": "v1"
              },
              {
                "name": "v1",
                "filter": [
                  {
                    "type": "ccsc",
                    "properties": {
                      "OutputFormat": "c608"
                    }
                  },
                  {
                    "type": "ccbm",
                    "properties": {
                      "Immediate": true,
                      "CaptionChannel": 0
                    }
                  },
                  {
                    "type": "ssty",
                    "properties": {
                      "SubtitleStringFontFamily": "helvetica"
                    }
                  },
                  {
                    "type": "bmvc",
                    "properties": {
                      "VariableFrameDuration": false
                    }
                  }
                ]
              }
            ],
            "encode": {
              "type": "h264",
              "properties": {
                "OutputFormat": "avc1"
              }
            }
          }
        ]
      }
    ]
  }
}

Caption Insertion

Use the merge operator to convert a subtitle stream to closed caption or teletext metadata.

Use the attach operator to insert the caption or teletext metadata into the video stream.

For example the following composition inserts c618 closed captions from a sidecar SCC container into the vertical blanking interval vbi of the video stream:

---
input:
  container:
  - name: main-input
    video:
    - name: v1
  - name: sidecar-input
    subtitle:
    - name: s1
output:
  container:
  - name: output
    type: 'mov '
    video:
    - width: 720
      height: 512
      format: UYVY
      route:
        name: v1
      merge:
        name: s1
        filter:
        - type: sccc
          properties:
            SccFieldType: c618
      attach:
      - type: c618
        root: 'vbi '
      encode:
        type: appr
        properties:
          OutputFormat: apcn
{
  "input": {
    "container": [
      {
        "name": "main-input",
        "video": [
          {
            "name": "v1"
          }
        ]
      },
      {
        "name": "sidecar-input",
        "subtitle": [
          {
            "name": "s1"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output",
        "type": "mov ",
        "video": [
          {
            "width": 720,
            "height": 512,
            "format": "UYVY",
            "route": {
              "name": "v1"
            },
            "merge": {
              "name": "s1",
              "filter": [
                {
                  "type": "sccc",
                  "properties": {
                    "SccFieldType": "c618"
                  }
                }
              ]
            },
            "attach": [
              {
                "type": "c618",
                "root": "vbi "
              }
            ],
            "encode": {
              "type": "appr",
              "properties": {
                "OutputFormat": "apcn"
              }
            }
          }
        ]
      }
    ]
  }
}

Combining Captions

Use the combine operator with the merge operator to combine multiple subtitle streams and convert the output to caption or teletext metadata.

Use the attach operator to insert the caption or teletext metadata into the video stream.

For example the following composition converts multiple sidecar subtitle files to CEA-708 closed captions with multiple language services.

---
input:
  container:
  - name: main-input
    video:
    - name: v1
    audio:
    - name: a1
  - name: sidecar-input1
    subtitle:
    - name: s1
  - name: sidecar-input2
    subtitle:
    - name: s2
  - name: sidecar-input3
    subtitle:
    - name: s3
output:
  container:
  - name: output
    type: 'mp4 '
    video:
    - route:
        name: v1
      merge:
        combine:
          type: cfic
          properties:
            OutputFormat: c708
          stream:
          - name: s1
            filter:
            - type: ciem
              properties:
                OutputFormat: c708
            properties:
              InputChannel: 0
              InputField: 0
              OutputChannel: 0
              OutputService: 0
              Language: eng
          - name: s2
            filter:
            - type: ciem
              properties:
                OutputFormat: c708
            properties:
              InputChannel: 0
              InputField: 0
              OutputChannel: 1
              OutputService: 1
              Language: fra
          - name: s3
            filter:
            - type: ciem
              properties:
                OutputFormat: c708
            properties:
              InputChannel: 0
              InputField: 0
              OutputChannel: 2
              OutputService: 2
              Language: spa
        filter:
        - type: sccc
      attach:
      - type: c708
        root: a72c
    audio:
    - route:
        name: a1
    subtitle: []
{
  "input": {
    "container": [
      {
        "name": "main-input",
        "video": [
          {
            "name": "v1"
          }
        ],
        "audio": [
          {
            "name": "a1"
          }
        ]
      },
      {
        "name": "sidecar-input1",
        "subtitle": [
          {
            "name": "s1"
          }
        ]
      },
      {
        "name": "sidecar-input2",
        "subtitle": [
          {
            "name": "s2"
          }
        ]
      },
      {
        "name": "sidecar-input3",
        "subtitle": [
          {
            "name": "s3"
          }
        ]
      }
    ]
  },
  "output": {
    "container": [
      {
        "name": "output",
        "type": "mp4 ",
        "video": [
          {
            "route": {
              "name": "v1"
            },
            "merge": {
              "combine": {
                "type": "cfic",
                "properties": {
                  "OutputFormat": "c708"
                },
                "stream": [
                  {
                    "name": "s1",
                    "filter": [
                      {
                        "type": "ciem",
                        "properties": {
                          "OutputFormat": "c708"
                        }
                      }
                    ],
                    "properties": {
                      "InputChannel": 0,
                      "InputField": 0,
                      "OutputChannel": 0,
                      "OutputService": 0,
                      "Language": "eng"
                    }
                  },
                  {
                    "name": "s2",
                    "filter": [
                      {
                        "type": "ciem",
                        "properties": {
                          "OutputFormat": "c708"
                        }
                      }
                    ],
                    "properties": {
                      "InputChannel": 0,
                      "InputField": 0,
                      "OutputChannel": 1,
                      "OutputService": 1,
                      "Language": "fra"
                    }
                  },
                  {
                    "name": "s3",
                    "filter": [
                      {
                        "type": "ciem",
                        "properties": {
                          "OutputFormat": "c708"
                        }
                      }
                    ],
                    "properties": {
                      "InputChannel": 0,
                      "InputField": 0,
                      "OutputChannel": 2,
                      "OutputService": 2,
                      "Language": "spa"
                    }
                  }
                ]
              },
              "filter": [
                {
                  "type": "sccc"
                }
              ]
            },
            "attach": [
              {
                "type": "c708",
                "root": "a72c"
              }
            ]
          }
        ],
        "audio": [
          {
            "route": {
              "name": "a1"
            }
          }
        ],
        "subtitle": []
      }
    ]
  }
}

Caption Combiner

The cfic combiner supports CEA-608, CEA-708 and SCC closed captions. The combiner supports the following properties:

PropertyTypeDescription
OutputFormatstringSpecifies the output subtitle format.
c708 CEA-708 (default)
scc Scenarist SCC
DropFramebooleanIndicates whether input SCC streams should be treated as drop frame. Note that all input streams must be the same frame rate and drop frame format.
SccOutputFieldintegerSpecifies the field number for an SCC output stream.
0 Field 1 (CC1/CC2)
1 Field 2 (CC3/CC4)

The combiner supports the following properties for each input stream:

PropertyTypeDescription
InputFieldintegerSpecifies the input field number for SCC streams:
0 Field 1 (CC1/CC2)
1 Field 2 (CC3/CC4)
SourceChannel
InputChannel
integerSpecifies the input CEA-608 caption channel:
0 CC1 (default)
1 CC2
2 CC3
3 CC4
OutputChannelintegerSpecifies the output CEA-608 caption channel:
0 CC1 (default)
1 CC2
2 CC3
3 CC4
OutputServiceintegerSpecifies the output CEA-708 caption service:
0 Service 1 (default)
1 Service 2
2 Service 3
3 Service 4
4 Service 5
5 Service 6
LanguagestringSpecifies the output CEA-708 language code (ISO-639 alpha3). For example eng for English, spa for Spanish, etc.