Dev.to
7/7/2026

Fixing iPhone HEVC Videos That Telegram Silently Rejects
Short summary
iPhones record in HEVC by default, but Telegram's video avatar pipeline silently rejects HEVC files without error—leaving users staring at a stuck upload spinner. The author documented the exact specs (H.264, 800×800px, yuv420p pixel format, no audio track, max 10 seconds, ~2MB) and built a two-pass ffmpeg workflow that detects and crops black bars, then encodes to spec. Result: a Python Telegram bot (@LiveAvaBot) that handles the conversion automatically. 201 users, ~10 conversions daily.
- •Telegram video avatars require H.264, 800×800px, yuv420p, no audio, max 10 seconds (~2MB)—but iPhones default to HEVC and silently fail
- •Two-pass ffmpeg solution: cropdetect for black bars, then scale/convert/encode with H.264 baseline and faststart moov atom
- •Live product: @LiveAvaBot Telegram bot automates conversion, 201 users, ~10 daily conversions
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



