API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
Streaming platform
Streaming platform
Chosen image
Home/Streaming platform/Video Hosting/Subtitles & Captioning

Subtitles and closed captions for VOD

What are subtitles and closed captions?

Subtitles are the transcribed speech in your video, including narration, dialogues, and monologues.

Closed captions or just captions are transcribed speech showing what is said in your video and explaining any audio context, such as background music, comments about moods, and emotions behind the spoken words.

By using timed text tracks for your videos’ subtitles and closed captions, you can engage wider audiences, such as deaf and hard-of-hearing people or non-native speakers.

Your videos may need text accompaniment in the following cases:

  • Watching muted videos on web pages with autoplay
  • Watching videos without headphones in a noisy public environment
  • Watching foreign videos with translation to the user’s language
  • Improving SEO and searchability through text indexation
  • Enhancing learning and comprehension, especially in an educational context

Gcore Player supports timed text tracks for videos: subtitles and closed captions, as in the example:

Gcore Player

Formats of subtitles and captions

We support SRT and WebVTT formats for timed text tracks.

SRT

SRT (SubRip file format) is a simple text file saved in the SubRip file format with the .srt extension.

Example:

1
00:00:19,570 --> 00:00:24,592
Oh, you cute little corny little spursome. Latin name, bonus points.

2
00:00:44,014 --> 00:00:52,156
...Come on, team. We must not have dilly-dally when there's so much nature to see. I was thinking we should call our class project Fun Guys in the Forest...

WebVTT

WebVTT (Web Video Text Tracks) is a text file with the .vtt extension. It is based on the SRT but expanded without backward compatibility. A WebVTT can contain captions, descriptions, chapters, and metadata cues such as caption alignment.

Note: We recommend using WebVTT. It is supported by most devices, players, and browsers.

Example:

1
00:00:19,570 --> 00:00:24,592 position:10%,line-left align:left size:35%
Oh, you cute little corny little spursome. 
Latin name, bonus points.NOTE I’m not sure the timing is right on the following cue.

2
00:00:44,014 --> 00:00:52,156 position:90% align:right size:35%
...Come on, team. We must not have dilly-dally when there's so much nature to see. I was thinking we should call our class project Fun Guys in the Forest...

How to get subtitles and captions

Gcore

Note: Gcore will provide AI-generated subtitles soon. More information will be available soon when the service goes into beta testing.

For now, automatically generated text tracks can only be subtitles (not closed captions.) Additional ambiance accompaniment is unavailable, since the subtitles use the voice from the video.

The quality of automatic subtitle generation depends on the quality of the audio and the ability to parse the pronunciation of words automatically. The accuracy threshold for automated captions is around a 15% word error rate, which can fluctuate.

By default, subtitles will be created in the video’s original language. After that, the subtitle can be automatically translated into other languages.

Third-play

Many third-party tools will allow you to generate subtitles on your side and then attach them as a file. Free services include Veed and Kapwing.

Note: External services may have use limitations; we are not responsible for them.

How to extract subtitles and captions from external platforms

Here are some helpful guides on how to download subtitles from popular external platforms:

How to add and manage subtitles and captions

Customer Portal

1. Go to the Video Hosting section and open the video where you want to add subtitles or captions.

Video Hosting section

2. Click Add subtitles. You can add several files.

3. Select the subtitle language for each file from the dropdown list.

4. Click Save.

Note: It takes about 15 minutes for the changes to take effect. Then you will see an icon to the left of the time indicator to switch on subtitles, and by clicking on it, you can select the subtitle language.

API

Explore our API documentation which describes working with subtitles and captions. Here are some methods for the most helpful actions.

Add subtitles or captions

The API method lets you add subtitles attached to a video.

Note: Specify the language using a three-letter language code according to ISO-639-2 (bibliographic code).

Example of the request:

curl -L 'https://api.gcore.com/streaming/videos/2474732/subtitles' \
-H 'Authorization: APIKey 1234$0d1659...' \
-H 'Content-Type: application/json' \
-d '{
    "name": "German (AI-generated)",
    "language": "ger",
    "vtt": "WebVTT\n\n1\n00:00:18,350 --> 00:00:24,350\nOh, du süßes, kühles, schmuckiges Schmuck. Latin Name, Bonus-Punkte.\n\n2\n00:00:44,014 --> 00:00:52,156\nKomm schon, Team. Wir müssen nicht auf Dilly Dally, Ich dachte..."         
}'

In response, you will get all original data and the “id” field of a new entity of subtitle. Example of the response:

{
    "id": 5850,
    "name": "German (AI-generated)",
    "language": "ger",
    "vtt": "WebVTT\n\n1\n00:00:18,350 --> 00:00:24,350\nOh, du süßes, kühles, schmuckiges Schmuck. Latin Name, Bonus-Punkte.\n\n2\n00:00:44,014 --> 00:00:52,156\nKomm schon, Team. Wir müssen nicht auf Dilly Dally, Ich dachte..."         
}'

Get subtitles or captions

The API method lets you attach subtitles or captions to a video.

Example of the request:

curl -L 'https://api.gcore.com/streaming/videos/2474732/subtitles' \
-H 'Authorization: APIKey 1234$0d1659...'

Example of the response:

[
    {
        "id": 5823,
        "name": "English (AI-generated)",
        "language": "eng",
        "vtt": "WebVTT\n\n1\n00:00:19,570 --> 00:00:24,592\nOh, you cute little corny little spursome. Latin name, bonus points.
\n\n2\n00:00:44,014 --> 00:00:52,156\nCome on, team. We must not have dilly-dally when \nthere's so much nature to see..."
    },
    {
        "id": 5850,
        "name": "German (AI-generated)",
        "language": "ger",
        "vtt": "WebVTT\n\n1\n00:00:18,350 --> 00:00:24,350\nOh, du süßes, kühles, schmuckiges Schmuck. Latin Name, Bonus-Punkte.\n\n2\n00:00:44,014 --> 00:00:52,156\nKomm schon, Team. Wir müssen nicht auf Dilly Dally, Ich dachte..."
    }
]

Modify subtitles or captions

The API method lets you modify any field of the subtitle or caption entity: to update vtt subtitles or just update the entity's name.

Example of the request:

curl -L -X PATCH 'https://api.gcore.com/streaming/videos/2474732/subtitles/5850' \
-H 'Authorization: APIKey 1234$0d1659...' \
-H 'Content-Type: application/json' \
-d '{
    "name": "German (AI-generated)"
}'

Delete subtitles or captions

The API method allows you to delete the subtitle or caption entity.

Example of the request:

curl -L -X DELETE 'https://api.gcore.com/streaming/videos/2474732/subtitles/5850' \ 
-H 'Authorization: APIKey 1234$0d1659...'

How to view subtitles or captions

Gcore Player

Captions are integrated into Gcore's Player. Just click the icon located to the left of the volume indicator in the bottom panel of the Player to get captions.

Custom playback via API

If you have a custom player, you must get subtitles or captions from the API response or the HLS manifest (.m3u8 file.) Use this API method to get the list of subtitles for the video.

Native playback with HLS

Captions are integrated into the HLS manifest. This means they can be automatically played on many native and custom players.

Make sure there are cues in the WebVTT format.

Example of the request:

curl 'https://demo-public.gvideo.io/videos/2675_QtN3sYHVPy3KF2n/master.m3u8'

Example of the response:

#EXTM3U

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs0",NAME="English",LANGUAGE="en",AUTOSELECT=YES,DEFAULT=YES,URI="index-f5.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs0",NAME="Español",LANGUAGE="es",AUTOSELECT=NO,DEFAULT=NO,URI="index-f6.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs0",NAME="Français",LANGUAGE="fr",AUTOSELECT=NO,DEFAULT=NO,URI="index-f7.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs0",NAME="Deutsch",LANGUAGE="de",AUTOSELECT=NO,DEFAULT=NO,URI="index-f8.m3u8"

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=1720x720,FRAME-RATE=24.000,CODECS="avc1.640020,mp4a.40.2",VIDEO-RANGE=SDR,SUBTITLES="subs0"
index-svod720n-v1-a1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=928000,RESOLUTION=1144x480,FRAME-RATE=24.000,CODECS="avc1.4d401f,mp4a.40.2",VIDEO-RANGE=SDR,SUBTITLES="subs0"
index-svod480n-v1-a1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=514000,RESOLUTION=860x360,FRAME-RATE=24.000,CODECS="avc1.42c01e,mp4a.40.2",VIDEO-RANGE=SDR,SUBTITLES="subs0"
index-svod360n-v1-a1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=264000,RESOLUTION=572x240,FRAME-RATE=24.000,CODECS="avc1.42c015,mp4a.40.2",VIDEO-RANGE=SDR,SUBTITLES="subs0"
index-svod240n-v1-a1.m3u8

Examples of different players’ playback interfaces

Example of iOS player playback: Example of iOS player playback

Example of Android Exoplayer playback: Example of Android Exoplayer playback

Example of Android Exoplayer playback: Example of Android Exoplayer playback

Was this article helpful?

Not a Gcore user yet?

Explore the Streaming Platform by Gcore

Go to the product page