A powerful Telegram bot built with Hydrogram and FFmpeg to trim, edit, and manage your video files with native Telegram colors and high precision.
- ✂️ Advanced Trimming: Supports single cuts and multi-segment splitting.
- 🎯 Multi-Format Support: Parse timestamps in
ss:ss,HH:MM:SS, or30s from 01:00formats. - ⏩ Speed Control: Adjust video speed from 0.5x to 2.0x with audio sync.
- 📉 Compression: Reduce file size using CRF-based encoding (Low, Medium, High).
- 🎵 Audio Extraction: Extract high-quality MP3 from any video.
- 📱 WhatsApp Status Splitter: Automatically split long videos into 30s segments.
- 🎨 Native UI: Uses modern Telegram native colored buttons and expandable blockquotes.
- ⚡ High Performance: Multi-threaded processing with real-time progress bars.
- ⚙️ Admin Controls: Manage file size limits and view logs via owner commands.
First, update your system and install FFmpeg:
sudo apt update && sudo apt upgrade -y
sudo apt install ffmpeg python3-pip git -ygit clone <your-repo-url>
cd <repo-folder>pip3 install -r requirements.txtEdit config.py and add your credentials:
API_ID&API_HASH(from my.telegram.org)BOT_TOKEN(from @BotFather)OWNER_ID(Your Telegram User ID)
To run the bot normally:
python3 bot.pyTo keep the bot running 24/7 even after you close the terminal, use PM2 or Screen.
- Install PM2:
sudo npm install -g pm2 - Start the bot:
pm2 start bot.py --name "video-bot" --interpreter python3 - Restart:
pm2 restart video-bot - Stop:
pm2 stop video-bot - Logs:
pm2 logs video-bot
- Start a session:
screen -S bot - Run the bot:
python3 bot.py - Detach: Press
Ctrl+AthenD. - Restart:
- Reattach:
screen -r bot - Stop with
Ctrl+C, then runpython3 bot.pyagain.
- Reattach:
If you see this error on your VPS, it usually means the bot cannot write to the session file. Follow these steps:
- Check Disk Space: Run
df -h. If your disk is 100% full, the bot will crash. - Check Permissions: Ensure the bot has permission to write in the folder:
chmod -R 755 . - Delete Corrupt Session: Sometimes the session file gets corrupted during a crash.
Then restart the bot and log in again.
rm video_processor_bot.session* - Docker/Filesystem Issues: If using Docker, ensure the volume has write permissions.
Developed with ❤️ by @Unrated_Coder.