Welcome to CompressBotβyour all-in-one Telegram bot for compressing audio and video files with ease! π
- Compress Audio π§: Convert and compress your audio files to a smaller size while maintaining good quality.
- Compress Video π₯: Reduce the size of your video files with efficient compression without significant loss in quality.
- User-Friendly: Simple commands and easy-to-use interface.
- Fast Processing β‘: Get your compressed files quickly.
Follow these steps to set up the bot locally:
-
Clone the repository:
git clone https://github.com/superhexa/CompressBot.git cd CompressBot
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables:
- Open the
config.py
file in the root directory. - Add your credentials:
API_ID = 'api_id' API_HASH = 'api_hash' API_TOKEN = 'bot_token'
- Open the
-
Run the bot:
python bot.py
- Python 3.7+
- Pyrogram - For Telegram bot API interaction
- Pydub - For audio processing
- FFmpeg - For video compression
- Start the bot by sending the
/start
command. - Choose between compressing audio or video files.
- Upload your media file.
- Receive the compressed file instantly!
You can adjust the compression parameters in the script to suit your needs:
- Audio Compression: Adjust the
bitrate
andformat
in thehandle_audio
function. - Video Compression: Modify the FFmpeg command in the
handle_video
function to tweak video resolution, bitrate, etc.
If you encounter any issues or have suggestions, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT Licenseβsee the LICENSE file for details.
Enjoy CompressBot and make your media sharing easier! π