Refret28/convert-bot
The bot converts and downloads any video, and, if possible, its preview (cover) from YouTube, in mp3 format.
YouTube Audio Downloading Telegram Bot
This bot allows users to search for YouTube videos and download audio, with the option to include a link to the original video. The bot uses the Aiogram framework and the yt_dlp library for extracting video information. FFmpeg is required for audio processing. Follow the instructions below for installation and setup.
Features
Installation and Setup
- Clone the Repository:
git clone https://github.com/Refret28/convert-bot.git cd convert-bot- Install Dependencies:
pip install -r requirements.txtThe requirements.txt file includes all necessary dependencies, including the yt_dlp library, which is used for extracting video information from YouTube. yt_dlp is a fork of youtube-dl with updated features for working with YouTube.
- Install FFmpeg:
The bot uses FFmpeg for processing audio files. Install FFmpeg as follows:
Download FFmpeg from the official website: https://ffmpeg.org/download.html.
Extract the archive and add the FFmpeg path to your system's PATH environment variable.
Install FFmpeg via Homebrew:
brew install ffmpeg Install FFmpeg using your system's package manager. For example, on Ubuntu:
sudo apt update sudo apt install ffmpeg- Configuration:
Insert your Telegram Bot API token, path to bin and path to dir to remove residual files after downloading into the config.ini file under the [BOT TOKEN], [PATH TO BIN] and [PATH TO DIR] sections.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your improvements.