Page Contents

    Ingesting Transcript Files

    Dynamic Ingest can be used to ingest Transcript files with your video, or separately, after the video has been ingested.

    Setup

    The setup for Dynamic Ingest requests is the same, whether you are ingesting a video, images, a Transcript file, or all of these. For full details of the request body fields, see the API Reference.

    Request URL
            https://ingest.api.brightcove.com/v1/accounts/account_id/videos/video_id/ingest-requests
    Authentication
    Authentication requires an access token passed as a Bearer token in an Authorization header:
            Authorization: Bearer {access_token}

    Note on S3

    If your Transcript will be pulled from a protected S3 bucket, you will need to set a bucket policy to allow Video Cloud to access the files. See Using Dynamic Ingest with S3 for details.

    Ingest Transcript files

    You can also add Transcript transcript to your video or upload them for an existing video using Dynamic Ingest:

    Add transcripts during video ingestion

    Request URL

    https://ingest.api.brightcove.com/v1/accounts/account_id/videos/video_id/ingest-requests

    Method

    POST

    Sample request body

    {
      "master": {
        "url": "https://support.brightcove.com/test-assets/videos/Great_Blue_Heron.mp4"
      },
      "transcripts": [
        {
          "url": "https://support.brightcove.com/test-assets/transcript/herons-transcript.txt",
          "srclang": "en-US",
          "kind": "transcripts"
          "label": "English",
          "default": true,
          "status" : "published"
        }
      ]
    }

    Add transcripts existing videos

    Adding transcripts to existing videos is exactly the same, except that you do not need any of the video information or the profile in the request body. unless you are requesting closed transcript to be added to MP4 renditions - in that case, you will need to replace the video

    Request URL

            https://ingest.api.brightcove.com/v1/accounts/account_id/videos/video_id/ingest-requests

    Method

    POST

    Sample request body

    {
      "transcripts": [
        {
          "url": "https://support.brightcove.com/test-assets/transcript/herons-transcript.txt",
          "srclang": "en-US",
          "kind": "transcripts"
          "label": "English",
          "default": true,
          "status" : "published"
        }
      ]
    }

    Ingest fields

    The following table details the fields used for ingesting transcripts or requesting auto captions.

    Fields for Auto Captions and Transcripts
    Field Type Required Description
    autodetect boolean no true to auto-detect language from audio source. false to use srclang specifying the audio language.
    default boolean no If true, srclang will be ignored, and the main audio track will be used - language will be auto-detected.
    input_audio_track object no For multiple audio tracks, defines the audio to extract the captions from. It is composed by language and variant (both required).
    kind string no The kind of output to generate. Allowed values:
    • captions
    • transcripts
    Notes:
    1. If the kind is transcripts, and the url for the transcripts file is included, a transcript file will be ingested, and no auto captions will be generated. See Ingesting Transcriptions for more details.
    2. If the kind is transcripts, and the url for the transcripts file is not included, a transcript file and captions will be generated,
    3. If the kind is captions, a captions will be generated, but not a transcript file.
    label string no Human readable label. Defaults to the BCP-47 style language code.
    srclang string no BCP-47 style language code for the text tracks (en-US, fr-FR, es-ES, etc.); see supported languages
    status string no Indicates the actual situation of the caption, if it is published, draft.
    url string no The URL where a transcript file is located. Must be included in the kind is transcripts. Must not be included if the kind is captions.

    Page last updated on 05 Sep 2022