A Telegram bot built using Pyrogram that allows users to upload video files, select specific audio tracks, and export the video with the chosen audio tracks. Supports both MP4 (video) and MKV (document) formats.
- 📥 Download videos from Telegram: Supports files up to 4GB.
- 🎧 Audio track detection: Automatically detects and lists audio tracks, with language and title tags if available.
- ✅ Multi-track selection: Choose multiple audio tracks using an intuitive inline keyboard.
- 📦 Flexible output formats: Export videos as MP4 (video) or MKV (document).
- 📊 Real-time progress: Monitor download and upload progress with progress bars.
- ⚙️ User customization: Set default filenames and captions through user settings.
- ⏳ Usage limits: Free users are limited to 15 files per day, while premium users can process up to 30.
- 📚 Queueing system: Supports queueing for multiple files, ensuring smooth processing.
- ❌ Cancel operations: Easily cancel ongoing processes with the
/cancelcommand. - 🔍 Status checks: Check the bot's status with the
/statuscommand. - 🆔 Chat ID retrieval: Get your chat ID with the
/getidcommand.
⚠️ Note: This bot is designed for audio track selection and video processing only.
- Python 3.8+
- FFmpeg (for audio extraction and video processing)
git clone https://github.com/abhinai2244/TG-AudioSelector.git
cd audio-selector-botInstall the required Python packages using pip:
pip install -U -r requirements.txtCreate a .env file in the root directory and add the following variables:
API_ID=your_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
API_IDandAPI_HASH: Obtain these from my.telegram.org.BOT_TOKEN: Get this from @BotFather on Telegram.
python main.py- Start the bot: Send the
/startcommand to the bot in a private chat. - Upload a video: Send a video file to the bot as a video or document.
- Select audio tracks: The bot will display a list of available audio tracks. Use the inline keyboard to select the desired tracks.
- Choose output format: Select whether you want the output as an MP4 (video) or MKV (document).
- Wait for processing: The bot will download, process, and upload the video with the selected audio tracks.
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.