I’m using python and telebotAPI for my bot and I noticed that the command bot.send_video(chat_id, open(file_name, 'rb'))
only sends videos smaller than 10mb, is there a way to send very large video files?
UPDATE:
After some comments I read in the telegram documentation: if the file is already stored somewhere on the Telegram servers, you don’t need to reupload it: each file object has a file_id field, simply pass this file_id as a parameter instead of uploading. There are no limits for files sent this way. So how I can send a video to the telegram server and then send the file_id to the chat?
2
Answers
There is an attribute in send_video function as ‘timeout’. By default timeout is 20s. If you need more time for sending your video, set it at your desired time in seconds. For example:
Good Luck!
To send using ‘file_id’ – for example, send file to the bot, the bot will trigger callback, find the remoteFile there, and take id – it will look something like this