How I Built a Telegram Video Avatar Bot With Python and FFmpeg
📰 Dev.to · liveavabot
Learn how to build a Telegram video avatar bot using Python and FFmpeg to convert videos to compatible formats
Action Steps
- Record a short video clip using a device like an iPhone
- Use FFmpeg to convert the video from HEVC (H.265) to H.264, a format compatible with Telegram's video avatar system
- Write a Python script to interact with the Telegram API and upload the converted video as an avatar
- Test the bot to ensure it works correctly and handles potential errors
- Deploy the bot on a server or platform to make it accessible to users
Who Needs to Know This
This project is beneficial for developers and engineers who want to create custom Telegram bots or automate tasks, especially those interested in video processing and conversion
Key Insight
💡 Telegram's video avatar system only accepts H.264 videos, so converting from HEVC (H.265) is necessary
Share This
🤖 Build a Telegram video avatar bot with Python and FFmpeg! 📹💻
Key Takeaways
Learn how to build a Telegram video avatar bot using Python and FFmpeg to convert videos to compatible formats
Full Article
Title: How I Built a Telegram Video Avatar Bot With Python and FFmpeg
URL Source: https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p
Published Time: 2026-04-21T13:05:20Z
Markdown Content:
# How I Built a Telegram Video Avatar Bot With Python and FFmpeg - DEV Community
[Skip to content](https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
0 Add reaction
0 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 0 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22How%20I%20Built%20a%20Telegram%20Video%20Avatar%20Bot%20With%20Python%20and%20FFmpeg%22%20by%20liveavabot%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p&title=How%20I%20Built%20a%20Telegram%20Video%20Avatar%20Bot%20With%20Python%20and%20FFmpeg&summary=I%20tried%20to%20set%20a%20video%20avatar%20on%20Telegram%20last%20month.%20Recorded%20a%20short%20clip%20on%20my%20iPhone%2C%20uploaded...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)
[Share Post via...](https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/liveavabot)
[liveavabot](https://dev.to/liveavabot)
Posted on Apr 21
# How I Built a Telegram Video Avatar Bot With Python and FFmpeg
[#telegram](https://dev.to/t/telegram)[#python](https://dev.to/t/python)[#ffmpeg](https://dev.to/t/ffmpeg)[#showdev](https://dev.to/t/showdev)
I tried to set a video avatar on Telegram last month. Recorded a short clip on my iPhone, uploaded it, and nothing happened. No error message. No toast notification. Telegram just silently rejected it.
Turns out iPhone records in HEVC (H.265) by default since the iPhone 7. Telegram's video avatar system only accepts H.264. When you upload HEVC, the server validates it, fails, and tells you absolutely nothing.
I spent two hours thinking my internet connection was broken before I figured this out.
## [](https://dev.to/l
URL Source: https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p
Published Time: 2026-04-21T13:05:20Z
Markdown Content:
# How I Built a Telegram Video Avatar Bot With Python and FFmpeg - DEV Community
[Skip to content](https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
0 Add reaction
0 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 0 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22How%20I%20Built%20a%20Telegram%20Video%20Avatar%20Bot%20With%20Python%20and%20FFmpeg%22%20by%20liveavabot%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p&title=How%20I%20Built%20a%20Telegram%20Video%20Avatar%20Bot%20With%20Python%20and%20FFmpeg&summary=I%20tried%20to%20set%20a%20video%20avatar%20on%20Telegram%20last%20month.%20Recorded%20a%20short%20clip%20on%20my%20iPhone%2C%20uploaded...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fliveavabot%2Fhow-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p)
[Share Post via...](https://dev.to/liveavabot/how-i-built-a-telegram-video-avatar-bot-with-python-and-ffmpeg-o9p#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/liveavabot)
[liveavabot](https://dev.to/liveavabot)
Posted on Apr 21
# How I Built a Telegram Video Avatar Bot With Python and FFmpeg
[#telegram](https://dev.to/t/telegram)[#python](https://dev.to/t/python)[#ffmpeg](https://dev.to/t/ffmpeg)[#showdev](https://dev.to/t/showdev)
I tried to set a video avatar on Telegram last month. Recorded a short clip on my iPhone, uploaded it, and nothing happened. No error message. No toast notification. Telegram just silently rejected it.
Turns out iPhone records in HEVC (H.265) by default since the iPhone 7. Telegram's video avatar system only accepts H.264. When you upload HEVC, the server validates it, fails, and tells you absolutely nothing.
I spent two hours thinking my internet connection was broken before I figured this out.
## [](https://dev.to/l
DeepCamp AI