Coder Social home page Coder Social logo

bmoa's Introduction

BMOA: Batch Multimedia Overlay Adder

This script allows you to add transparent images on top of another media file (image / video). Uses FFMPEG to process images over files.

reminder that this is not an nft generator, moving on

Background story

Maybe you shouldn't read it and get into the next step
One time, when I was shopping at Shopee, then I think about: How they actually put the same watermark / overlay graphics on an image while it's time consuming?

For your information

This script currently supports Windows PCs. macOS and Linux (or other Unix-based machines?) support coming soon.

Before you use

Download / copy FFMPEG at the same directory as the script's location. If you didn't know how to download it, just double-click on download_ffmpeg.bat at the root directory of this script. TL;DR:

Uhh, how to download it manually? 1. Download FFMPEG here (Direct link).
2. Unzip it then copy ffmpeg.exe under the bin directory to the same directory with this script.
Got FFMPEG? Just copy it to the same directory where this repo is located. That's all.
FFMPEG under PATH? Proceed to the next step. You don't have to setup FFMPEG.

Step 2: Create overlay image

Basically, create an image with the same width and height as the image you're going to process, and importantly, make it transparent. After editing it, export as PNG. Guides coming soon.

Step 3: Modify configuration files

First, open the config.ini file for editing. Use whatever editor you want. Edit this line:

general_overlay_image=testimage.png

by changing overlay.png to the complete path of the file. (more easier: just rename it to "overlay.png" then put it at the same directory as the script's location)

Finetuning FFMPEG settings? Let me explain first:

quality: Change quality properties for FFMPEG image encoding. If you're exporting JPEG, then I recommend you to not change the quality property, as the JPEG file will look more JPEG than usual will become "blocky".
x and y: Change the X-axis and Y-axis of the overlay file on the image.
outformat: Change output format of image file. See here for file formats (if it's X for encoding then it supports that fileformat for exporting).
custom_args (under ffmpeg_finetune_image_advanced): Arguments before the output name. Advanced users only.

Step 4: Move / copy all your source files to the "input" directory

As the step heading said. Just copy what you want to add the overlay on to the "input" folder.

IMPORTANT: Do not have spaces on filenames (or paths)

Do not have spaces on filenames or folder path, or else FFMPEG won't start encoding! The temporary fix is by downloading Bulk Rename Utility, then find space and replace these with underscores.

Step 5: Start processing / encoding!

Just double-click on StartProcessing.bat to start processing / encoding the files. The resulting files will be at the "output" directory.

Wait, any samples?

image All the sample files are included in the script by default when you downloaded it. You may delete these files safely. (or, delete sample files by running DeleteSample.bat)

To-do

  • Video support
  • Filename with spacing support
  • macOS / Linux support (bash)

bmoa's People

Contributors

weareblahs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.