[0:08] Hello friends, today in this tutorial [0:09] I'll be showing you that how to [0:12] insert watermark to all the videos which [0:15] are present inside a particular [0:17] directory. And we will be doing it at [0:20] once using FFmpeg. Basically, we will be [0:22] writing a [0:24] batch script batch file. [0:27] And [0:29] with the help of that batch script, we [0:31] will be able to [0:33] bulk [0:34] watermark all the videos. You can just [0:37] download the logo of your YouTube [0:39] channel or if you have to have a [0:41] subscribe logo, [0:43] you can search the logo here. Let me [0:45] show you example here. This will be [0:47] placed at the top left corner of this [0:49] video. [0:50] You can place that any location. You [0:52] need to provide the X coordinate and the [0:54] Y coordinate. You can see this is a [0:55] video which is running here. [0:57] So, basically, all the videos which are [0:59] present inside a directory, it will have [1:01] this logo. You can see this is a second [1:03] video. [1:04] This is a third video. [1:07] This is a fourth video. [1:09] This is a fifth video. So, basically, [1:11] the limit is unlimited. [1:14] Uh [1:15] in the directory, let's suppose you have [1:17] 1,000 videos, you need to [1:19] process 1,000 videos, it will still [1:21] work. [1:22] And this is a very fantastic uh batch [1:25] script that I will be showing you in [1:27] this live stream, which will be placing [1:30] the watermark logo image inside any [1:33] location inside the video. So, [1:35] basically, many many a times you need to [1:37] place the watermark on the videos and [1:40] you don't want to do it manually because [1:42] it [1:43] uh [1:45] it takes a lot of time doing manually, [1:48] just going to a video editor and doing [1:51] this process. So, I will be showing you [1:53] a batch script which will place this [1:55] logo at any location of your video. [1:58] So, let's start the [2:00] how to do it. So, first of all, guys, [2:02] you need to have FFmpeg installed on [2:04] your system. Just go to ffmpeg.org [2:07] and download this software. It's a free [2:09] software, open source, cross-platform. [2:12] And [2:13] download it for your own operating [2:15] system. So, I have all successfully [2:17] installed it. So, now to check it, [2:19] simply write FFmpeg on the command line. [2:21] If the command is successful, then you [2:23] have successfully installed this [2:24] library. Now you I have written a [2:26] complete blog post on my tutorial [2:28] website, Coding Shiksha. You can see [2:30] this is the blog post I have written [2:32] here. So, if you want to insert the [2:34] watermark image, you can go to the [2:36] description of this live stream. [2:38] So, you can go to the description of [2:40] this live stream here. I have given this [2:42] link here. This is the link of the blog [2:45] post. So, the command is given here in [2:48] the [2:49] blog post here. You will see [2:50] step-by-step instruction is given. So, [2:53] let's start doing it. [2:55] So, you can see, first of all, let me [2:56] delete this output directory. [3:00] So, you can see, let me also delete [3:02] these folders. [3:09] So, you can see, guys, we have this logo [3:11] image present here, which is a PNG file [3:14] here. Basically, this is the logo which [3:15] we will be inserting in all the videos. [3:18] And rest is our videos. You can see this [3:21] is the first video. [3:23] This is the second video. [3:26] This is the third video. This is the [3:27] fourth video. [3:29] Fifth video. Sixth video. So, there are [3:31] almost six videos present here. 1 2 3 4 [3:35] 5 6. All the videos have MP4 extension. [3:39] So, this needs to be the [3:41] same extension. [3:42] So, you don't have to have different [3:45] extensions. You can also do it for [3:47] different extension. This will be a [3:48] different batch script. But in this live [3:50] stream, I will be telling you if all the [3:52] videos have same extension, let's [3:54] suppose MP4, AVI, WMV, so this batch [3:58] script will be written. [3:59] So, now let me delete this batch script [4:02] and write it once again. [4:04] So, as you know that batch script is a [4:07] programming language. Basically, it is [4:09] used for scripting purposes for Windows [4:11] machine. [4:12] If you just write here batch [4:15] scripting, [4:17] you will get to know more about it. So, [4:19] basically, if you want to do some kind [4:20] of scripting stuff for operating [4:22] systems, this language is for you. [4:25] So, basically, it is using for [4:27] increasing productivity and managing [4:30] doing the repetitive task. So, you can [4:32] just do it simple write a simple script. [4:35] So, [4:36] inside my editor, guys, I will make a [4:38] simple script here, watermark [4:41] .bat. [4:43] This is extension here. You can see the [4:45] If I write this the [4:47] uh logo has changed to Windows logo. [4:50] watermark.bat. [4:52] So, this is the file that we have [4:54] created. So, now we need to write this [4:57] batch script. So, let me write it here. [5:00] So FFmpeg [5:03] -i [5:04] for input. And then in double quotes, we [5:07] will write this percentage sign [5:10] double A. [5:12] You don't need to understand this, but [5:14] you need to just write this what I'm [5:16] writing here. -i. And then you need to [5:19] provide the logo destination. Wherever [5:21] your logo is present, it is present in [5:23] the same directory. You will see [5:24] logo.png. So, I'm just writing it [5:26] logo.png. [5:28] And then -filter_complex. [5:33] And then you need to provide the [5:34] location overlay. [5:37] So, basically, we are placing the logo [5:39] in the video, so that's why we are using [5:41] the overlay filter. [5:43] And then you need to provide the X [5:45] coordinate and the Y coordinate. So, [5:47] this can be anything. I'm providing 20 [5:50] 20. [5:51] So, this is the X coordinate and the Y [5:53] coordinate. [5:54] And after that, you just need to put [5:56] preset. [5:58] Just to process the videos faster, we [6:00] will use ultrafast. [6:03] And then output file name. [6:06] This will be output [6:08] / [6:11] percentage percentage. [6:14] And this special [6:16] uh key here which is available, you need [6:18] to press shift and the [6:21] key which is below the escape key. And [6:24] this will give give you the sign na.mp4. [6:29] So, this is the script, guys, which you [6:31] need to write here. So, this is now [6:33] complete here. [6:35] So, [6:36] now we need to run this script here. [6:39] So, before running this script, guys, [6:40] you need to create that output folder [6:42] that we have placed here. You can see [6:44] output/. [6:45] So, right here inside this directory, [6:48] you need to create the output folder. [6:51] So, create a new folder, give the name [6:53] output. [6:56] So, there are two ways by which you can [6:58] run this file, Windows batch file. [7:00] Either you can right-click it, [7:01] double-click it. [7:03] This will also work. [7:05] If I run this, [7:09] or you can do it like this, open cmd [7:13] and then write [7:14] watermark. [7:17] bat. [7:18] So, it is saying that no such file or [7:20] directory. [7:21] It is giving some error. Let me check. [7:38] Uh let me copy this command once again, [7:40] guys. This can [7:42] Oh sorry. [7:43] I have missed it. [7:45] Uh this needs to do. [7:48] I missed the misspelled the full [7:50] command. So, go to the description of [7:51] this live stream, guys. [7:53] You need to write it fully. You can see. [7:57] And here you need to put the extension. [7:59] Uh I missed that extension here. For all [8:02] the files video files present inside the [8:04] root directory which have this [8:05] extension, which is MP4, [8:07] we need to perform this task, which is [8:10] place this logo, which is logo.png. [8:13] And overlay [8:15] and preset, all these position need to [8:18] be same. That's it. [8:20] So, now we can run this. [8:23] Go to We can also right-click this. [8:26] So, now this is processing the first [8:27] video. You will see that. [8:30] If I open this output directory, it has [8:33] created this file here, first file. [8:36] Side by side, let me show you. [8:39] So, basically, it will do it batch by [8:42] batch. You can see this first file is [8:44] ready. Now it is processing the second [8:45] file. [8:47] And in similar fashion, it will process [8:50] all the files which are present and you [8:53] can see that. [8:54] It is so [8:55] good in productivity. You don't need to [8:58] waste your time in manually processing [9:00] the videos. It will do it automatically [9:01] for you. Automatically place the [9:03] watermark image [9:05] using this batch script. [9:07] So, the batch script will be there [9:09] inside in the description of the live [9:11] stream, guys. So, go to the blog post [9:13] and copy-paste this command. So, if I [9:15] show you the video here, you will see [9:17] that [9:20] the watermark is placed here [9:23] automatically [9:24] at in this fixed location. So, [9:27] you can take any watermark image and [9:29] place it inside this video, [9:31] multiple videos at once. [9:33] So, it's a bulk watermark script that [9:36] I'm giving you. [9:37] So, you can now see this is processing [9:41] has finished. [9:43] You can see that. [9:46] So, this was the tutorial, guys. I [9:47] wanted to show you that how to insert [9:50] watermark in multiple videos which are [9:52] present in a single directory at once [9:54] using the [9:56] Thanks very much for watching this [9:57] video, and I will be seeing you in the [9:59] next tutorial.