ffmpeg -re -i <your_input> -c:v libx264 -c:a aac -f flv <stream_url>/<stream_key>-rereads the input at native frame rate, doing this is recommended by FFmpeg.-c:v libx264encodes the video of the output inlibx264, the required video encoding by Telegram.-c:a aacencodes the audio of the output inaac, the required audio encoding by Telegram.-f flvsets the format of the output toflv, the required format by Telegram.
Just add -loop to the input options!
ffmpeg -re -loop -i <your_input> -c:v libx264 -c:a aac -f flv <stream_url>/<stream_key>
You can use also
-c:v h264_nvencencoding for video (if you have nvidia gpu). Telegram allows h.264 codec for streams.