- Published:
- Updated:
- Reviewer:
- Jonathan
Convert SRT to WebVTT, or WebVTT to SRT
If you already have an SRT file, use it directly for conversion. If you only have a video, first generate and review an SRT file with Caption on Mac. Both paths continue with FFmpeg conversion to WebVTT and a check in the receiving player.
Start with an existing SRT file
Keep an original copy and work with the subtitle file that belongs to your video. Use its actual filename in the conversion command, or name a working copy input.srt. Save the result as a separate output.vtt file.
Start with a video and generate SRT in Caption
- Follow the Caption offline subtitles guide to import a local video on Mac and generate timed SRT subtitles.
- Play the video and review the words, names, numbers, and each cue’s start and end times.
- Save the finished SRT file in a folder you can find again. Keep this source file alongside the video.
- Use that SRT file in the same FFmpeg conversion step below, replacing
input.srtwith its actual filename.
Caption produces the SRT used in this path. FFmpeg performs the SRT-to-VTT conversion. The result to hand off is the VTT file you have compared with that SRT and checked against the video.
Recognize both formats
Save a UTF-8 copy and compare the two-cue examples below. Keep the blank lines between cues. Only timestamp punctuation changes: commas inside spoken text stay as text. WebVTT can also carry cue settings and other structures beyond a basic SRT cue.
1
00:00:01,000 --> 00:00:03,000
Bring a notebook.
2
00:00:04,000 --> 00:00:06,000
你好,朋友。WEBVTT
1
00:00:01.000 --> 00:00:03.000
Bring a notebook.
2
00:00:04.000 --> 00:00:06.000
你好,朋友。Convert in either direction
Use the FFmpeg download page to find a build for your system. Confirm ffmpeg -version runs in your terminal, then open the subtitle file’s folder and run the appropriate command below with your filenames. Keep paths with spaces inside quotes. -map 0:s:0 selects the first subtitle stream; -c:s webvtt or -c:s srt specifies the output encoding. -n exits if the output already exists: choose a new output filename to keep the earlier file.
ffmpeg -n -i "input.srt" -map 0:s:0 -c:s webvtt "output.vtt"
ffmpeg -n -i "input.vtt" -map 0:s:0 -c:s srt "output.srt"Compare and load the result
- Count the output cues: the example should still contain two. For a longer file, compare the first, a middle and the last cue with the SRT.
- Compare start and end times, words, punctuation and line breaks. Confirm Chinese and other non-ASCII characters remain readable in UTF-8.
- For VTT, check the
WEBVTTheader, blank lines between cues and dot milliseconds. For SRT, check cue numbers and comma milliseconds. Preserve punctuation inside the spoken text. - Load the VTT in the actual receiving player or web caption track. Play the beginning, middle and end with the video, checking that the intended subtitle track is selected and the cues appear at the expected moments.
If FFmpeg cannot find the input, check the folder, exact filename and quotes around the path. If the destination rejects the result, check its required subtitle format and the header, blank lines and UTF-8 encoding before trying again.
Handle styles and advanced features
Use this route for basic text and timings. WebVTT regions, positioning or styling can require separate handling in the destination; inspect those before selecting SRT. If parsing fails, check the header, blank lines, timestamp separators and UTF-8 text. An image-based subtitle needs OCR before this text-format workflow.
FAQ
Can I start with an existing SRT file?
Yes. Keep the original, use the SRT file as the FFmpeg input, and save a separate VTT file. Compare cue times and text before loading it in the destination player.
What if I only have a video?
On Mac, use Caption to generate SRT subtitles from the local video, review the words and timing, then save the SRT. Convert that file to VTT with FFmpeg.
What should I check after conversion?
Compare the cue count, start and end times, text, punctuation and line breaks. Check UTF-8 characters and the WEBVTT header, then inspect the beginning, middle and end in the receiving player.