HomeBlog → Automatic SRT and VTT subtitles from video and webinars

Automatic SRT and VTT subtitles from video and webinars

Published 2026-08-05 · 5 min read

Subtitles raise watch time, make content usable with the sound off and help search engines understand what a video is about. Typing them by hand takes hours — here is how to get finished SRT and VTT files automatically.

SRT versus VTT

Both formats are text with timings, and the differences are small:

The rule is simple: take SRT for uploads to video platforms and VTT for your own player on your own site.

Step 1. Extract the audio from the video

There is no need to send the whole video file — the audio track alone is dozens of times smaller. One command does it:

ffmpeg -i webinar.mp4 -vn -acodec libmp3lame -q:a 5 webinar.mp3

After that conversion, an hour-long webinar weighs about 25 MB, which fits the request size limit.

Step 2. Get the subtitles in one request

The format is chosen with response_format. The service returns a finished file, so you do not have to split the text into cues yourself:

from openai import OpenAI

client = OpenAI(base_url="https://voicesscribe.com/v1", api_key="your key")

with open("webinar.mp3", "rb") as f:
    srt = client.audio.transcriptions.create(
        model="whisper-1", file=f, response_format="srt",
    )

open("webinar.srt", "w", encoding="utf-8").write(srt)

For the web, change one word:

vtt = client.audio.transcriptions.create(
    model="whisper-1", file=f, response_format="vtt",
)

From a terminal it is just as short:

curl https://voicesscribe.com/v1/audio/transcriptions \
  -H "Authorization: Bearer your key" \
  -F file=@webinar.mp3 -F model=whisper-1 -F response_format=srt \
  -o webinar.srt

Step 3. Attach the subtitles to a player

In HTML5 one line inside the video tag is enough:

<video controls src="webinar.mp4">
  <track kind="subtitles" src="webinar.vtt" srclang="en" label="English" default>
</video>

On video platforms the SRT file is uploaded in the subtitles section of the video — all that is left is to proofread the recognised text.

Long recordings: getting around the size limit

If a recording does not fit into 25 MB, split it and stitch the subtitles back together with a timing offset:

ffmpeg -i long.mp3 -f segment -segment_time 1800 -c copy part%03d.mp3

Send each part separately and, while merging, add the offset of the chunk to every timestamp. For half-hour pieces that is a few lines of code, and the limit stops being a problem.

How to make subtitles more readable

Try it on your own recordings. Sign-up takes a minute, and the free minutes are enough to judge the quality.

Get a free API key

Frequently asked questions

Can I send the video file directly?

It is more practical to extract the audio track: it is dozens of times smaller and uploads faster. A single ffmpeg command does the job.

Are the subtitles suitable for YouTube?

Yes, the SRT format is uploaded to YouTube and other video platforms without conversion.

What about a recording longer than an hour?

Split it into 20–30 minute parts, transcribe them separately and merge the subtitles with a timing offset.

How accurate are the timings?

Accurate enough for viewing: cues line up with the speech. For frame-accurate editing, subtitles are usually adjusted by hand afterwards.

Are subtitles in other languages supported?

Yes, 99 languages are recognised and the language is detected automatically. For bilingual recordings it is better to process the fragments separately.

Related reading