InputStoryContentVideo¶
- class telegram.InputStoryContentVideo(video, duration=None, cover_frame_timestamp=None, is_animation=None, *, api_kwargs=None)[source]¶
Bases:
telegram.InputStoryContent
Describes 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.265
codec, with key frames added each second in theMPEG4
format, 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.Path
object) 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) – PassTrue
if 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.265
codec, with key frames added each second in theMPEG4
format, and must not exceed'30000000'
MB.- Type: