telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

iOS: Wrong aspect ratio of video

Open harunsasmaz opened this issue 1 year ago • 2 comments

Hi,

I am using v5.5.1 to send videos with the following code. However, the actual aspect ratio 4:5 is broken and video seems as 1:1 on iOS devices.

I also have MacOS and videos have correct aspect ratio on desktop app. Can this be an app issue? Because when I download videos to my device gallery, aspect ratio seems correct.

import (
	tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)

func SendVideo(channel int64, path string, caption string) error {
	video := tgbotapi.NewVideo(channel, tgbotapi.FilePath(path))
	video.ParseMode = "html"
	video.Caption = caption

	_, err := c.bot.Send(video)

	return err
}

harunsasmaz avatar Mar 03 '23 20:03 harunsasmaz

Same problem for me. I can't find where can I set height and width of the video struct manually

evan-sm avatar Aug 27 '23 20:08 evan-sm

https://github.com/go-telegram-bot-api/telegram-bot-api/pull/686

hruljov avatar Oct 13 '23 13:10 hruljov