re3r02022-04-13 18:00:14
re3r0, 2022-04-13 18:00:14

Aiogram how to send music without saving to disk?

idea of ​​the bot: to parse the link to the music, to give the bot what he would send to the user, in principle, everything

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Vladislav Samoilov, 2022-04-13

Use the Linux built-in FFMPEG
Or install it on your PC
Here is the command line command:
ffmpeg -f avfoundation -i ":1" -t 10 -f mpegts "tcp:// host_or_ip_address_of_remote_pc(what_will_listen_on) :port"
Then configure another server or something else to receive the stream. See how the bot reacts to MP3 audio streaming. There are music bots on Discord and they can stream music. But they will not be able to save it byte by byte.
I don’t know how things are in Telegram. Perhaps better. It could be worse.
For your purposes, ffmpeg will do. Allows you to stream audio and video file without saving it on PC. Didn't use for your purposes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question