To generate subtitles for a short video clip or movie using command-line tools on Windows 10 (and also on Linux), you can use an open-source tool called ffmpeg. Here's a step-by-step guide:
-
Installation: First, you need to install
ffmpeg. On Windows, download the latest release from the FFmpeg website and extract the contents. Add the extracted folder to your system's PATH environment variable.On Linux, you might already have
ffmpeginstalled. If not, install it using your package manager (e.g.,apt-getfor Ubuntu,yumfor CentOS, etc.). -
Preparation: Make sure your video file is in a compatible format (e.g., MP4, AVI, etc.).
-
Command to add subtitles: Run the following command in your terminal, replacing
input_video.mp4with your video file's name andsubtitles.srtwith the subtitle file's name:ffmpeg -i input_video.mp4 -vf "subtitles=subtitles.srt" -c:a copy output_video_with_subtitles.mp4This command tells
ffmpegto read the input video file (input_video.mp4), add the subtitles from thesubtitles.srtfile, and write the output video file (output_video_with_subtitles.mp4). -
Creating subtitles: If you don't have a subtitle file, you can create one using various tools or online services. For example, you can use Subtitle Edit on Windows or Subtitle Workshop on both Windows and Linux.
After running the command, you should have a new video file with the subtitles embedded.
References: