skip to Main Content

I am making a telegram bot to upload videos in my local PC. But when I sent the video, that message is very dumb. like this

Image 1

But I need videos like this

Image 2

Image 3

my code is

from pyrogram import Client
app = Client(
    "session",
    api_id=329,
    api_hash="7943a36fdcf9"
    )
with app:
    app.send_video(chat_id = channel, video = 'vid.mp4',supports_streaming = True)

is there any specific specific methods for sending a proper video? How can I send a video properly

2

Answers


  1. The docs show that you can add arguments caption and thumb to your call to send_video.

    Login or Signup to reply.
  2. Your video file is too big. Telegram will handle videos < 10 MB and automatically create a thumbnail for you. For videos larger than that you’ll have to supply the information about the video yourself. Resolution (width and height), length, thumbnail, etc..

    Additionally, you can omit the supports_streaming argument, as Pyrogram defaults this to True anyway.

    To get information about your video you could use something like ffprobe.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search