Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendVideo doesn't work for iPhone #15

Closed
pyed opened this issue Aug 15, 2015 · 2 comments
Closed

SendVideo doesn't work for iPhone #15

pyed opened this issue Aug 15, 2015 · 2 comments
Labels
bug Something isn't working

Comments

@pyed
Copy link
Contributor

pyed commented Aug 15, 2015

the testing has been done with the following code.

package main

import (
    "log"

    "github.com/Syfaro/telegram-bot-api"
)

func main() {
    bot, err := tgbotapi.NewBotAPI("YourAwesomeAPIToken")
    if err != nil {
        log.Panic(err)
    }

    bot.Debug = true

    log.Printf("Authorized on account %s", bot.Self.UserName)

    u := tgbotapi.NewUpdate(0)
    u.Timeout = 60

    err = bot.UpdatesChan(u)
    if err != nil {
        log.Panic(err)
    }

    videofile := "1.mp4"
    for update := range bot.Updates {
        log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text)

        msg := tgbotapi.NewMessage(update.Message.Chat.ID, "video on the way")
        msg.ReplyToMessageID = update.Message.MessageID

        bot.SendMessage(msg)

        newVid := tgbotapi.NewVideoUpload(update.Message.Chat.ID, videofile)
        if _, err := bot.SendVideo(newVid); err != nil {
            log.Panic(err)
        }
    }
}

I tested sending videos with multiple mp4 files and they all show the same behavior, when the bot sends them they will have no thumbnail, and the time of the video will be 00:00, also I should mention that on the iPhone Telegram app they can not be played!, it will just show a black background, on the OS X client it will work, but as I said, no thumbnail and no time.

I don't think that this is an API issue, because the OS X client handles them perfectly, using the drop-in feature it will ask you to send them with compression or "in a quick way", if you choose without compression I believe it will send them as a document, with the compression they'll be okay.

for testing you could download this http://i.imgur.com/CGaKrhh.gifv

@Syfaro
Copy link
Member

Syfaro commented Aug 16, 2015

My best guess is that Telegram for Mac is reencoding them in a different format, I'll have to play around with that.

@Syfaro Syfaro added the bug Something isn't working label Sep 4, 2015
@Syfaro
Copy link
Member

Syfaro commented Jan 18, 2016

I'm closing this issue because it's obviously related to encoding issues, not some issue with this library.

@Syfaro Syfaro closed this as completed Jan 18, 2016
ilpy20 pushed a commit to ilpy20/telegram-bot-api that referenced this issue Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants