Which video format can be used in Telegram Bot API sendVideo
method?
On the page they only mention “H.264/MPEG-4 AVC”
So if I convert a video (without sound) with
ffmpeg -i input -an -c:v libx264 -crf 26 out.m4v
I get an ok:true
as response but I can’t see the preview (blurred still image) in the Telegram client.
2
Answers
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:
Try adding -pix_fmt yuv420p, that made it work for me.
Note: taken from a comment from @Pastafarianist in this same question, which should be an answer instead.