GithubHelp home page GithubHelp logo

abirhasan2005 / watermark-bot Goto Github PK

View Code? Open in Web Editor NEW
124.0 1.0 338.0 74 KB

A Telegram Video Watermark Adder Bot in Pyrogram by @AbirHasan2005

Home Page: https://t.me/VideoWatermark_Bot

License: MIT License

Python 99.95% Procfile 0.05%
ffmpeg telegram-bot video watermark video-watermark pyrogram

watermark-bot's Introduction

Watermark-Bot

A Telegram Video Watermark Adder Bot by @AbirHasan2005

Features:

  • Save Custom Watermark Image.
  • Auto Resize Watermark According to Video quality.
  • Easy Apply saved watermark to video.
  • Progress of all tasks.
  • Can Choose FFMPEG Process Preset.
  • Can Cancel Process. (Beta)
  • Any Channel or Group Force Sub.
  • Logs Process in any channel.
  • Broadcast Feature.
  • Can Save Watermark Position for users.
  • Can Save Watermark Size for users.
  • Can Upload to Streamtape if File Size is more than 2GB.

Demo Bot:

Configs:

  • API_ID - Get this from @TeleORG_Bot
  • API_HASH - Get this from @TeleORG_Bot
  • BOT_TOKEN - Get this from @BotFather
  • BOT_USERNAME - You Bot Username. (Without [@])
  • LOG_CHANNEL - Logs Channel ID
  • OWNER_ID - Bot Owner UserID
  • DATABASE_URL - MongoDB Database URI
  • UPDATES_CHANNEL - Force Sub Channel ID (Optional)
  • PRESET - Video Encoding Preset Type (Optional)
    • Better put ultrafast or superfast or veryfast
  • STREAMTAPE_API_PASS - Get this from Here.
    • For Uploading to Streamtape if File Size is more than 2GB.
  • STREAMTAPE_API_USERNAME - Get this from Here.
    • For Uploading to Streamtape if File Size is more than 2GB.

BotFather Commands:

start - start the bot
status - Show number of users in DB & Bot Status
broadcast - Broadcast replied message to DB Users
cancel - Cancel Current Task
settings - User Settings Panel
reset - Reset all settings to default

Support Group:

Deploy:

Easiest Way [Deploy To Heroku] ๐Ÿ˜ช

Deploy

Video Tutorial:

YouTube

The Hard Way ๐Ÿค•

git clone https://github.com/AbirHasan2005/Watermark-Bot
cd Watermark-Bot
virtualenv -p python3 VENV
. ./VENV/bin/activate
pip3 install -r requirements.txt
--- EDIT configs.py values appropriately ---
python3 bot.py

Follow on:

watermark-bot's People

Contributors

abirhasan2005 avatar asmsafone avatar ballicipluck avatar fayasnoushad avatar l3str4nge avatar mrbotdeveloper avatar mrvishal2k2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

watermark-bot's Issues

Some Code problem

I'm deployed, If I click start button in logs many errors coming. If u see this comment please reply me

Getting a error when sending a video

Hello @AbirHasan2005
After deploying the bot, it responded as it should be.
Then after sending image to use as a watermark, I send a video to the bot then it responded,
Unable to Download The Video!.
In terminal,
remove: path should be string, bytes or os.PathLike, not NoneType
Download Failed: Telegram says: [400 PEER_ID_INVALID] - The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it
with this error message.
I'm looking for a solution.

Runtime error after sending video - ID error

I got error:

Pyrogram v1.2.6, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)

remove: path should be string, bytes or os.PathLike, not NoneType
Download Failed: [400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")
[400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")
Traceback (most recent call last):
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 60, in resolve_peer
    return await self.storage.get_peer_by_id(peer_id)
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/storage/sqlite_storage.py", line 147, in get_peer_by_id
    raise KeyError(f"ID not found: {peer_id}")
KeyError: 'ID not found: -1001478052015'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 217, in handler_worker
    await handler.callback(self.client, *args)
  File "bot.py", line 70, in HelpWatermark
    await bot.send_message(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/messages/send_message.py", line 127, in send_message
    peer=await self.resolve_peer(chat_id),
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 109, in resolve_peer
    await self.send(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
    r = await self.session.send(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/session/session.py", line 425, in send
    return await self._send(data, timeout=timeout)
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/session/session.py", line 395, in _send
    RPCError.raise_it(result, type(data))
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/errors/rpc_error.py", line 78, in raise_it
    raise getattr(
pyrogram.errors.exceptions.bad_request_400.ChannelInvalid: [400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")

Not sure why need log_channel, but I open a new channel and use https://t.me/username_to_id_bot to find out the ID.
So I changed that line into:
LOG_CHANNEL = int(-1001478052015)

Feature Request ๐Ÿ™

Sir, streamtape is reducing the quality of the video very badly.
Will you please also add modules to upload videos to Google Drive or Telegram.

No guide how to start the app

There is no guide with commands (installing all the pip packages), and no reason why need to provide all this configs and not only bot API.
'start' isn't starting this python program, but I'm not sure I'm running the right one.
Please provide more information.

Bot Crushes everytime

pyrogram.errors.exceptions.bad_request_400.ChannelInvalid: [400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")

Unable to Add Watermark: [WinError 2] The system cannot find the file specified

Unable to Add Watermark: [WinError 2] The system cannot find the file specified
[WinError 32] The process cannot access the file because it is being used by another process: './downloads/WatermarkAdder/411046209\IMG_7557.MP4'
how to fix pls, i have this error when try to send video for adding watermark but the bot download my video and then sended the error showing

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.