Convert WebVTT to SRT with FFmpeg

Converting WebVTT (.vtt) subtitles to SubRip (.srt) format is a common task when preparing media files for players or platforms that do not support the VTT format. This article provides a quick and direct guide on how to use FFmpeg, a powerful open-source command-line tool, to convert your closed captions from WebVTT to SRT seamlessly.

The Basic Conversion Command

To convert a single WebVTT file to SRT, open your terminal or command prompt and run the following command:

ffmpeg -i input.vtt output.srt

Command breakdown: * ffmpeg: Calls the FFmpeg program. * -i input.vtt: Specifies the path to your input WebVTT subtitle file. * output.srt: Specifies the path and name of the newly created SRT file.

FFmpeg automatically detects the input format, parses the text and timestamps, and writes them into the standard SRT format without requiring any extra configuration.

Batch Converting Multiple Files

If you have multiple WebVTT files in a directory and want to convert them all to SRT at once, you can use a simple command-line loop.

On Windows (Command Prompt):

for %i in (*.vtt) do ffmpeg -i "%i" "%~ni.srt"

On macOS and Linux (Terminal):

for f in *.vtt; do ffmpeg -i "$f" "${f%.vtt}.srt"; done

These loop commands search for all files ending in .vtt in the current directory and convert them to .srt while preserving their original filenames.