---
title: "What is an SRT subtitle file? Format, timing and WebVTT"
description: "An SRT file is numbered captions with start and end times in plain text. The format, how WebVTT differs, and how to build SRT from a speech-to-text API."
url: https://broadrouter.com/glossary/srt-subtitles/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# SRT subtitles

Updated 2026-11-15

SRT (SubRip) is a plain-text subtitle format. Each caption is a sequence number, a start and end time written as hh:mm:ss,mmm --> hh:mm:ss,mmm, one or more lines of text, and a blank line. WebVTT is the similar web format used by HTML video.

Also called: SRT, SRT file, SubRip, WebVTT, subtitle file

A subtitle file is a transcript with a clock attached. Getting the text is the easy half; the times are the hard half.

## How it works

An SRT file is plain text. Each caption block has four parts:

```text
1
00:00:00,000 --> 00:00:02,800
مرحباً بكم في الحلقة الأولى

2
00:00:03,600 --> 00:00:07,600
اليوم نتحدث عن تحويل الكلام إلى نص
```

The Library of Congress format description gives the time format as hours:minutes:seconds,milliseconds, with “two hyphens (—) and a right-pointing angle bracket (>)” between start and end, and a blank line after each block. It calls SRT “a very simple text format, but not well standardized,” with no character-encoding standard. The extension is `.srt`.

WebVTT, the W3C format for HTML video text tracks, looks almost the same. The spec requires a first line of `WEBVTT`, a full stop before milliseconds (`00:00:10.700`), UTF-8 encoding and the `text/vtt` media type. As of 15 November 2026 it is a W3C Candidate Recommendation Draft.

## Why it matters

-   **Timing comes from the API, or from you.** Some speech-to-text APIs return word or segment [timestamps](https://broadrouter.com/glossary/timestamps-asr/) or a finished file. OpenAI’s transcription reference lists `srt` and `vtt` among its `response_format` values, but says the format depends on the model and that `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` return `json` only.
-   **Arabic layout.** SRT has no direction markup, so the player decides how right-to-left text and punctuation are shown. See [right-to-left text](https://broadrouter.com/glossary/rtl-text/).
-   **Readability rules.** Line length, lines per caption and reading speed are set by style guides, not by the format.

## On BroadNet Inference

BroadNet’s transcription endpoint returns text without timestamps, so it cannot produce SRT directly. The workable approach, tested in [Arabic subtitles (SRT) from a speech-to-text API](https://broadrouter.com/blog/arabic-subtitles-srt-api/):

1.  Find pauses with FFmpeg’s `silencedetect` (or a [VAD](https://broadrouter.com/glossary/vad/)).
2.  Cut each speech span, capped at about 12 seconds, to 16 kHz mono WAV.
3.  Transcribe each span with `language=ar` on [BroadNet Transcribe Arabic](https://broadrouter.com/models/cohere-transcribe-arabic/).
4.  Use each span’s start and end as caption times, sharing them across lines in proportion to text length.
5.  Write the numbered SRT blocks.

Span edges are as accurate as your pause detection; times inside a span are estimates. That suits talks and podcasts, not lip-synced drama. For frame-accurate timing, use a provider that documents word timestamps. Short spans also mean more requests, so watch the pay-as-you-go limit of 30 requests a minute. The [audio splitter tool](https://broadrouter.com/tools/audio-splitter-ffmpeg/) writes the FFmpeg commands.

## Common mistakes

-   **Dots instead of commas in SRT times**, or the reverse in WebVTT. Many players reject the wrong one.
-   **Missing blank lines** between blocks, which merges captions.

## Questions

### What is the difference between SRT and WebVTT?

WebVTT files start with the line WEBVTT, use a full stop before the milliseconds (00:00:10.700), must be UTF-8 and use the text/vtt media type. SRT uses a comma (00:00:10,700) and, per the Library of Congress, has no character-encoding standard.

### Can BroadNet return an SRT file?

No. BroadNet's documented transcription response is JSON with a single text field and no timestamps. You build the caption times yourself, for example from the offsets of audio chunks.

### What encoding should an Arabic SRT file use?

Use UTF-8 and test in the players your audience uses. SRT has no encoding standard, so some older tools guess the encoding from the bytes.

## See also

-   [Timestamps (speech-to-text)](https://broadrouter.com/glossary/timestamps-asr/) (term)
-   [Speech-to-text](https://broadrouter.com/glossary/speech-to-text/) (term)
-   [Voice activity detection (VAD)](https://broadrouter.com/glossary/vad/) (term)
-   [Right-to-left (RTL) text](https://broadrouter.com/glossary/rtl-text/) (term)
-   [WAV](https://broadrouter.com/glossary/wav/) (term)
-   [Arabic speech-to-text API, step by step](https://broadrouter.com/guides/arabic-speech-to-text-api/) (guide)
-   [Arabic subtitles (SRT) from a speech-to-text API: what you need](https://broadrouter.com/blog/arabic-subtitles-srt-api/) (article)
-   [Transcribe long audio over 25 MB: split, send and stitch](https://broadrouter.com/blog/transcribe-long-audio-files-api/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-srt-subtitles&utm_content=page-cta) ·

**Sources**

-   [Library of Congress, Sustainability of Digital Formats: SubRip (SRT) fdd000569 (checked 2026-11-15)](https://www.loc.gov/preservation/digital/formats/fdd/fdd000569.shtml)
-   [W3C, WebVTT: The Web Video Text Tracks Format, Candidate Recommendation Draft (checked 2026-11-15)](https://www.w3.org/TR/webvtt1/)
-   [OpenAI API reference, create transcription: response\_format options by model (checked 2026-11-15)](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
-   [BroadNet Inference API reference: transcription response {"text": ...} (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-srt-subtitles&utm_content=sources)
