Skip to content

Doctorstra/Video-Editor-Bot-V22

Repository files navigation

Video-Editor-Bot-V22

πŸ€“ A Powerful Telegram Video Editor Bot.πŸ› οΈAdvance Features like Video Merging, Video Trimming, Video Hevc/Fast Compressor, Video Renamer, Video Screenshot Generator, Video Watermark Adder, Video Encoder, Video Subtitle Extractor Adder, Video Audio Extractor Adder, Video Convert file/Video, Video Archiver (tar,rar,Zip),Archive Extractor, Direct Download link Generator,Url Uploader html (mx-player,Zee 5,Hotstar,Voot,Sony etc.), Video Metadata, Video Information, With Permanent Thumbnail Support πŸ“Œ

Features

  • Video Merger.
  • Video Trimmer.
  • Video Compressor Hevc/Fast.
  • Video Renamer.
  • Video Screenshot Generator.
  • Video Watermark Adder.
  • Video Encoder.
  • Video Subtitle Extractor/Adder.
  • Video Audio Extractor/Adder
  • Video Archiver (tar,rar,Zip)
  • Archive Extractor
  • Direct Download link Generator
  • Url Uploader html (mx-player,Zee 5,Hotstar,Voot,Sony etc.)
  • Video Metadata
  • Video Storage Info
  • Permanent Thumbnail Support
  • Broadcast Support
  • Mongodb Added
  • Log Channel Added

Follow on:

πŸ› οΈ Installation & Setup

Prerequisites

  • Python 3.11 or higher
  • FFmpeg installed on your system
  • MongoDB (local or cloud)
  • Telegram Bot Token (get it from @BotFather)

Quick Start with Docker (Recommended)

  1. Clone the repository:
git clone https://github.com/Doctorstra/
Video-Editor-Bot-V22.git
cd all-in-one
  1. Configure environment variables:
cp .env.example .env
# Edit .env and add your credentials
  1. Run with Docker Compose:
docker-compose up -d

That's it! Your bot is now running! πŸŽ‰

Manual Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Install FFmpeg:
  • Ubuntu/Debian: sudo apt-get install ffmpeg
  • macOS: brew install ffmpeg
  • Windows: Download from ffmpeg.org
  1. Set up MongoDB:
# Install MongoDB locally or use MongoDB Atlas (cloud)
  1. Configure the bot:
cp .env.example .env
# Edit .env with your credentials
  1. Run the bot:
python bot.py

Environment Variables

Create a .env file with the following variables:

# Required
BOT_TOKEN=your_telegram_bot_token
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
MONGODB_URI=mongodb://localhost:27017

# Optional
DATABASE_NAME=video_editor_bot
LOG_CHANNEL_ID=your_log_channel_id
ADMIN_IDS=123456789,987654321
MAX_FILE_SIZE=2000

Getting Your Credentials

  1. Bot Token: Message @BotFather on Telegram

    • Send /newbot
    • Follow the instructions
    • Copy the token
  2. API ID & Hash: Visit my.telegram.org

    • Log in with your phone number
    • Go to "API Development Tools"
    • Create an application
    • Copy API ID and API Hash

πŸ“š Usage Guide

Basic Commands

Start the bot and use these commands:

/start - Start the bot and see welcome message
/help - Get list of all commands
/about - Learn more about the bot
/stats - View your statistics

Video Processing

/compress - Compress video (choose HEVC or Fast mode)
/trim <start> <duration> - Trim video (e.g., /trim 00:00:10 00:00:30)
/merge - Merge multiple videos (send videos then /done)
/rename <name> - Rename video file
/encode - Encode video to different format
/screenshot [timestamp] - Generate screenshot (e.g., /screenshot 00:00:05)
/metadata - View video information

Audio & Subtitles

/extract_audio - Extract audio from video
/extract_subs - Extract subtitles from video
/add_audio - Add audio to video
/add_subs - Add subtitles to video

Watermark & Thumbnail

/add_watermark - Add watermark to video
/set_thumbnail - Set permanent thumbnail
/show_thumbnail - View your thumbnail
/delete_thumbnail - Remove your thumbnail

Archives

/archive <type> - Create archive (zip/tar/rar)
/extract - Extract archive

Download & Upload

/download <url> - Download from URL or streaming platform
/generate_link - Generate direct download link

Storage & Info

/storage - Check your storage usage

Admin Commands

/broadcast <message> - Send message to all users
/stats_all - View bot statistics

🎯 Example Workflows

Compress a Video

  1. Send /compress
  2. Send your video file
  3. Bot processes and sends compressed version

Merge Videos

  1. Send /merge
  2. Send first video
  3. Send second video
  4. Send more videos (if needed)
  5. Send /done
  6. Bot merges and sends result

Add Watermark

  1. Send /add_watermark
  2. Send watermark image
  3. Send video
  4. Bot adds watermark and sends result

πŸ—οΈ Project Structure

all-in-one/
β”œβ”€β”€ bot.py                 # Main bot application
β”œβ”€β”€ config.py             # Configuration management
β”œβ”€β”€ database.py           # MongoDB operations
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ Dockerfile           # Docker configuration
β”œβ”€β”€ docker-compose.yml   # Docker Compose setup
β”œβ”€β”€ .env.example         # Environment template
β”œβ”€β”€ handlers/            # Command handlers
β”‚   β”œβ”€β”€ basic_handlers.py
β”‚   β”œβ”€β”€ video_handlers.py
β”‚   β”œβ”€β”€ thumbnail_handlers.py
β”‚   └── archive_handlers.py
└── utils/               # Utility modules
    β”œβ”€β”€ video_utils.py
    β”œβ”€β”€ archive_utils.py
    └── download_utils.py

πŸ”§ Advanced Configuration

File Size Limits

Edit MAX_FILE_SIZE in .env to change the upload limit (in MB).

Custom Download Path

Set DOWNLOAD_PATH and UPLOAD_PATH in .env.

Enable/Disable Features

ENABLE_BROADCAST=True
ENABLE_URL_UPLOAD=True
ENABLE_WATERMARK=True

Log Channel

Set LOG_CHANNEL_ID to send all bot activities to a Telegram channel.


πŸ“ License

This project is licensed under the License - see the LICENSE file for details.

About

πŸ€“ A Powerful Telegram Video Editor Bot.πŸ› οΈAdvance Features like Video Merging, Video Trimming, Video Hevc/Fast Compressor, Video Renamer, Video Screenshot Generator, Video Watermark Adder, Video Encoder, Video Subtitle Extractor Adder, Video Audio Extractor Adder, Video Convert file/Video, Video Archiver (tar,rar,Zip),Archive Extractor, Direct Do…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors