Caption to Caption Conversion

Convert captions files between formats.

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>AddMedia</action> <!-- required-->
    <source>[ClosedCaptionsSourceFile]</source> <!-- required-->
    <format>
        <output>closed_captions</output> <!-- required-->
        <destination>[DestinationURL]</destination> <!-- required-->
        <type>[srt|scc|webvtt|dfxp|ttml|mcc|stl]</type>
        <strip_formatting>[yes|no]</strip_formatting>
        <time_offset>[TIME_OFFSET]</time_offset>
        <cea_data_field>[0|1]</cea_data_field>
        <transparent_background>[yes|no]</transparent_background>
        <cea_stream>[video|text|auto]</cea_stream>
        <teletext_page_id>[PageID]</teletext_page_id>
        <ttml_profile>[TTMLProfile]</ttml_profile>
        <make_preconvert>[no|scc]</make_preconvert>
        <emulate_rollup>[yes|no]</emulate_rollup>
        <charset>[utf8|cp1252]</charset>
        <stl_dsc>[0|1|2]</stl_dsc>
        <webvtt_strip_cue_settings>[vertical|line|position|size|align|region],...</webvtt_strip_cue_settings>
        <align>[left|right|center]</align>
        <valign>[top|bottom|center]</valign>
        <scc_strict_check>[yes|no]</scc_strict_check>
        <framerate>[Frame rate value]</framerate>
        <scc_converter>[v1|v2]</scc_converter>
        <stt> 
            <model>[base|tiny|small|medium|largev2|largev3]</model> 
            <language>[LanguageCode]</language> 
            <prompt></prompt> 
            <refine_timing>[yes|no]</refine_timing>
            <audio_stream>
                [AudioStreamDefinition]
            </audio_stream>
        </stt>
        <legalize> 
            <mode>[cea-608|teletext|custom]</mode> 
            <max_line_count>[MaxLineCount]</max_line_count> 
            <max_line_length>[MaxLineLength]</max_line_length> 
            <min_duration>[MinDuration]</min_duration> 
            <max_duration>[MaxDuration]</max_duration> 
            <max_cps>[MaxCPS]</max_cps> 
        </legalize>
        <scc_last_unclosed_duration>[FloatDuration]</scc_last_unclosed_duration>
        <scc_last_unclosed_end>[Float or Timecode]</scc_last_unclosed_end>

    </format>
</query>
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // required
        "action": "AddMedia", // required
        "source": ["[ClosedCaptionsSourceFile]"], // required
        "format": {
            "output": "closed_captions", // required
            "destination": "[DestinationURL]", // required
            "type": "[srt|scc|webvtt|dfxp|ttml|mcc|stl]",
            "strip_formatting": "[yes|no]",
            "time_offset": "[TIME_OFFSET]",
            "cea_data_field": "[0|1]",
            "transparent_background": "[yes|no]",
            "cea_stream": "[video|text|auto]",
            "teletext_page_id": "[PageID]",
            "ttml_profile": "[TTMLProfile]",
            "make_preconvert": "[no|scc]",
            "emulate_rollup": "[yes|no]",
            "charset": "[utf8|cp1252]",
            "stl_dsc": "[0|1|2]",
            "webvtt_strip_cue_settings": "[vertical|line|position|size|align|region],...",
            "align": "[left|right|center]",
            "valign": "[top|bottom|center]",
            "scc_strict_check": "[yes|no]",
            "framerate": "[Frame rate value]",
            "scc_converter": "[v1|v2]",
            "stt": {
              "model": "[base|tiny|small|medium|largev2|largev3]",
              "language": "[LanguageCode]",
              "prompt": "",
              "refine_timing": "[yes|no]",
              "audio_stream": {
                [AudioStreamDefinition]
              }
            },
            "legalize": {
              "mode": "[cea-608|teletext|custom]",
              "max_line_count": "[MaxLineCount]",
              "max_line_length": [MaxLineLength]",
              "min_duration": "[MinDuration]",
              "max_cps": "[MaxCPS]"
            }
            "scc_last_unclosed_duration": "[FloatDuration]",
            "scc_last_unclosed_end": "[Float or Timecode]"
        }
}
ParameterDescriptionAllowed ValuesDefault Value
sourceSpecify the URL to Closed Captions file or video with muxed closed captions.Valid URL to Closed Captions file (in one of the following formats: SCC, SubRip, DFXP (TTML), SAMI, WebvTT, PAC, STL) or video with muxed closed captions (in cea-6/708 or timed-text format).none
typeConvert closed captions to specified typesrt, scc, webvtt, dfxp, ttml, mcc, stlsrt
strip_formattingRemove all formatting tags (available only for TTML (DFXP) output and TTML to WebVTT conversion).yes, nono
time_offsetSpecify the time offset for time in CC file.Positive or negative integer.0
cea_data_fieldCEA-608 data field id (data type) to be extracted from cea-608 CC data.0 – NTSCCC_FIELD_1
_1
– NTSC_CC_FIELD_2
0
transparent_backgroundAdd transparent background for DFXP Closed Captionsyes, nono
cea_streamStream type for closed captions extractionvideo, text, autoauto
teletext_page_idTeletext page id to copy or extractNon-negative integer numbernone
ttml_profileTTML profilebasic, smpte_st2052, smpte_ismc1, smpte_ismc1_1, smpte_ittbasic
make_preconvertPerform a pre-conversion of the source file to another format. For example, you may pre-convert TTML to SCC before converting to MCC to remove paint-on emulation in the original source file.no, sccno
emulate_rollupPerform RollUp emulation when converting an SCC file to other formatsyes, noyes
charsetSpecify character set for SRT outpututf8, cp1252none
stl_dscOutput STL Display Standard Code
0 — Open Subtitling
1 — Level 1 Teletext
2 — Level 2 Teletext
0, 1, 21
webvtt_strip_cue_settingsStrip certain cue settingsComma separated list of the following values: vertical,line,position,size,align,regionnone
alignHorizontal captions alignment (STL only)left, right, centernone
valignVertival captions alignment (STL only)top, bottom,centernone
scc_strict_checkFail in case of SCC source errors (e.g. incorrect timecodes)yes, nonone
framerateInput framerate (e.g. for SCC source)60, 59.94, 60000/1001, 50, 29.97, 30000/1001, 25, 23.98, 24000/1001none
scc_converterSCC converter versionv1, v2v1
scc_last_unclosed_durationSet the last subtitle item duration in case of SCC doesn't contain trailing EOC or EDMPositive floatnone
scc_last_unclosed_endSet the last subtitle item end time if SCC doesn't contain trailing EOC or EDMPositive float or SRT/VTT timecodenone
STT (Speech to text) parameters
modelLanguage model to usebase, tiny, small, medium, largev2, largev3 (experimental)largev2
languageLanguage of speech2 or 3 characters language codenone
promptPrompt for speech to text conversionTextnone
refine_timingRefine timingyes, nono
audio_streamDefine audio stream to handlesee Audio Stream definition
Legalize parameters
modeCEA-608: 4 lines and 32 characters per item, Teletext: 4 lines and 37 characters, Custom: custom number of lines and characterscea-608, teletext, customnone
max_line_countMax line countPositive integer (max 4 for cea-608 and teletext mode)none
max_line_lengthMax line lengthPositive integer (max 32 for cea-608, max 37 for teletext)none
min_durationMin durationPositive integernone
max_durationMax durationPositive integernone
max_cpsMax characters per secondPositive integernone
🚧

For transparent_background

The <transparent_background /> parameter applied only if set to dfxp.

🚧

For ttml_profile

The <ttml_profile /> parameter applied only if set to ttml.

🚧

For type=mcc

If multiple source files (up to 4) are specified in the source array, these files will be merged into a single MCC file.

🚧

For type=scc

If 2 source files are specified in the source array, these files will be merged into a single SCC file, sources will be mapped to CC1 and CC2 channels respectively.

🚧

For scc_last_unclosed_duration and scc_last_unclosed_end

These options are applicable for SRT and WebVTT outputs.

🚧

For STT

Model LargeV3 is experimental and may cause unexpected results, it's not recommended to use for English, but still can show better results for some other languages.

Speech to text jobs are temporary unavailable in the following regions: us-west-1, af-south-1, eu-west-1, ap-southeast-1.