Caption track / Measured test

YouTube to Transcript: Why the Text Repeats Itself

A 24-minute-37-second video returned 1,318 caption cues. Paste them as they come and you get 12,010 words, but only 4,056 of those words are actually spoken — 2.96 times the text is repeated. Two more videos did the same: 2.99 and 2.97 times. Half of every cue list is made of 0.01-second fragments that contain nothing new: 659, 586 and 772 of them. Merge the overlapping tails and the same three files become 285, 233 and 363 sentences at 164.7, 200.4 and 206.8 words per minute of video. The repeats are in the caption data, not in the audio.

What three videos returned

On 2026-11-27 I sent three public YouTube links, one at a time, to TranscriptLeaf's link endpoint (POST https://transcriptleaf.com/api/link-transcript) — the same route behind the site's link entry, which is currently closed while its platform list is empty. The three videos are recent Computerphile uploads: The Private Key Mistake! (24 min 37 s), ?PHP Problem? (19 min 10 s) and How Image Watermarking Works (25 min 8 s). All three came back with an English automatic caption track. Each request took 4.6 to 5.7 seconds, spaced about 65 seconds apart because the endpoint rate-limits bursts.

VideoLengthCuesCues of 0.1 s or lessWords if pastedWords spokenRatio
The Private Key Mistake!24:371,31865912,0104,0562.96×
?PHP Problem?19:101,16858611,4873,8412.99×
How Image Watermarking Works25:081,54477215,4445,1962.97×

“Words if pasted” is the sum of every cue's text, which is what you get when the cue lines are joined in order — the site's own code builds one subtitle block per cue and joins the cue texts with single spaces for the plain-text view. “Words spoken” is the same stream after removing the repeated tails. Across the three videos that is 38,941 words pasted against 13,093 spoken, and 25,848 of the pasted words are repeats.

Three paired bars: The Private Key Mistake returns 12,010 words pasted against 4,056 spoken, PHP Problem 11,487 against 3,841, and How Image Watermarking Works 15,444 against 5,196
Every video returns about three times as many words as it contains. The gap is the same size on all three.

Where the repeat comes from

The caption track arrives as a rolling window. Each long cue carries the new words plus the tail of the cue before it, and between two long cues sits a 0.01-second cue holding only the phrase the two long cues share. Five consecutive cues from The Private Key Mistake show it plainly:

StartDurationText
108.08 s2.71 sNow, in order to set up a TLS TLS connection, you need to know the public
110.79 s0.01 sconnection, you need to know the public
110.80 s3.00 sconnection, you need to know the public key of the website that you're talking
113.79 s0.01 skey of the website that you're talking
113.80 s2.71 skey of the website that you're talking to. Let's go with the BBC as our

Read the end of the first row: “connection, you need to know the public”. That phrase is the second row on its own, 0.01 seconds long, and it is also how the third row begins. Every phrase in the list gets this treatment — once at the end of one long cue, once alone, once at the start of the next — which is exactly the 2.96 to 2.99 ratio above. Nothing is wrong with the audio; the cue list stores the same speech at three positions so a player can redraw the subtitle line as it grows. The whole eight-cue sample, with times and text, is in this CSV: youtube-to-transcript-cues.csv

Six stacked cue bars from 108.07 to 116.52 seconds: long green bars carry new words plus the previous tail, short beige bars carry only the repeated tail
Long cues add new words; the 0.01-second cues between them add nothing. Both types count toward the pasted word total.

What this does to a single sentence

The repeats do not fall on tidy sentence boundaries. One sentence in The Private Key Mistake — “But now the question is, how do I know that this key really does belong to the BBC and not to a hacker who's pretending to be the BBC.” — is 29 words spoken over 8.80 seconds. In the cue list it starts at 122.69 s, continues at 126.05 s and 128.17 s, and finishes at 131.49 s. Four cue starts, four copies of overlapping text, one sentence.

That is why a first attempt to clean the text by hand goes wrong. If you delete every duplicate line you also delete the cue that carries the sentence's start time, and if you keep the timestamps you keep the repeats. The reliable rule is to walk the cues in order and append only the words beyond the longest overlap with what you have already written, taking the start time of the cue where each new word first appears. Applied to the three videos that rule produces 285, 233 and 363 sentences — 14.2, 16.5 and 14.3 words per sentence on average — against 1,318, 1,168 and 1,544 raw cues.

Which export to keep

The three standard exports hold the same words in different clothes, and the difference matters once the cue list repeats itself. The plain-text view has no timestamps at all, so it cannot tell you where a line came from. The SRT file gets one numbered block per cue — 1,318 blocks for the first video, of which 659 last 0.01 seconds — and the VTT file carries the same blocks with dots instead of commas in the milliseconds and a WEBVTT header. If you need to jump back to the moment a sentence was said, keep the SRT: the block number of the first cue in a sentence is the only handle you have, and the 0.01-second blocks around it are noise you can skip.

For notes and quoting, the merged text is the one to copy: 20,831 characters for the first video against 61,721 characters if every cue is pasted. That is a 40,890-character difference on one 24-minute video, and it is all repetition rather than missing speech.

How to reproduce it

The endpoint takes one URL and returns a JSON object with a cues array, plus language and source fields. This is the request used for the three videos: curl -X POST https://transcriptleaf.com/api/link-transcript -H "content-type: application/json" -d "{\"url\":\"https://www.youtube.com/watch?v=NDgS__J1U-M\"}". Expect a 429 if you fire several in a row — in this test six rapid requests were refused and spacing them about 65 seconds apart cleared it. The per-video figures are in a second CSV: youtube-to-transcript-videos.csv

The merge rule in code, without a library: keep a running list of accepted words. For each cue, compare its words with the last words you accepted, find the longest run where the end of your text equals the start of the cue, and append only what comes after that run. Record the cue's start time against the first word you append. Everything before that run is a repeat.

What this test does not prove

Three videos, one channel, one afternoon, automatic English captions only. A video with manually uploaded captions, a translated track, or a different caption format may behave differently, and I did not compare the same video's manual and automatic tracks. The word counts inherit the caption track's own errors — missing punctuation, misheard names, no speaker labels — so 4,056 words is what the track says, not a corrected transcript. I did not test the mobile app, a signed-in session, another region, or whether the rolling window changes with YouTube's settings. The endpoint's rate limit was observed, not characterised: six requests in quick succession gave 429, and I did not find the exact threshold. And because the link entry is closed, these numbers come from the endpoint directly rather than from the tab a visitor would use.

What the numbers do support is narrow: for these three videos, pasting the caption cues in order triples the text, half the cues are 0.01-second fragments, and the repeats sit inside sentences rather than on their edges. If your pasted transcript looks like the same sentence three times, that is the format doing it, not the speaker.

Upload a saved audio or video file and export TXT, SRT or VTT