go-telegram-bot-api / telegram-bot-api

Golang bindings for the Telegram Bot API
https://go-telegram-bot-api.dev
MIT License
5.58k stars 863 forks source link

iOS: Wrong aspect ratio of video #641

Open harunsasmaz opened 1 year ago

harunsasmaz commented 1 year ago

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
}
evan-sm commented 10 months ago

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

hruljov commented 9 months ago

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