- High-Fidelity Output: Uses FFmpeg with optimized presets for crystal clear video.
- Smart Containers: Defaults to MKV for maximum compatibility and subtitle preservation.
- Subtitle Copy: Automatically copies subtitle streams (
-c:s copy) without transcoding. - Quality Steps: Tracks progress across multiple resolution steps (e.g., Quality 1/3).
- FIFO Processing: Ensures fair, sequential processing of all user jobs.
- Persistence: Automatically restores the queue and active jobs after a bot restart.
- Concurrency: Handles sequential encoding and concurrent uploads (up to 2) for maximum efficiency.
- Rich UI: Beautiful, blockquote-based progress bars with real-time stats (FPS, Bitrate, ETA).
- Interactive Controls: Pause, Resume, and Cancel jobs directly from the progress message.
- Smart Notifications:
- Separate Upload Message: Keeps chat clean by deleting the upload progress message upon completion.
- Pause Details: Shows file name, settings, and user info when a job is paused.
- Logging: Detailed logs of every encode sent to a dedicated channel.
- Watermarks: Add custom text or image watermarks to your videos. Supports positioning, opacity, and timing.
- Metadata: Manage video metadata (Title, Author, etc.) to keep your library organized.
- User Database: Automatically registers users on
/start. - Startup Cleanup: Wipes temporary
downloads/to prevent disk bloat. - Resource Efficient: Uses
uvloopfor ultra-fast async I/O.
- Broadcast System: Send messages (Normal/Pin) to all users with real-time stats.
- Admin Panel: Interactive GUI for the owner to add/remove admins easily.
- User Management: Auto-cleanup of blocked/deleted accounts during broadcasts.
- Python 3.9+
- FFmpeg (installed and in PATH)
- MongoDB (Database)
- Telegram Bot Token & API Keys
-
Clone the Repository
git clone https://github.com/Itzmepromgitman/autoanimepro.git cd autoanimepro -
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Create a
.envfile in the root directory:TG_BOT_TOKEN=your_bot_token APP_ID=your_app_id API_HASH=your_api_hash OWNER_ID=your_telegram_id CHANNEL_ID=-100xxxxxxxx # Your Log Channel ID DATABASE_URL=your_mongodb_uri DATABASE_NAME=Cluster0 TG_BOT_WORKERS=4
-
Run the Bot
bash start.sh
Deploy effortlessly with Docker:
# 1. Build Image
docker build -t autoanimepro .
# 2. Run Container
docker run -d --env-file .env --name encoder_bot autoanimepro| Command | Description | Permission |
|---|---|---|
/start |
Initialize the bot & register user. | Everyone |
/settings |
Configure video settings (Codec, CRF, Resolution). | Everyone |
/queue |
View the current job queue. | Everyone |
/stats |
View system and bot statistics. | Everyone |
/ss |
Generate screenshots from video. | Everyone |
/cancel <id> |
Cancel a specific job. | Owner/User |
/clear |
Clear your queued jobs. | Admin/User |
/cancelall |
Cancel ALL active jobs. | Owner Only |
/restart |
Restart the bot server. | Owner Only |
/log |
Retrieve the bot's log file. | Owner Only |
/shell |
Execute shell commands. | Owner Only |
/broadcast |
Broadcast message to users. | Admin Only |
/admin |
Open Admin Panel. | Owner Only |
/info |
Get detailed job info. | Admin Only |
/help |
Access the help manual. | Everyone |
autoanimepro/
βββ bot/
β βββ func/ # Core Logic
β β βββ pyroutils/ # Progress Bar Utils
β β βββ encode.py # Main Encoding Engine
β β βββ queue_manager.py
β β βββ download_manager.py
β β βββ upload_manager.py
β β βββ ffmpeg_utils.py
β βββ utils/ # Helpers
β β βββ restart.py
β β βββ shell.py
β βββ config.py # Config Loader
β βββ logger.py # Logging System
β βββ __main__.py # Entry Point
βββ plugins/ # Handlers
β βββ admin.py
β βββ encode.py
β βββ query.py
β βββ queue.py
β βββ settings.py
β βββ start.py
βββ Dockerfile # Docker Config
βββ requirements.txt # Dependencies
βββ start.sh # Startup Script
This project is licensed under the MIT License.
Built with β€οΈ by Argon
