[0:07] [Music] [0:36] hi I'm dr. James welcome to another [0:39] gamer skills video the topic today is [0:41] how to heartburn subtitles into a video [0:44] file you'll need to have a copy of [0:45] ffmpeg on your system a video file with [0:49] embedded subtitles and for the demo [0:52] today I'm using a bot while for several [0:55] containers that natively embed subtitles [0:57] including Bob's which are really mpegs [1:00] MK b's Petroski files etc there are a [1:03] variety of reasons that you might want [1:05] to heartburn subtitles first you can [1:07] guarantee that they'll be displayed [1:08] subtitles can be finicky in terms of [1:11] getting them to show up second you can [1:13] guarantee that the subtitles are visible [1:15] and in the right format third you can [1:17] decrease the number of files that have [1:18] to be transmitted and stored as I said [1:20] earlier we're gonna use a bob file for [1:22] our demo today this is how a DV decodes [1:26] the MPEG file to display in your machine [1:28] most of the time you'll see Bob files [1:30] divided into one gigabyte legs you could [1:35] write a script that would individually [1:36] burn the subtitles and to appropriate [1:38] Bob's but I like to combine the Bob's it [1:41] also has some secondary benefits such as [1:43] decreasing the final size of the files [1:45] that'll show you below and making it [1:47] easier to code in person there are [1:50] several ways to concatenate the bob [1:52] files one method uses the same technique [1:55] that was used to combine the mp3 files [1:57] shown in the gamer skills video on [1:58] getting mp3 files into audible you can [2:02] also run a program called rip Bob and [2:03] we'll talk about replied in another [2:05] video the download link is shown below [2:07] in my comments area let's look at the [2:10] script in a little more detail that I'm [2:11] gonna use today to hard burn the [2:13] subtitles the script is consist of just [2:16] two lines of code the first takes the [2:18] action the second waits for the user to [2:20] acknowledge the work is complete looking [2:22] at that first line in more detail though [2:23] the first portion identifies all of the [2:26] file types of interest and then calls [2:28] ffmpeg to take a particular action [2:31] in this case we're using valve files in [2:34] the second portion we tell ffmpeg to [2:37] take the first video stream in the first [2:39] subtitle stream and overlay them that is [2:41] burn them into the same video stream the [2:43] first audio stream is also mapped back [2:45] in in the final section we tell ffmpeg [2:48] to synchronize the audio and video [2:50] portions of the file 1,000 times per [2:52] second and that the target is for use in [2:55] a DVD in particular in its movie that [2:59] establishes a number of characteristics [3:00] including minimal bitrate frames per [3:02] second etc of course you can set all [3:05] those parameters one at a time but it [3:07] just makes it easier to use this target [3:09] finally we tell ffmpeg that the output [3:13] file is MPEG and that the file should be [3:15] assigned the same names as the original [3:18] input Bob and placed in the new folders [3:20] new files folder you can run the script [3:24] shown in a number of ways you can just [3:25] double click on it from the Explorer and [3:27] let it run you can open a command [3:30] console and run the batch file from its [3:32] location one useful trick is to [3:36] right-click on the batch file and select [3:39] edit to bring up the open file in text [3:41] editor so this is for when you want to [3:44] modify those batch bugs yourself I [3:46] learned this trick from the doom 9 forum [3:49] you can see that I use a subfolder [3:51] called new files to put the translator [3:52] folders in - and that's just a good [3:54] practice to make produced file it's [3:56] easier to find and prevent similar [3:58] sounding files from be confused in your [4:00] work plan [4:01] no matter which way you choose to do it [4:03] in just a few minutes you'll have your [4:05] completed file with the subtitles part [4:06] again there are a few more things to [4:10] point out first notice that a produce [4:11] file is smaller than the original well [4:15] that's it for today a relatively short [4:17] lesson if you enjoyed this video though [4:19] please subscribe and support the channel [4:21] thank you so much for watching that's [4:24] all for today [4:28] [Music]