Read this in other languages: click
This Telegram bot is designed to convert media files and TikTok links into native Telegram formats (Video Notes and Voice Messages).
The bot automatically downloads TikTok videos without watermarks and processes files uploaded by users.
TikTok Downloader:
- Accepts TikTok links.
- Offers a choice: convert to Video Note (circle) or Voice Message.
Video Conversion:
- Converts standard video files (.mp4, etc.) into circular Video Notes.
- Automatically crops video to a 1:1 aspect ratio (center) and resizes to 640x640.
Audio Conversion:
- Converts audio files (.mp3, etc.) into Voice Messages (Opus codec). Logging:
- Maintains detailed logs with date-based rotation in the
logs/directory.
Auto-Restart:
- Built-in protection against crashes and network errors.
To run the bot, you need:
- Python 3.8+
- FFmpeg (system-level) — Critical for media processing.
Ubuntu/Debian:
sudo apt update && sudo apt upgrade && sudo apt install ffmpeg
Windows:
- Method 1 (Recommended): Open a terminal (PowerShell or CMD) and run:
winget install Gyan.FFmpeg
⚠️ "winget" command not found? > If you are using an older version of Windows 10 and the command is missing, download and install the App Installer from the official GitHub releases (look for the file ending in.msixbundle).
- Method 2 (Manual): Download the archive from the official repository, unzip it, and add the path to the
binfolder to your system environment variables (PATH).
C:\ffmpeg\binMacOS:
brew install ffmpeg
git clone https://github.com/Vovan999222/ebany_kruzhok_bot.git
cd ebany_kruzhok_botpython -m venv venvWindows:
venv\Scripts\activate
Linux/Mac:
source venv/bin/activate
You can install the libraries manually:
pip install aiogram imageio-ffmpeg ffmpeg-python yt-dlp
Or use the requirements.txt file and install it via:
pip install -r requirements.txt
Open the config.py file and find the following line:
TOKEN = "" # Paste your token from @BotFather hereInsert your bot token inside the quotes.
python bot.py
- Limits: The bot processes files up to 50 MB.
- Video: Encoded in H.264, preset
veryfast, CRF 28 (optimized for Telegram). - Audio: Encoded in Opus, 48kHz (standard for Telegram voice messages).
This project is distributed under the MIT License