telegram.InputMediaVideo

class telegram.InputMediaVideo(media, caption=None, width=None, height=None, duration=None)

Bases: telegram.files.inputmedia.InputMedia

Represents a video to be sent.

type

strvideo.

media

str – File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing telegram.Video object to send.

caption

str – Optional. Caption of the video to be sent, 0-200 characters.

width

int – Optional. Video width.

height

int – Optional. Video height.

duration

int – Optional. Video duration.

Parameters:
  • media (str) – File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing telegram.Video object to send.
  • caption (str, optional) – Caption of the video to be sent, 0-200 characters.
  • width (int, optional) – Video width.
  • height (int, optional) – Video height.
  • duration (int, optional) – Video duration.

Note

When using a telegram.Video for the media attribute. It will take the width, height and duration from that video, unless otherwise specified with the optional arguments. At the moment using a new file is not yet supported.