/youtube-audio-bot

Telegram bot to download MP3 from YouTube

Primary LanguageTypeScriptMIT LicenseMIT

NodeJS YouTube Audio bot v2

📥 Download MP3 from YouTube on Telegram 🎧

Steps

🔁 Validate
ℹ️ Get info
📥 Download video
🎙 Convert to MP3
📸 Generate cover (video thumbnail) and set to MP3 file
🖋 Write meta data (artist, title, album)
📤 Upload to Telegram

Launch

  1. Download a release or clone repository
  2. Open CMD/terminal and navigate to project folder
  3. Run npm i --omit=dev to install dependencies (or just npm i for development)
  4. Create environment file .env using .env.example & configure
  5. Run npm run start to start the bot

Requirements

Config help (.env)

Key Value
YTA_TG_TOKEN Telegram bot API token
YTA_TG_OWNERS Array of chat ID (Telegram account/chat ID)
YTA_WHITELIST_CHATS Array of chat ID or username (do not auto leave from these chats)
YTA_FFMPEG_EXE Path to a working ffmpeg binary (converts MP4 to MP3)
YTA_MONGODB MongoDB connection string
YTA_USER_CONCURRENT_DOWNLOADS Maximum number of concurrent downloads per user
YTA_TOTAL_CONCURRENT_DOWNLOADS Maximum number of concurrent downloads (queue limit)