How to Convert HeyGen AI Videos into Telegram-Compatible Avatar Clips Using ffmpeg
HeyGen exports talking-head videos in 16:9 or 9:16 format with stereo audio, but Telegram video avatars require a strict set of simultaneous conditions: H.264 codec, 800x800 square resolution, a maximum duration of 10 seconds, and no audio track whatsoever. A single ffmpeg command can handle all four conversions in one pass — cropping the largest centered square, scaling to 800x800, stripping audio, and encoding in H.264 at 900kbps. The resulting file runs around 1.1MB, safely under Telegram's 2MB upload cap. For sources with baked-in letterboxing, a preliminary ffmpeg cropdetect pass can identify the exact content boundaries before the main encode. The author also shares a minimal Python aiogram 3 bot handler that accepts HeyGen video uploads on Telegram and returns an avatar-ready file automatically.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in