Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to :tg-const:`telegram.constants.FileSizeLimit.FILESIZE_UPLOAD` in size, this limit may be changed in the futur
(
self,
chat_id: int | str,
video: "FileInput | Video",
duration: TimePeriod | None = None,
caption: str | None = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
width: int | None = None,
height: int | None = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
supports_streaming: bool | None = None,
caption_entities: Sequence["MessageEntity"] | None = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int | None = None,
has_spoiler: bool | None = None,
thumbnail: "FileInput | None" = None,
reply_parameters: "ReplyParameters | None" = None,
business_connection_id: str | None = None,
message_effect_id: str | None = None,
allow_paid_broadcast: bool | None = None,
show_caption_above_media: bool | None = None,
cover: "FileInput | None" = None,
start_timestamp: int | None = None,
direct_messages_topic_id: int | None = None,
suggested_post_parameters: "SuggestedPostParameters | None" = None,
*,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: int | None = None,
filename: str | None = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
)
| 2101 | ) |
| 2102 | |
| 2103 | async def send_video( |
| 2104 | self, |
| 2105 | chat_id: int | str, |
| 2106 | video: "FileInput | Video", |
| 2107 | duration: TimePeriod | None = None, |
| 2108 | caption: str | None = None, |
| 2109 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 2110 | reply_markup: "ReplyMarkup | None" = None, |
| 2111 | width: int | None = None, |
| 2112 | height: int | None = None, |
| 2113 | parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 2114 | supports_streaming: bool | None = None, |
| 2115 | caption_entities: Sequence["MessageEntity"] | None = None, |
| 2116 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 2117 | message_thread_id: int | None = None, |
| 2118 | has_spoiler: bool | None = None, |
| 2119 | thumbnail: "FileInput | None" = None, |
| 2120 | reply_parameters: "ReplyParameters | None" = None, |
| 2121 | business_connection_id: str | None = None, |
| 2122 | message_effect_id: str | None = None, |
| 2123 | allow_paid_broadcast: bool | None = None, |
| 2124 | show_caption_above_media: bool | None = None, |
| 2125 | cover: "FileInput | None" = None, |
| 2126 | start_timestamp: int | None = None, |
| 2127 | direct_messages_topic_id: int | None = None, |
| 2128 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 2129 | *, |
| 2130 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 2131 | reply_to_message_id: int | None = None, |
| 2132 | filename: str | None = None, |
| 2133 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2134 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2135 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2136 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2137 | api_kwargs: JSONDict | None = None, |
| 2138 | ) -> Message: |
| 2139 | """Use this method to send video files, Telegram clients support mp4 videos |
| 2140 | (other formats may be sent as Document). |
| 2141 | |
| 2142 | Bots can currently send video files of up to |
| 2143 | :tg-const:`telegram.constants.FileSizeLimit.FILESIZE_UPLOAD` in size, this limit may be |
| 2144 | changed in the future. |
| 2145 | |
| 2146 | Note: |
| 2147 | :paramref:`thumbnail` will be ignored for small video files, for which Telegram can |
| 2148 | easily generate thumbnails. However, this behaviour is undocumented and might be |
| 2149 | changed by Telegram. |
| 2150 | |
| 2151 | .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>` |
| 2152 | |
| 2153 | .. versionchanged:: 20.5 |
| 2154 | |removed_thumb_arg| |
| 2155 | |
| 2156 | Args: |
| 2157 | chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| |
| 2158 | video (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` \ |
| 2159 | | :class:`pathlib.Path` | :class:`telegram.Video`): Video file to send. |
| 2160 | |fileinput| |