TubeSum ← Transcribe a video

FFMPEG Bulk Bash Script to Insert Watermark Image to All Videos in the Directory or Folder at Once

Transcribed Jun 14, 2026 Watch on YouTube ↗
Beginner 3 min read For: Content creators and video editors looking to automate watermarking tasks.
1.3K
Views
18
Likes
9
Comments
0
Dislikes
2.1%
📈 Moderate

AI Summary

This tutorial demonstrates how to use a batch script with FFmpeg to insert a watermark image into all videos within a directory at once. The script automates the process, saving time compared to manual editing. It supports any number of videos and allows custom positioning of the watermark.

[0:08]
Introduction to bulk watermarking

The tutorial shows how to insert a watermark into all videos in a directory using FFmpeg and a batch script.

[0:50]
Watermark placement customization

The watermark can be placed at any location by specifying X and Y coordinates.

[1:11]
Unlimited video processing

The script can process any number of videos, even 1,000, without issues.

[2:02]
Prerequisite: FFmpeg installation

FFmpeg must be installed from ffmpeg.org. Verify installation by typing 'ffmpeg' in the command line.

[2:26]
Blog post reference

A blog post on Coding Shiksha provides the complete command and step-by-step instructions.

[3:09]
Example setup

The example uses a logo.png file and six MP4 videos in the same directory.

[4:36]
Creating the batch script

Create a file named watermark.bat and write the FFmpeg command with overlay filter.

[5:00]
FFmpeg command structure

Command: ffmpeg -i "%%a" -i logo.png -filter_complex overlay=20:20 -preset ultrafast output/%%~na.mp4

[6:56]
Running the script

Run the batch file by double-clicking or via command line. Ensure an output folder exists.

[8:23]
Processing demonstration

The script processes videos one by one, creating watermarked versions in the output folder.

This batch script with FFmpeg enables efficient bulk watermarking of videos, saving significant time compared to manual editing. It is a practical solution for content creators needing to add logos to multiple videos.

Clickbait Check

90% Legit

"Title accurately describes the tutorial; it delivers a bulk watermarking script using FFmpeg."

Mentioned in this Video

Tutorial Checklist

1 2:02 Install FFmpeg from ffmpeg.org and verify installation by typing 'ffmpeg' in command line.
2 3:09 Place your watermark image (e.g., logo.png) and all video files (same extension, e.g., MP4) in a single directory.
3 4:36 Create a new text file named watermark.bat.
4 5:00 Write the following command in the batch file: ffmpeg -i "%%a" -i logo.png -filter_complex overlay=20:20 -preset ultrafast output/%%~na.mp4
5 6:40 Create an 'output' folder in the same directory.
6 6:56 Run the batch file by double-clicking it or executing 'watermark.bat' in the command line.

Study Flashcards (8)

What software is required to run the batch script for bulk watermarking?

easy Click to reveal answer

FFmpeg must be installed.

2:02

What is the command to verify FFmpeg installation?

easy Click to reveal answer

Type 'ffmpeg' in the command line.

2:19

What filter is used in FFmpeg to overlay a watermark image on a video?

medium Click to reveal answer

The overlay filter.

5:37

How do you specify the position of the watermark in the FFmpeg command?

medium Click to reveal answer

By providing X and Y coordinates after the overlay filter, e.g., overlay=20:20.

5:45

What preset is used in the command to speed up video processing?

medium Click to reveal answer

The ultrafast preset.

5:56

What is the purpose of the '%%~na' in the output filename?

hard Click to reveal answer

It extracts the original filename without extension to name the output file.

6:11

What extension should the batch file have?

easy Click to reveal answer

.bat

4:41

What must be created in the directory before running the script?

easy Click to reveal answer

An 'output' folder.

6:40

💡 Key Takeaways

🔧

Bulk watermarking solution

Introduces a time-saving method for adding watermarks to multiple videos at once.

0:08
📊

Unlimited scalability

The script can handle any number of videos, making it highly practical.

1:11
🔧

Core FFmpeg command

Provides the exact command needed for watermarking, which is the key takeaway.

5:00
💡

Automated processing

Demonstrates the script working in real-time, confirming its effectiveness.

8:23

✂️ Creator Tools: Viral Hooks

AI-generated clip ideas for Shorts based on the transcript

Bulk watermark all videos at once!

45s

Shows a powerful time-saving hack that instantly grabs attention of content creators.

▶ Play Clip

FFmpeg batch script demo

60s

Visual demonstration of multiple videos getting watermarked automatically is satisfying and impressive.

▶ Play Clip

Step-by-step: Write the batch script

60s

Provides actionable code that viewers can copy and use immediately, driving engagement.

▶ Play Clip

Running the script & fixing errors

60s

Real-time troubleshooting makes the tutorial relatable and builds trust with the audience.

▶ Play Clip

Final result: all videos watermarked!

60s

Showcasing the successful outcome validates the method and encourages viewers to try it.

▶ Play Clip

[00:08] Hello friends, today in this tutorial

[00:09] I'll be showing you that how to

[00:12] insert watermark to all the videos which

[00:15] are present inside a particular

[00:17] directory. And we will be doing it at

[00:20] once using FFmpeg. Basically, we will be

[00:22] writing a

[00:24] batch script batch file.

[00:27] And

[00:29] with the help of that batch script, we

[00:31] will be able to

[00:33] bulk

[00:34] watermark all the videos. You can just

[00:37] download the logo of your YouTube

[00:39] channel or if you have to have a

[00:41] subscribe logo,

[00:43] you can search the logo here. Let me

[00:45] show you example here. This will be

[00:47] placed at the top left corner of this

[00:49] video.

[00:50] You can place that any location. You

[00:52] need to provide the X coordinate and the

[00:54] Y coordinate. You can see this is a

[00:55] video which is running here.

[00:57] So, basically, all the videos which are

[00:59] present inside a directory, it will have

[01:01] this logo. You can see this is a second

[01:03] video.

[01:04] This is a third video.

[01:07] This is a fourth video.

[01:09] This is a fifth video. So, basically,

[01:11] the limit is unlimited.

[01:14] Uh

[01:15] in the directory, let's suppose you have

[01:17] 1,000 videos, you need to

[01:19] process 1,000 videos, it will still

[01:21] work.

[01:22] And this is a very fantastic uh batch

[01:25] script that I will be showing you in

[01:27] this live stream, which will be placing

[01:30] the watermark logo image inside any

[01:33] location inside the video. So,

[01:35] basically, many many a times you need to

[01:37] place the watermark on the videos and

[01:40] you don't want to do it manually because

[01:42] it

[01:43] uh

[01:45] it takes a lot of time doing manually,

[01:48] just going to a video editor and doing

[01:51] this process. So, I will be showing you

[01:53] a batch script which will place this

[01:55] logo at any location of your video.

[01:58] So, let's start the

[02:00] how to do it. So, first of all, guys,

[02:02] you need to have FFmpeg installed on

[02:04] your system. Just go to ffmpeg.org

[02:07] and download this software. It's a free

[02:09] software, open source, cross-platform.

[02:12] And

[02:13] download it for your own operating

[02:15] system. So, I have all successfully

[02:17] installed it. So, now to check it,

[02:19] simply write FFmpeg on the command line.

[02:21] If the command is successful, then you

[02:23] have successfully installed this

[02:24] library. Now you I have written a

[02:26] complete blog post on my tutorial

[02:28] website, Coding Shiksha. You can see

[02:30] this is the blog post I have written

[02:32] here. So, if you want to insert the

[02:34] watermark image, you can go to the

[02:36] description of this live stream.

[02:38] So, you can go to the description of

[02:40] this live stream here. I have given this

[02:42] link here. This is the link of the blog

[02:45] post. So, the command is given here in

[02:48] the

[02:49] blog post here. You will see

[02:50] step-by-step instruction is given. So,

[02:53] let's start doing it.

[02:55] So, you can see, first of all, let me

[02:56] delete this output directory.

[03:00] So, you can see, let me also delete

[03:02] these folders.

[03:09] So, you can see, guys, we have this logo

[03:11] image present here, which is a PNG file

[03:14] here. Basically, this is the logo which

[03:15] we will be inserting in all the videos.

[03:18] And rest is our videos. You can see this

[03:21] is the first video.

[03:23] This is the second video.

[03:26] This is the third video. This is the

[03:27] fourth video.

[03:29] Fifth video. Sixth video. So, there are

[03:31] almost six videos present here. 1 2 3 4

[03:35] 5 6. All the videos have MP4 extension.

[03:39] So, this needs to be the

[03:41] same extension.

[03:42] So, you don't have to have different

[03:45] extensions. You can also do it for

[03:47] different extension. This will be a

[03:48] different batch script. But in this live

[03:50] stream, I will be telling you if all the

[03:52] videos have same extension, let's

[03:54] suppose MP4, AVI, WMV, so this batch

[03:58] script will be written.

[03:59] So, now let me delete this batch script

[04:02] and write it once again.

[04:04] So, as you know that batch script is a

[04:07] programming language. Basically, it is

[04:09] used for scripting purposes for Windows

[04:11] machine.

[04:12] If you just write here batch

[04:15] scripting,

[04:17] you will get to know more about it. So,

[04:19] basically, if you want to do some kind

[04:20] of scripting stuff for operating

[04:22] systems, this language is for you.

[04:25] So, basically, it is using for

[04:27] increasing productivity and managing

[04:30] doing the repetitive task. So, you can

[04:32] just do it simple write a simple script.

[04:35] So,

[04:36] inside my editor, guys, I will make a

[04:38] simple script here, watermark

[04:41] .bat.

[04:43] This is extension here. You can see the

[04:45] If I write this the

[04:47] uh logo has changed to Windows logo.

[04:50] watermark.bat.

[04:52] So, this is the file that we have

[04:54] created. So, now we need to write this

[04:57] batch script. So, let me write it here.

[05:00] So FFmpeg

[05:03] -i

[05:04] for input. And then in double quotes, we

[05:07] will write this percentage sign

[05:10] double A.

[05:12] You don't need to understand this, but

[05:14] you need to just write this what I'm

[05:16] writing here. -i. And then you need to

[05:19] provide the logo destination. Wherever

[05:21] your logo is present, it is present in

[05:23] the same directory. You will see

[05:24] logo.png. So, I'm just writing it

[05:26] logo.png.

[05:28] And then -filter_complex.

[05:33] And then you need to provide the

[05:34] location overlay.

[05:37] So, basically, we are placing the logo

[05:39] in the video, so that's why we are using

[05:41] the overlay filter.

[05:43] And then you need to provide the X

[05:45] coordinate and the Y coordinate. So,

[05:47] this can be anything. I'm providing 20

[05:50] 20.

[05:51] So, this is the X coordinate and the Y

[05:53] coordinate.

[05:54] And after that, you just need to put

[05:56] preset.

[05:58] Just to process the videos faster, we

[06:00] will use ultrafast.

[06:03] And then output file name.

[06:06] This will be output

[06:08] /

[06:11] percentage percentage.

[06:14] And this special

[06:16] uh key here which is available, you need

[06:18] to press shift and the

[06:21] key which is below the escape key. And

[06:24] this will give give you the sign na.mp4.

[06:29] So, this is the script, guys, which you

[06:31] need to write here. So, this is now

[06:33] complete here.

[06:35] So,

[06:36] now we need to run this script here.

[06:39] So, before running this script, guys,

[06:40] you need to create that output folder

[06:42] that we have placed here. You can see

[06:44] output/.

[06:45] So, right here inside this directory,

[06:48] you need to create the output folder.

[06:51] So, create a new folder, give the name

[06:53] output.

[06:56] So, there are two ways by which you can

[06:58] run this file, Windows batch file.

[07:00] Either you can right-click it,

[07:01] double-click it.

[07:03] This will also work.

[07:05] If I run this,

[07:09] or you can do it like this, open cmd

[07:13] and then write

[07:14] watermark.

[07:17] bat.

[07:18] So, it is saying that no such file or

[07:20] directory.

[07:21] It is giving some error. Let me check.

[07:38] Uh let me copy this command once again,

[07:40] guys. This can

[07:42] Oh sorry.

[07:43] I have missed it.

[07:45] Uh this needs to do.

[07:48] I missed the misspelled the full

[07:50] command. So, go to the description of

[07:51] this live stream, guys.

[07:53] You need to write it fully. You can see.

[07:57] And here you need to put the extension.

[07:59] Uh I missed that extension here. For all

[08:02] the files video files present inside the

[08:04] root directory which have this

[08:05] extension, which is MP4,

[08:07] we need to perform this task, which is

[08:10] place this logo, which is logo.png.

[08:13] And overlay

[08:15] and preset, all these position need to

[08:18] be same. That's it.

[08:20] So, now we can run this.

[08:23] Go to We can also right-click this.

[08:26] So, now this is processing the first

[08:27] video. You will see that.

[08:30] If I open this output directory, it has

[08:33] created this file here, first file.

[08:36] Side by side, let me show you.

[08:39] So, basically, it will do it batch by

[08:42] batch. You can see this first file is

[08:44] ready. Now it is processing the second

[08:45] file.

[08:47] And in similar fashion, it will process

[08:50] all the files which are present and you

[08:53] can see that.

[08:54] It is so

[08:55] good in productivity. You don't need to

[08:58] waste your time in manually processing

[09:00] the videos. It will do it automatically

[09:01] for you. Automatically place the

[09:03] watermark image

[09:05] using this batch script.

[09:07] So, the batch script will be there

[09:09] inside in the description of the live

[09:11] stream, guys. So, go to the blog post

[09:13] and copy-paste this command. So, if I

[09:15] show you the video here, you will see

[09:17] that

[09:20] the watermark is placed here

[09:23] automatically

[09:24] at in this fixed location. So,

[09:27] you can take any watermark image and

[09:29] place it inside this video,

[09:31] multiple videos at once.

[09:33] So, it's a bulk watermark script that

[09:36] I'm giving you.

[09:37] So, you can now see this is processing

[09:41] has finished.

[09:43] You can see that.

[09:46] So, this was the tutorial, guys. I

[09:47] wanted to show you that how to insert

[09:50] watermark in multiple videos which are

[09:52] present in a single directory at once

[09:54] using the

[09:56] Thanks very much for watching this

[09:57] video, and I will be seeing you in the

[09:59] next tutorial.

⚡ Saved you time reading this? Transcribe any YouTube video for free — no signup needed.