Which video format is right for `sendVideo` method in Telegram Bot API

This was really driving me nuts: It's important that the file extension is ".mp4". If you upload a video with ".m4v" extension you'll not see a preview window and the video is opened in an external player.

So here is my final command to reencode and resize a video and send it to the bot using curl:

ffmpeg -i input -an -c:v libx264 -crf 26 -vf scale=640:-1 out.mp4
curl -v -F chat_id=CHATID -F [email protected] -F caption=foobar https://api.telegram.org/bot<TOKEN>/sendVideo