telegram-ytdl
telegram-ytdl copied to clipboard
A simple & fast YouTube download Telegram bot.
telegram-ytdl
A simple & fast YouTube download Telegram bot.
Synopsis
I was never satisfied with any YouTube downloader solution, because they either required chasing some website that was either bloated with ads, painfully slow, taken down the next day or all of those combined. Using yt-dlp in the command line was my go-to, but doesn't really work great on mobile.
So I made this bot, to download from a single place across platforms, fast and effortless.
The bot then simply passes the URL to yt-dlp with the -f b flag, which downloads the best quality
format that contains both video and audio. This is meant to work together with a self-hosted
Telegram bot API server, so that the upload limit for bots is increased from 50MB to 2GB.
The instance hosted by me is no longer available for public use, but you can simply host your own instance.
Hosting
To host your own instance of this bot, you need to have a Telegram bot token, Telegram API Token and a server to run the bot on. You can create a Telegram bot with BotFather and purchase a cheap VPS with the hoster of your choice.
I recommend Hetzner and you can get 20€ in credits for free using my referral link.
Installation
-
Create a folder and put the docker-compose.yml into it.
-
Fill out and adjust the following variables in the docker-compose.yml file:
Variable Description TELEGRAM_BOT_TOKENYour Telegram bot token (get it from BotFather) WHITELISTED_IDSA comma-separated list of Telegram user IDs that are allowed to use the bot (get them from this bot) ADMIN_IDYour Telegram user ID (get it from this bot) TELEGRAM_API_IDYour Telegram API ID (get it here) TELEGRAM_API_HASHYour Telegram API hash (get it here) TELEGRAM_API_ROOTThe URL of your Telegram bot API server (can probably be left unchanged) TELEGRAM_WEBHOOK_PORTThe port the bot will listen on (can probably be left unchanged) TELEGRAM_WEBHOOK_URLThe URL of your Telegram bot API server (can probably be left unchanged) -
Run
docker compose up -din the folder you created.
If you have any problems with hosting feel free to contact me or open an issue.