From d7ec108d5d1fcc8dabef37efa6de901444924693 Mon Sep 17 00:00:00 2001 From: Lonami Date: Fri, 7 Aug 2020 12:35:33 +0200 Subject: [PATCH] Created Video avatars ("profile photos") (markdown) --- "Video-avatars-(\"profile-photos\").md" | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 "Video-avatars-(\"profile-photos\").md" diff --git "a/Video-avatars-(\"profile-photos\").md" "b/Video-avatars-(\"profile-photos\").md" new file mode 100644 index 0000000..e2a57a9 --- /dev/null +++ "b/Video-avatars-(\"profile-photos\").md" @@ -0,0 +1,22 @@ +As of layer 116, profiles can now add videos along with their profile photo, which will play when a user opens the profile. However, there are some limitations on the type of videos that can be used. In particular, the profile video requirements are: +* The file format must be a `.mp4` video (not `.gif` file). +* The video dimensions must be 800x800 pixels. +* The maximum video size must be less than 2MB. +* The maximum video duration must be less than 10 seconds. + +This information was originally [posted in Telegram Beta Chat](https://t.me/tgbetachat/325956), later [mentioned in Telethon Chat](https://t.me/TelethonChat/235560). + +To [use a video](https://tl.telethon.dev/methods/photos/upload_profile_photo.html) in your profile (as long as the file meets the above criteria): + +```python +from telethon import TelegramClient, functions + +client = ... + +async def main(): + await client(functions.photos.UploadProfilePhotoRequest( + video='/path/to/video.mp4' + )) + +client.loop.run_until_complete(main()) +``` \ No newline at end of file