DEV Community

loading...
Cover image for This telegram bot built with Python and FFmpeg allows you to watermark photos and videos, on the fly

This telegram bot built with Python and FFmpeg allows you to watermark photos and videos, on the fly

aahnik profile image Aahnik Daw ・Updated on ・2 min read

Telegram has become a fantastic alternative to WhatsApp and many people are loving it. It also has channels, where you can broadcast your feed to a large audience. Kinda like Twitter.

Are you a content creator or someone who shares lots of videos/images/infographics/gifs on a Telegram channel?

Then watermarking is a fantastic way to boost your brand image. Using a separate app or video editor is time-consuming, especially if you are producing content on the go, all the time.

I made a telegram bot that applies watermark on images, gifs, and videos.

GitHub logo aahnik / telewater

A telegram bot that applies watermark on images, gifs, and videos.

telewater

A telegram bot that applies watermark on images, gifs and videos.

Features

  • Fast because it is made using async libraries.
  • Simple to use.
  • Any one who uses an instance of the bot will have to use the same watermark and position. This is meant to be used by single person/organization (by only you or your team), as configuration is global.
  • No database connection required.
  • It does not store media (photos/videos/gifs) on the server. Media is deleted immediately after the watermarked version is sent to the user.

Installation

If you are familiar with Docker then click here otherwise, continue reading.

Requirements

Make sure to have these installed in your system.

  • python3.9+ and pip (the bot is built with the telethon library)
  • ffmpeg (used by the bot for applying watermark)

Verification

Open you terminal to check if you have all basic requirements properly installed.

  1. Run python --version and you should get…

How does this bot work?

It is simple.

  • First of all, you create a bot account with the help of BotFather in Telegram.
  • You deploy the bot to a remote server or run it locally on your computer.
  • You send a video/image/gif to the running bot. It will instantly watermark it and send it back to you.
  • You can also add your bot as an admin to a group or channel. It will apply a watermark when you post a new media.

The bot is being actively developed. More new features have most probably been added when you are reading this.

For getting all the latest updates, join this telegram channel @tele_water(ad-free).

You can also star and watch the repository on GitHub.

This GitHub repository also has detailed documentation about all the following stuff related to the bot.

For any further help, feel free to create an issue in the GitHub repo.

Discussion (3)

pic
Editor guide
Collapse
ashutoshkrris profile image
Ashutosh Krishna

Hi
Loved your writing
I'd like to feature it on my blog site iRead
I don't mind you adding backlinks to your original writings/works.

About iRead :
iRead is an open platform where readers find dynamic thinking, and where expert and undiscovered voices can share their writing on any topic.
Know More : iread.ga
Watch Demo : youtu.be/jLdJnVgpV8U

Collapse
aahnik profile image
Aahnik Daw Author

ok, you can do it. just make sure that, you give backlink. the canonical URL or "originally published at" URL should be "github.com/aahnik/telewater", and original author name should be "Aahnik Daw" (link to my site aahnik.dev)

and this article may be updated in future, when I will add more features to this repo.

for any further doubt, contact me on telegram.

telegram.me/aahnikdaw

Collapse
adetoroe787 profile image
Ezekiel Adetoro

How about using this with Django?