SRT vs VTT: Which Caption File to Use, and How to Convert
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
SRT vs VTT: Which Caption File to Use, and How to Convert
SRT and VTT both hold timed captions as plain text. Here is how they differ, which one YouTube, Vimeo and a video tag want, and how to convert between them. SRT 和 VTT 都是以纯文本形式存储定时字幕的文件格式。本文将介绍它们的区别、YouTube、Vimeo 及 video 标签各自的要求,以及如何在两者之间进行转换。
URL: https://freelivecaption.com/en/posts/srt-vs-vtt Published: 2026-10-13 Updated: 2026-10-13 Author: Owen Davies (https://freelivecaption.com/en/about) Topic: Videos (https://freelivecaption.com/en/topics/video) 网址:https://freelivecaption.com/en/posts/srt-vs-vtt 发布日期:2026-10-13 更新日期:2026-10-13 作者:Owen Davies (https://freelivecaption.com/en/about) 主题:视频 (https://freelivecaption.com/en/topics/video)
Summary: VTT is the safer pick when you can choose: Vimeo recommends it and the HTML track element expects a .vtt file. YouTube accepts both. To convert SRT to VTT, add a WEBVTT first line and change the comma before the milliseconds to a period, then save as UTF-8. Zoom saves cloud-recording transcripts as VTT and Teams offers .docx or .vtt, so the same conversion steps apply to both. 摘要:在可以选择的情况下,VTT 是更稳妥的选择:Vimeo 推荐使用它,而 HTML track 元素也需要 .vtt 文件。YouTube 则两者皆可。若要将 SRT 转换为 VTT,需在第一行添加 WEBVTT,并将毫秒前的逗号改为句点,然后以 UTF-8 编码保存。Zoom 将云录制转录保存为 VTT,Teams 则提供 .docx 或 .vtt 格式,因此两者均适用相同的转换步骤。
Which format for which place: VTT is the safer default when you get to choose. Vimeo recommends WebVTT, and the HTML
Where the captions go: 字幕存放位置:
| Use | Notes |
|---|---|
| YouTube | SRT, or VTT if you need positioning. Both are accepted. |
| Vimeo | VTT. SRT is accepted too. |
| VTT. Convert an SRT first. | |
| A media player or TV app | Whatever its subtitle menu lists. Convert if it names only one. |
| 用途 | 备注 |
|---|---|
| YouTube | SRT,如果需要定位则使用 VTT。两者均可。 |
| Vimeo | VTT。SRT 也被接受。 |
| 自建网页的 | VTT。需先将 SRT 转换。 |
| 媒体播放器或电视应用 | 视其字幕菜单列出的格式而定。如果只列出一种,请进行转换。 |
How the two files look: Both are plain text: a timing line, the caption, a blank line. Here is the same caption in each. 文件外观:两者均为纯文本,包含时间轴行、字幕内容和空行。以下是同一字幕在两种格式中的表现。
SRT: 1 00:00:01,000 —> 00:00:03,500 Welcome back to the channel.
2 00:00:03,800 —> 00:00:06,200 Today we’re fixing a leaky tap.
WebVTT: WEBVTT 00:00:01.000 —> 00:00:03.500 Welcome back to the channel.
00:00:03.800 —> 00:00:06.200
The differences you will actually run into: A WebVTT file must begin with the word WEBVTT. SRT has no header, just a counter before each caption. SRT writes the timestamp as HH:MM:SS,mmm with a comma, according to YouTube’s format list. The WebVTT spec uses a period, and it lets you drop the hours. The numbers above each caption are optional in WebVTT, so converted files can keep them. WebVTT can mark who is speaking with a
YouTube: Either format uploads. YouTube points beginners to SRT (or SBV) because it needs only timing and text, and SRT must be plain UTF-8. Pick VTT when a caption has to sit somewhere other than the default spot, or you want bold, italic or underline. YouTube’s page limits WebVTT styling to those three tags and describes its WebVTT support as an initial implementation, so don’t count on fancy CSS surviving. YouTube:两种格式均可上传。YouTube 建议初学者使用 SRT(或 SBV),因为它仅需时间和文本,且 SRT 必须是纯 UTF-8 编码。当字幕需要放置在非默认位置,或者需要加粗、斜体或下划线时,请选择 VTT。YouTube 的页面将 WebVTT 样式限制为这三种标签,并将其 WebVTT 支持描述为初步实现,因此不要指望复杂的 CSS 能生效。
Vimeo: Vimeo takes SRT and WebVTT, both in UTF-8. To add a file, open your Library, open the video, click the Languages button in the toolbar to the left of the player, then click the plus button and upload the file from your computer. Two dropdowns ask for the language and whether the file is a subtitle or a caption track. The three-dot menu next to an uploaded file lets you download, replace, delete or edit it. Vimeo:Vimeo 接受 UTF-8 编码的 SRT 和 WebVTT 文件。要添加文件,请打开您的库,打开视频,点击播放器左侧工具栏中的“语言”按钮,然后点击加号按钮并从电脑上传文件。两个下拉菜单会询问语言以及该文件是字幕还是隐藏式字幕轨道。已上传文件旁边的三点菜单允许您下载、替换、删除或编辑它。
A video tag on your own page: Browsers load the track from a .vtt file, so an SRT has to be converted first. A minimal version: 自建网页的 video 标签:浏览器从 .vtt 文件加载轨道,因此 SRT 必须先进行转换。最小化版本如下:
MDN’s attribute notes cover the rest. kind=“captions” includes sound effects and musical cues, while kind=“subtitles” covers dialogue or its translation and requires srclang. Only one track per video can carry default. The track URL must have the same origin as the page unless the
A media player or TV app: Open the player’s subtitle or caption menu, or its help page, and see which formats it names. If it lists both, either works. If it lists one, convert to that. If the clip has to play anywhere, you can also build the subtitles into the picture. 媒体播放器或电视应用:打开播放器的字幕菜单或帮助页面,查看它列出的格式。如果两者都列出,则均可使用。如果只列出一种,请转换为该格式。如果视频片段需要在任何地方播放,您也可以将字幕直接压制进视频画面中。
Converting SRT to VTT and back: A short file takes a few minutes in a plain-text editor. Work on a copy and save as UTF-8, which YouTube, Vimeo and the WebVTT spec all call for. If CapCut’s auto captions fail and you need an SRT instead, see the SRT import fallback for CapCut. SRT 与 VTT 的互转:在纯文本编辑器中处理短文件只需几分钟。请在副本上操作并保存为 UTF-8 编码,这是 YouTube、Vimeo 和 WebVTT 规范的要求。如果剪映(CapCut)的自动字幕失败且您需要 SRT,请参阅剪映的 SRT 导入备选方案。
SRT to VTT: Add WEBVTT as the first line, then a blank line. Change the comma before the milliseconds in every timing line to a period. In an editor with regular-expression search, find (\d\d:\d\d:\d\d),(\d\d\d) and replace it with \1.\2 (some editors want $1.$2). A plain replace-all on commas would also change commas inside the dialogue. Save the file with a .vtt extension. SRT 转 VTT:在第一行添加 WEBVTT,然后空一行。将每一行时间轴中毫秒前的逗号改为句点。在支持正则表达式搜索的编辑器中,查找 (\d\d:\d\d:\d\d),(\d\d\d) 并将其替换为 \1.\2(某些编辑器需要 $1.$2)。直接全部替换逗号会改变对话内容中的逗号。保存文件时使用 .vtt 扩展名。
VTT to SRT: Delete the WEBVTT line and any NOTE or STYLE blocks. Change the period before the milliseconds in each timing line to a comma. If a timestamp has no hours, add them, so 05:12.300 becomes 00:05:12,300. Remove anything after the timing on that line (align:, position:) and strip
Why Zoom and Teams give you a VTT: Zoom saves the audio transcript of a cloud recording as a separate VTT file. That needs a Pro, Business, Education or Enterprise account with both cloud recording and audio transcription turned on. Teams lets the organizer and co-organizers download a meeting transcript as .docx or .vtt from Chat → Recap → Transcript → Download dropdown. A meeting transcript needs a time for each passage and a name for each speaker, and WebVTT has both built in through cue timings and the
If the captions don’t show up: Accented or non-Latin characters look broken. The file isn’t UTF-8. Vimeo warns. 如果字幕无法显示:带重音或非拉丁字符显示乱码。文件不是 UTF-8 编码。Vimeo 曾发出过此类警告。