InputStoryContentVideo¶
- class telegram.InputStoryContentVideo(video, duration=None, cover_frame_timestamp=None, is_animation=None, *, api_kwargs=None)[source]¶
Bases:
telegram.InputStoryContentDescribes a video to post as a story.
Added in version 22.1.
- Parameters:
video (file object |
bytes|pathlib.Path|str, optional) – The video to post as a story. The video must be of the size'720'x'1080', streamable, encoded withH.265codec, with key frames added each second in theMPEG4format, and must not exceed'30000000'MB. To upload a file, you can either pass a file object (e.g.open("filename", "rb")) or the file contents as bytes. If the bot is running inlocal_mode, passing the path of the file (as string orpathlib.Pathobject) is supported as well..duration (
datetime.timedelta|int|float, optional) – Precise duration of the video in seconds; 0-'60'cover_frame_timestamp (
datetime.timedelta|int|float, optional) – Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to0.0.is_animation (
bool, optional) – PassTrueif the video has no sound
- video[source]¶
The video to post as a story. The video must be of the size
'720'x'1080', streamable, encoded withH.265codec, with key frames added each second in theMPEG4format, and must not exceed'30000000'MB.- Type:
- duration[source]¶
Optional. Precise duration of the video in seconds; 0-
'60'- Type:
datetime.timedelta