support Contact Support | system status System Status
Page Contents

    Captions Settings

    This topic contains details for encoding settings related to video captions.

    Overview

    Zencoder automatically passes captions through from inputs to outputs, for supported formats. You can also specify a caption file (in SCC format) to add to outputs during transcoding.

    Input formats supported for captions:

    • MP4/M4V video files that have caption tracks in CEA-608 format
    • VTT, SCC, DFXP, or SAMI files specified with the caption_url option

    Output formats supported for captions:

    • MP4/M4V files, with caption track in CEA-608 format
    • HLS outputs (segmented outputs with H.264 video in TS format)
    • SCC and DFXP formats are also supported with captions type output

    For HLS, captions must be mapped to the outputs to get proper in-manifest captions. For example:

    {
      "label": "Captions",
      "type": "captions",
      "segmented": true,
      "public": true,
      "filename": "captions.m3u8",
      "caption_url": "PATH_TO_CAPTION_FILE_HERE",
      "streaming_delivery_format": "hls"
    }, {
      "filename": "master_playlist.m3u8",
      "type": "playlist",
      "captions": [{
        "path": "Captions/captions.m3u8",
        "language": "en",
        "name": "english"
      }],
      "streams": [{
        "path": "video/video-1800.m3u8",
        "source": "video-res1",
        "audio": "64k_audio"
      }]
    }

    Note: The following restrictions currently apply to caption conversion:

    For DFXP inputs:

    • UTF8 encoding is required for all special characters
    • Only the first language is converted (the first DIV tag)
    • Animation, layout, and region features are not supported
    • Styles can be inline or referenced by ID, but only the tts:textAlign property is applied
    • Nested DIV and P tags are ignored
    • SPAN tags are ignored
    • Explicit breaks may be inserted with BR tags
    • Only a single caption may be on-screen at any time (subsequent captions will end previous ones)

    For SAMI inputs:

    • Only the first language listed is converted (the first class-selector style)
    • Inline styles are not supported
    • Layout-related styling tags (table, div, etc.) are not supported
    • Explicit breaks may be inserted by using separate P tags

    caption_url

    caption_url:String

    API Versions: V1, V2

    Parent: outputs

    Valid Values: A valid URL to an SCC, DFXP, or SAMI caption file to include in the output

    Compatible Job Types: All

    Example: http://example.com/captions.scc

    Description:

    The URL to an SCC, DFXP, or SAMI caption file to include in the output.

    Zencoder supports captions for multiple output video formats:

    • MP4/M4V files, with caption track in CEA-608 format
    • HLS outputs (segmented outputs with H.264 video in TS format)

     

    Note: Captioning is not currently supported on transmuxed outputs.

    {
      "input": "s3://zencodertesting/test.mov",
      "outputs": [
        {
          "caption_url": "http://example.com/captions.scc"
        }
      ]
    }

    See Also: skip_captions and prepare_for_segmenting

    skip_captions

    skip_captions:Boolean

    API Versions: V1, V2

    Parent: outputs

    Default: false

    Valid Values: true or false

    Compatible Job Types: All

    Example: true

    Description:

    Don't add or pass through captions to the output file.

    {
      "input": "s3://zencodertesting/test.mov",
      "outputs": [
        {
          "skip_captions": "true"
        }
      ]
    }

    See Also: caption_url and prepare_for_segmenting


    Page last updated on 13 Jun 2020