[0:00] Welcome to full course online. [0:02] In this tutorial, you will learn how to [0:04] add subtitles to a video using FFmpeg. [0:08] Before we begin, if you want to know how [0:11] to configure and install FFmpeg, watch [0:14] another video in this playlist. [0:16] That video will guide you step by step [0:19] through the installation. [0:21] Now, let's continue. [0:26] You need three things before adding [0:28] subtitles. [0:30] ffmpeg installed on your computer. Open [0:34] command prompt and type ffmpeg. [0:40] If you see output like this, then ffmpeg [0:43] is configured on your PC. If not, then [0:46] watch this video. Second thing you need [0:49] is a video file. For example, my [0:51] video.mpp4. [0:54] In our case, the file is stored in D [0:56] drive. Let me play the video. [1:00] >> Hello everyone. Welcome to full course [1:02] on [1:03] >> As you can hear the voice of a female. [1:06] Let me check the subtitle. And as you [1:08] can see, there is no subtitle available. [1:12] The third thing you need is a subtitle [1:14] file in SRT format. For example, my [1:17] video. SRT. [1:19] If you don't already have a subtitle [1:21] file, you can create one with a text [1:24] editor. Here is a simple example. [1:28] Line one starts with a number. Then [1:31] comes the timing. [1:33] For example, 0 hours, 0 minutes, [1:38] 1 second [1:40] to 0 hours, [1:44] 0 minutes for seconds. [1:47] Then write the subtitle text. [1:51] Save the file as my video. SRT. [1:58] There are also many transcribe tools [2:00] available which can convert audio file [2:03] to SRT. [2:08] Now let's add subtitles in a soft [2:11] format. [2:12] This means the subtitles are inside the [2:14] video but can be turned on or off. The [2:18] command is given on the screen. Here's [2:21] how this command works. [2:23] The first dash I gives the input video [2:26] file which is my video.mpp4 [2:28] located in the D drive. The second dash [2:32] I gives the subtitle file which is my [2:34] video. SRT located in the SRT folder [2:38] inside the D drive. [2:40] - Copy means copy the video and audio [2:43] streams without re-encoding. So there is [2:45] no loss in quality. - C col sRT tells [2:50] FFmpeg to take the subtitle file and [2:53] save it as an SRT track inside the [2:55] output container. [2:57] Finally, we name the output file as [3:00] output MKV. [3:02] Mention correct path of both video file [3:04] and SRT file. The output file name is [3:08] output and will be stored on D drive. [3:11] This keeps the video quality the same [3:13] and only adds the subtitle track. [3:21] Let us test it. Open the output file in [3:24] VC media player. [3:26] >> Hello everyone. Welcome to full course [3:28] online. [3:29] >> As you can see now we can turn on [3:31] subtitles [3:34] >> in the search box. A list of websites l [3:38] >> you can see the subtitles on the screen. [3:40] Now, [3:44] if you prefer MKV format, the command is [3:47] slightly different. The command can be [3:50] seen on the screen. Here's how this [3:53] command works. The first dash I tells [3:56] ffmpeg the input video file. In this [4:00] case, it is my video.mpp4 stored in the [4:03] D drive. The second dash I tells FFmpeg [4:07] the input subtitle file. Here we are [4:10] using my video. SRT stored inside the [4:13] SRT folder on the D drive. - Copy means [4:18] copy the video and audio streams exactly [4:20] as they are without re-encoding. [4:24] This makes the process fast and keeps [4:26] the original quality. [4:28] - CSRT [4:30] tells FFmpeg to copy the subtitle file [4:33] and embed it as an SRT track in the new [4:36] container. [4:37] And finally we give the output file name [4:40] as output.m MKV which will be saved in [4:43] the D drive. This way the MKV file [4:46] includes the subtitles as a separate [4:49] track. [4:59] That's it. Now you know how to add [5:01] subtitles to any video using FFmpeg. [5:05] Subscribe this channel for more such [5:07] videos. [5:09] Thanks for watching.