ehForwarderBot / ehForwarderBot/efb-telegram-master
Support to TGS (Lottie/Bodymovin) Animated Stickers
- Dominant language
- Python
- Stars
- 220
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
### Background
On 5 July 2019, Telegram released new [animated stickers] feature, which is using a vector based format generated using After Effect with a tailored extension.
### Technical details
Through inspection of the extension and some sample files, Telegram is found to be using a subset/fork of [Lottie] (a.k.a. Bodymovin), which is led by Airbnb. The TGS format is a gzip-ed JSON file with a similar structure with Lottie, and an extra attribute `"tgs": 1`. By a simple look through, TGS is _semmingly_ compatible with Lottie format.
### Issues on supporting animated stickers
1. ~~Telegram Bot API~~
~~As of when the issue is created, bot API is yet to support the new message type, this prevents ETM to send or receive any TGS animated stickers. We need to wait Telegram Bot API updates to process this kind of message.~~
[Update 31 July 2019]:
Telegram Bot API has released animated sticker support. [[3]]
2. ~~`python-telegram-bot` (PTB) support of new bot API~~
~~Our upstream dependency, PTB need to update to support the latest bot API update which incorporates the new animated stickers format.~~
Update: Animated sticker support has arrived in PTB.
3. Lottie animation rendering
Despite being able to render in a wide range of platforms (Android, iOS, Web, React Native, and Windows), we did not find a way to encode Lottie animation into a more universally accepted format (e.g. MP4 [[1], [2]]). This prevent us to pass on TGS animations to other IM platforms as Telegram is seemingly the only IM platform that renders Lottie animations.
[animated stickers]: https://telegram.org/blog/animated-stickers
[Lottie]: https://airbnb.io/lottie/
[1]: https://github.com/airbnb/lottie-web/issues/1575
[2]: https://github.com/airbnb/lottie-android/issues/731
[3]: https://core.telegram.org/bots/api#july-29-2019
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.