Send/share a YouTube link and receive an audio file immediately.
Get video details
Get detailed information about the YouTube video.
Download audio
Download tracks for listening anywhere, anytime.
Perfect for
For listening to talk shows, music, or videos that don’t contain a lot of video content.
For busy users who prefer audio videos or who find it more convenient to listen to podcasts on the go.
This is essential to circumvent censorship blocks (as, for example, in modern Russia, where YouTube is blocked, but Telegram is still available).
How to use
Start Chat with @TubeCaster. Request registration from menu or by /register command.
Paste YouTube Link or share it from YouTube app.
Download MP3 or listen it right from the chat.
Tech Insides
A development branch of yt-dlp used for video processing (fetching info and audio tracks).
The bot itself is implemented using pyTelegramBotAPI v.4 and flask v.3.
Screenshots
The application menu.
Video details.
Successful registration.
Downloaded audio.
Fetched video details.
Video details.
Sending audio.
Application Features
Remote realtime logging via http or syslog. It’s possible to receive application logs in the realtime on the developer machine during troubleshooting process.
Different database providers for local development and production via prisma. (It’s the only to way to use db on vercel hosting to switch to Postgres.)
Actual audio length calculation (via ffprobe packets list command). Sometimes the generated files contain incorrect meta information, in which case the only way out is to get real data using ffprobe.
Large audio files splitting on-the fly. If the file size exceeds the telegram API limit (50MB), it is split into several smaller files before being sent to the user.
Testing with partial functional/local resources.
A simple authorization system (using requests). At some point, we decided to restrict access to the bot only to registered users. Now all the new users are required to send a registration request.
Detecting delays in the processing queue. In this case, repeated messages are periodically sent indicating that the request is still being processed.
Powered by mighty and cute kitties under the hood.