0 Video avatars ("profile photos")
Lonami edited this page 2020-08-07 12:35:33 +02:00

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, later mentioned in Telethon Chat.

To use a video in your profile (as long as the file meets the above criteria):

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())