The simplest way
ffmpeg -re -i <your_input> -c:v libx264 -c:a aac -f flv <stream_url>/<stream_key>
-re
reads the input at native frame rate, doing this is recommended by FFmpeg.-c:v libx264
encodes the video of the output inlibx264
, the required video encoding by Telegram.-c:a aac
encodes the audio of the output inaac
, the required audio encoding by Telegram.-f flv
sets the format of the output toflv
, the required format by Telegram.