Telethon: Fail to add thumbnail for uploaded videos

I cannot get video thumbnail displayed. The code used to send out video is standard code in the manual. I tried all possible ways I can find to send the video. Following are the things I have tried:

  • send using file path
  • upload video and send using uploaded object
  • send file without attributes
  • set video attributes with 0 width and 0 height
  • add proper attributes for the video
  • resize the jpeg thumb file with longer edge of 200px and 10kb size
  • resize the jpeg thumb file with 200x200px and less than 10kb size
  • resize the jpeg thumb file with longer edge of 320px and less than 200kb size

All files are send with supports_streaming=True. If additional attribute is provided, supports_streaming is also set to True in the attributes. Does anyone succeed in upload video files larger than 100 MB with thumbnail?

  await client.send_file(
      username,
      uploaded_file,
      caption=caption,
      attributes=attributes,
      thumb=tmpfile,
      supports_streaming=True)

Sample thumbnail used when calling send_file:

joBBEfdnT2g

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

this is how I had done using an old version of Telethon, but I think it still works with the newer versions.

Also, less than 10MB video thumbnails are generated by Telegram servers, and bots can’t currently override it, to the best of my knowledge.

Maybe the video needs to be larger than 10MB, but that would be a very silly restriction.