How to Convert VTT to SRT

How to convert VTT to SRT

Subtitles and captions are essential for making video content accessible and enjoyable to a wider audience, but different formats can pose compatibility issues. Two of the most common subtitle formats are VTT (Web Video Text Tracks) and SRT (SubRip Subtitle). While VTT is often used for online video platforms, SRT is widely compatible with various media players and editing software. 

Converting from VTT to SRT can be crucial for content creators looking to reach a broader audience. This guide will explain a few simple, step-by-step processes to convert VTT files to SRT format. Whether you’re a video editor or content creator or are just looking to make your videos more accessible, this article will provide the necessary tools and tips to ensure a smooth conversion process.

Key Takeaways

  • VTT and SRT are two common subtitle formats, but SRT is more widely compatible with media players and editing software. 
  • VTT offers more advanced features like styling and positioning, but SRT prioritizes simplicity and broad compatibility.
  • Converting VTT to SRT is straightforward. You can do it manually in a text editor, use online tools, or employ conversion software like FFmpeg.

What is a VTT file?

A WebVTT subtitle file (.vtt) is a widely supported format for storing subtitles. It’s a human-readable file format where the subtitles are stored sequentially, along with timing information and metadata. These days, most subtitles distributed on the internet are in this format.

What is an SRT file?

An SRT file, or SubRip Subtitle file (.srt), is one of the most popular subtitle file formats for video content where storing metadata isn’t an important concern. These plain text files include the text of the subtitles in sequence, along with the start and end time codes.

When You Might Need to Convert VTT to SRT

While VTT and SRT are the two most widely accepted standards in captioning, there are occasions where you may need to convert VTT to SRT. A few of those occasions are mentioned below.

  • Incompatibility: Perhaps you’ve downloaded subtitles in VTT, but your media player is only compatible with SRT. Media players, including players like VLC, Windows Media Player, and others, support SRT.
  • Video Editing Software: For video editors, SRT files are often easier to work with. Major editing software like Adobe Premiere Pro or Final Cut Pro may have better support for SRT, making the editing process smoother.
  • Easy Editing: If you want to edit subtitles in a VTT format, you may want a VTT to SRT converter. SRT’s plain text format is friendly with any text editor, giving you more freedom to do the job.
  • Accessibility: VTT’s allowance for fancy positioning and styles is great for diverse needs, but they may not make sense when sharing them with someone who needs basic captions. In that case, converting .vtt to .srt is great to support wider compatibility.

Comparing VTT and SRT files

VTT (Before Conversion)SRT (After Conversion)
File FormatWebVTT format, designed for HTML5 videoPlain text format
CompatibilityPrimarily used for online videos, especially HTML5-based web playersWidely supported by most video players and editing software
Syntax and StructureMore complex syntax with support for rich metadata and styling optionsSimpler syntax primarily focused on subtitle text and basic timing
Styling and PositioningSupports advanced styling and positioning using CSS-like tagsBasic or no styling; positioning is usually up to the video player
Cue SettingsAllows detailed cue settings like vertical text, line, and positionBasic cue settings are limited to start and end times
Comments and MetadataCan include comments and metadata for additional informationTypically, it does not support metadata or detailed comments
Conversion ProcessIt may require software or online tools to convert accuratelyConversion simplifies the file, stripping advanced features to basic subtitle text and timing
File SizePotentially larger due to additional metadata and styling informationGenerally smaller and more streamlined
Use CasesIdeal for web-based video applications requiring interactive or styled subtitlesPreferred for general use in standard video players and basic subtitling needs

How to Convert VTT to SRT

Conversion is pretty straightforward, following these step-by-step instructions on how to convert a VTT file to SRT. This is a bit of a manual process, so if you have a longer file, you might want to skip this method.

  1. Open the VTT File: Use a text editor (like Notepad or TextEdit) to open the VTT file.
  2. Remove WebVTT Header: Delete the first line that usually contains “WEBVTT” or similar header text.
  3. Adjust Timestamps: Change the timestamp format from hours:minutes:seconds.milliseconds to hours:minutes:seconds,milliseconds (replace the period with a comma).
  4. Delete Extra Metadata: Remove any additional metadata or cues specific to VTT and not supported in SRT (like position or alignment cues).
  5. Save as SRT: Save the file with a .srt extension. Ensure the text encoding is UTF-8 for compatibility.
  6. Test the SRT File: Load the SRT file into a video player to ensure the subtitles display correctly and are synchronized with the video.

Looking to convert other files to subtitles or captions? Check out some of our guides below:

Other Ways of Converting VTT to SRT

Need something a little quicker? Here are a few other ways to convert VTT to SRT.

Convert VTT to SRT Using Python 

If you’re comfortable with coding, Python offers a flexible way to convert VTT to SRT. 

  1. Install the webvtt-py Library: Open your terminal or command prompt and type: ‘pip install webvtt-py’. Make sure you already have Python installed and set up correctly on your device. You’ll see a “Successfully installed” message like you see below.
  1. Create a Python Script:

import webvtt

# Function to convert VTT timestamp to SRT timestamp format

def convert_timestamp(timestamp):

    return timestamp.replace(‘.’, ‘,’)

# Load the VTT file

vtt = webvtt.read(‘sample VTT file.vtt’)

# Open a new file to write the SRT content

with open(‘converted file.srt’, ‘w’) as f:

    for i, caption in enumerate(vtt):

        # Write the subtitle number

        f.write(str(i + 1) + ‘\n’)

        # Convert and write the start and end times in SRT format

        start = convert_timestamp(caption.start)

        end = convert_timestamp(caption.end)

        f.write(start + ‘ –> ‘ + end + ‘\n’)

        # Write only the text of the caption

        # Any metadata or styling information will be ignored

        f.write(caption.text + ‘\n\n’)

Remember that ‘your_file.vtt’ will need to be replaced by the name of the target file you intend to convert, and ‘your_file.srt’ will be the name of the final SRT file generated. If you need a different name, just replace the ‘your_file’ part before .srt, and you’ll be good to go!

  1. Run the Script: Make sure the VTT file and the Python file you just created are in the same folder and execute the Python script. Your SRT file will pop up in the same destination.

Convert VTT to SRT with Mac

Mac users have a handy built-in tool for subtitle conversions, as follows:

  1. FFmpeg Installation: Ensure FFmpeg is installed on your Mac, as it’s not included by default. You can install FFmpeg using Homebrew (a package manager for macOS) by running ‘brew install FFmpeg’ in the Terminal.
  2. Open Automator: You can find the Automater in your Applications folder.
  3. Create a New Quick Action: Select “Quick Action” as the type for your new document. In the top right corner of the Automator window, set the “Workflow receives current” dropdown to “files or folders” in “Finder.”
  4. Add Actions:
  • Drag the “Get Specified Finder Items” action into your workflow if you want to add files each time you run the action manually. Alternatively, you can skip this action if you prefer to use the workflow by right-clicking on files in Finder.
  • Drag the “Run Shell Script” action to the workflow, placing it below the “Get Specified Finder Items” action (if used).
  • In the “Run Shell Script” action, set “Pass input” to “as arguments.” 
  1. Paste the following script:

#!/bin/bash

for f in “$@”

do

    /usr/local/bin/ffmpeg -i “$f” “${f%.*}.srt”

Done

At the end, your Automator will look something like this.

  1. Save Your Quick Action: Save your Quick Action with an appropriate name, like “Convert to SRT.”

Convert VTT to SRT with FFmpeg

FFmpeg, a versatile multimedia toolkit, can also handle subtitle conversions as follows:

  1. Download FFmpeg: Here are the steps to properly download FFmpeg.
  • Go to the FFmpeg official website: FFmpeg.org
  • Click on the “Download” link and choose a Windows build from the provided links. The gyan.dev or BtbN builds are popular choices.
  • Extract the Files.
  • After downloading, extract the ZIP file to a location on your computer, such as C:\FFmpeg.
  • Add FFmpeg to the Windows Path:
  • Right-click on “This PC” or “My Computer” and select “Properties.”
  • Click on “Advanced system settings” and then “Environment Variables.”
  • Under “System Variables,” find and select the “Path” variable, then click “Edit.”
  • Click “New” and add the path to the bin folder inside the extracted FFmpeg folder, e.g., C:\FFmpeg\bin.
  • Click “OK” to close all dialog boxes.
  • Open Command Prompt and type ‘ffmpeg -version’ to check if it’s properly installed. If it is, the response will look something like this.
  1. Open a terminal or command prompt: Use the CD command (change directory) to navigate to your VTT file’s directory. Write “cd” and enter the full path of the VTT file.
  2. Run the Command:

ffmpeg -i your_file.vtt your_file.srt

Make sure to replace your_file.vtt with the actual name of your VTT file. 

Converting VTT to SRT: Frequently Asked Questions

Here are some of the most frequently asked questions from those who are interested in how to convert VTT to SRT:

Can You Convert VTT to SRT?

Yes, you can convert VTT to SRT. It is a common and straightforward process. Many online tools and software programs can handle this conversion quickly and easily.

What Is the Difference Between VTT and SRT?

Both VTT and SRT format subtitles, but VTT offers more advanced features like text formatting and positioning, while SRT prioritizes simplicity and broad compatibility. SRT is considered to be more easily editable and accessible, while VTT is limited in terms of software compatibility. 

What Does SRT Txt Mean?

SRT stands for “SubRip Subtitle Text.” It’s a plain text file format specific to subtitles, with each line representing a subtitle segment and its timing information. 

How Do I View an SRT File?

Most video players support open SRT files directly within the video interface. Many text editors can also display SRT files, though formatting might be limited.

Closing Thoughts

Converting VTT to SRT enhances video accessibility, catering to diverse audiences. This guide provided various methods, from simple text editing to automated software like FFmpeg and Python scripts. 

Mastering these techniques ensures broad compatibility across media players and editing platforms, making your content more inclusive and engaging and significantly improving the viewer’s experience. If you want to reach a wider audience, converting your subtitle files from VTT to SRT is a great place to start.

Accurate, automated transcription

Sonix uses the latest AI to produce automated transcripts in minutes.
Transcribe audio and video files in 35+ languages.

Try Sonix Today For Free

Includes 30 minutes of free transcription

en_USEnglish