To add a transcript under an embedded product video, turn your caption file into plain text with timestamps, then put that text in a collapsible section right below the player, with each timestamp linking to that moment in the video. Search engines and AI assistants can read the text, people who can't or won't play the video get the content, and nobody has to leave the page.
Captions help while the video plays. A transcript helps when it doesn't: when someone is skimming, when autoplay is off, or when a crawler is reading the page.
Contents
- Why add a transcript if the video has captions?
- How do you turn captions into a transcript?
- Where should the transcript go on the page?
- How do you make timestamps jump to the video?
- What if the player is a YouTube embed?
- Key takeaways
- FAQ
Why add a transcript if the video has captions?
Because captions and transcripts are read in different situations.
| Captions | Transcript | |
|---|---|---|
| When you see them | Only while the video plays | Any time the page is open |
| Who reads them | Viewers who turned them on | Skimmers, screen reader users, crawlers |
| Can you search them with Ctrl+F? | No | Yes |
| Can you scan the whole thing at once? | No | Yes |
A product demo is often watched in pieces. Someone wants to know whether you covered the export step, so they scan the text for "export" and click the time next to it. That is faster than scrubbing.
There is also a search angle. Text on the page is easy for search engines to index. A video file is not, unless you help. Our post on whether product demo videos help SEO goes into what Google needs to index a video.
How do you turn captions into a transcript?
If you already have an SRT or WebVTT caption file, the transcript is in there. You just need to strip the formatting.
A WebVTT file looks like this:
WEBVTT
00:00:00.000 --> 00:00:03.500
This is the dashboard. Every project is listed here.
00:00:03.500 --> 00:00:07.200
Click New project to start.
A small script turns it into timestamped lines:
import re
text = open("demo.vtt").read()
blocks = re.split(r"\n\s*\n", text)
for block in blocks:
lines = block.strip().splitlines()
timing = next((l for l in lines if "-->" in l), None)
if not timing:
continue
start = timing.split("-->")[0].strip()
h, m, s = start.split(":")
secs = int(h) * 3600 + int(m) * 60 + int(float(s))
words = " ".join(l for l in lines if "-->" not in l and not l.isdigit())
label = f"{secs // 60}:{secs % 60:02d}"
print(f"- [{label}](#t={secs}) {words}")
That prints Markdown list items like:
- [0:00](#t=0) This is the dashboard. Every project is listed here.
- [0:03](#t=3) Click New project to start.
Caption lines are short because they have to fit on screen. For a transcript, merge short lines into sentences and paragraphs, grouped by topic. A wall of two-word lines is hard to read.
If you don't have captions, write the transcript from the script, then fix the timings against the final video. The script and the spoken words often drift a little during editing.
Where should the transcript go on the page?
Directly under the player, inside a <details> element. It stays out of the way for people who want to watch, and it's one click away for everyone else.
<figure>
<video id="demo" controls preload="none" poster="/video/demo.jpg">
<source src="/video/demo.mp4" type="video/mp4">
<track kind="captions" src="/video/demo.en.vtt" srclang="en" label="English">
</video>
<details>
<summary>Show transcript</summary>
<ol class="transcript">
<li><a href="#t=0" data-t="0">0:00</a> This is the dashboard.</li>
<li><a href="#t=3" data-t="3">0:03</a> Click New project to start.</li>
</ol>
</details>
</figure>
Keep the text in the HTML, not loaded later by JavaScript. Text that is in the page source is the most reliable for crawlers. A closed <details> still has its content in the HTML.
Use real text, not an image of text. And don't hide the transcript with CSS tricks like display: none on a separate copy stuffed with keywords. That's cloaking, and it doesn't help readers.
How do you make timestamps jump to the video?
Add a few lines of JavaScript that read the data-t value and seek the video:
const video = document.getElementById('demo');
document.querySelectorAll('.transcript a[data-t]').forEach((link) => {
link.addEventListener('click', (event) => {
event.preventDefault();
video.currentTime = Number(link.dataset.t);
video.play();
video.scrollIntoView({ behavior: 'smooth', block: 'center' });
});
});
Use anchor links rather than buttons or click handlers on plain text, so keyboard users can tab to each timestamp. If the page adds chapters too, the chapter list and transcript can share the same list of times. We covered adding chapters to a product video for YouTube, WebVTT and MP4.
What if the player is a YouTube embed?
The idea is the same, but seeking works through YouTube's player API instead of the currentTime property. Load the IFrame Player API, create a player for the embed, and call player.seekTo(seconds, true) when a timestamp is clicked.
Two things to watch:
- The embed needs
enablejsapi=1in its URL for the API to control it. - YouTube can show its own transcript from your uploaded captions. That transcript lives on YouTube, not on your page, so it doesn't put text on your site. Keep a copy under your own embed.
I build DemoVexa, which turns a local codebase into narrated product demo videos. Captions come from the same script as the voiceover, which makes the transcript mostly a formatting job. Our page on subtitle features shows how that works.
Key takeaways
- Captions help during playback; a transcript helps when the video isn't playing.
- Build the transcript from your caption file or script, and merge short caption lines into sentences.
- Put it directly under the player in a
<details>element, as real text in the HTML. - Make timestamps links that seek the video, and keep them keyboard accessible.
- For YouTube embeds, use the IFrame Player API and keep a copy of the transcript on your own page.
FAQ
Is a transcript the same as captions?
No. Captions appear on the video while it plays and follow the timing. A transcript is the full text on the page, readable at any time.
Does a transcript help SEO?
It puts the spoken content on the page as text, which search engines can index. It isn't a ranking guarantee, but it helps the page explain what the video covers.
Should the transcript include sound descriptions?
Include sounds that matter to understanding, like a notification chime that shows a sync finished. Skip background music.
Can I use an automatic transcript?
You can start from one, but check it. Product names, acronyms and UI labels are often wrong in automatic transcripts.
I'm Baltej Singh, founder of DemoVexa, a desktop app and CLI that turns a local codebase into narrated product demo videos. I write from Delaware, USA.
About the author
- DemoVexa is a desktop app that reads your code and turns it into finished product demo videos, with a script, voiceover and your real UI animated. No screen recording.
Comments
Join the discussionNo comments yet. Be the first to comment.
