Skip to main content

Subtitle

NameTypeDescription
include_if_source_hasarray                          This array allows for conditionally outputting tracks based on whether or not a specific input tracks exists. The tracks in the source are referred to by number reference: subtitle[0] refers to the first subtitle track.
include_conditionsarray                          Specifies conditions under which this subtitle will be used. Can use Javascript math.js nomenclature
verifybooleanEnable or disable post transcode verification for this track.
default: true
source_mapenum                          
use_if_exists
source_or_empty
required_in_source
This specifies the behavior to use when creating a subtitle track. Selecting source_or_empty will use the source's subtitle data or create an empty track if this data does not exist.
default: required_in_source
formatenum                          
webvtt
srt
stl
ass
ttml
imsc1
dvbsub
scc
timed_text
The subtitle format to use.
pidinteger
The video program ID - only used for MPEG transport streams.
maximum: 8190
languagestringThe ISO 639.2 three letter code for the language of the subtitle.
override_language_codestringOverride default language code (sush as ttml).
track_group_idstringThis indicates which Group this track belongs to. Multiple tracks with the same content but different bitrates would have the same track_group_id.
layer_idstringThis indicates which Layer this tracks belongs to. For example, this allows bundling one video layer and multiple audio layers with same bitrates but different languages.
layer_affinitiesarray                          This indicates which other layers this layer can be combined with. For example, to combine audio and video layers.
match_source_languagebooleanIf true, sets the output subtitle track language to be the same as the language of the subtitle track in the source.
closed_captionsobjectA closed-caption extracted data to be included in the output.
dvb_optionsobjectThe options for European Digital Video Broadcasting (DVB) subtitles.
webvtt_optionsobjectOptions for the WebVTT output.
scc_optionsobjectOptions for the SCC output.
mainconcept_stream_mux_optionsstring
Provide direct stream instruction to the MainConcept multiplexer. Values are constructed as "prop=val,prop=val". See MainConcept documentation for valid values.
profileobjectOptions for profile, specific only for subtitles.
frame_ratenumber
string
Frame rate for output subtitles, overwrites values from source video.

Example subtitle

{
"uid": "transcode_task",
"kind": "transcode",
"payload": {
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_folder"
},
"targets": [
{
"file_pattern": "{source_basename}_converted{default_extension}",
"existing_files": "replace",
"container": {
"kind": "mp4"
},
"video": {
"width": 1280,
"height": 720,
"codec": "h264"
},
"audio": [
{
"codec": "aac",
"channels": 2,
"sample_rate": 48000,
"sample_size": 16,
"bitrate_kb": 96
}
],
"subtitle": [
{
"source_map": "use_if_exists",
"format": "scc",
"language": "en"
}
]
}
]
}
}