The original GIF Revolution (see https://telegram.org/blog/gif-revolution for details) happened in January 2016 when Telegram decided to convert most GIF files to AVC videos (also known as H.264) in MP4 containers automatically. In September 2016 it was advanced even further by Telegram's idea of treating soundless videos as “looped autoplayed GIF” (see https://telegram.org/blog/masks#gifs-democratized for details) even when such videos have never been GIF files originally (hence such videos are given the advantage of being no longer limited by any limits of the GIF format; for example, such videos can use more than 256 colours per frame).
My suggestion here (GIF Revolution 2.0) is to use the same video format (VP9 in WebM) for animations (instead of AVC in MP4). Start converting GIF files to VP9 videos. Also start converting soundless video loops to VP9 videos. The following three benefits of such revolution are expected:
② Support for transparent GIF pixels. (Video stickers in Telegram, based on VP9, are able to contain pixels that are partially or completely transparent. Converted GIF files, currently based on AVC, have to lose their transparent areas and thus are forced to appear over a white rectangular area instead of the actual background of the chat. Transparent GIF pixels can be preserved by using VP9 target format for GIF conversion.) A similar earlier suggestion is available: Transparent Sticker-GIFs #15073
③ Important additional incentive to support VP9. (The developer of Telegram's WebK web client told us at https://t.me/WebK_en/5 that supporting video stickers in Safari would mean adding two extra megabytes to the size of the client. Sending GIF files as VP9, instead of AVC, would cause animations' filesizes to shrink because of the better quality-to-filesize ratio, hence they'd evidently save more than 2MB in the long run and might make that developer less reluctant about VP9 support in Safari.)
The following two further routes of development are unlocked:
⓵ VP9 video support. (Not only video stickers, not only converted GIFs, not only soundless video loops, but also regular videos can benefit from the support of WebM format in Telegram because of its better quality-to-filesize ratio.) A similar earlier suggestion is available since 2021: Support sending webm videos #2364
⓶ More animation formats. (Not only animated GIF files, but also animated PNG, animated WebP, animated AVIF, animated JPEG XL could be supported by Telegram eventually. And the second GIF Revolution might be a good time to add some support for at least one or two of those newer-than-1989 animation formats. It should be noted that animated AVIF files do not even require any animation-to-video conversion because they are designed as AV1 videos with altered headers, and thus such format is already more efficient than VP9.) See also the four earlier related suggestions: Add support for APNG format #15907 (animated PNG support), animated webp #1621 (animated WebP support), support AV1 video #6047 (AV1 support), support JXL images (JPEG XL) in Telegram and... #15667 (JPEG XL support).
No, 1. It is not at all obvious, but AVC (x264) compresses much better or much faster with the same video quality on low-resolution images (480p and less) - and these are the resolutions used in GIFs.
2. speed. VP9 has a terrible encoding speed, and even more so the decoding speed. While AVC has a lot of ways to make videos faster in speed. The easiest way is to set LEVEL 2.2 or less. but the codec also has such features as Fast decoding (disabling the unblocking filter and other complex conversion algorithms), as well as a low delay function - its effect is especially video at the moment when the animation reaches the end and starts from the beginning, if this function is not enabled, a lag for a fraction of a second will be noticeable, including this parameter corrects this flaw.
I will also add from myself that the choice of VP9 for stickers was unexpected and the worst decision. Because there was already an ideal candidate, this is WEBP (vp8), which already has animation built in. It is very much faster and supports transparency. And for drawn-art animation there is a lossless compression mode. A very bad decision was to choose VP9 and watch how everything freezes bad when opening the sticker pack.
🎂『Ʀ⎋Ƀ』🎂
Agreeing with Wowa, VP9 has been quite a bit harder on battery.
Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
1. It is not at all obvious, but AVC (x264) compresses much better or much faster with the same video quality on low-resolution images (480p and less) - and these are the resolutions used in GIFs.
2. speed. VP9 has a terrible encoding speed, and even more so the decoding speed. While AVC has a lot of ways to make videos faster in speed. The easiest way is to set LEVEL 2.2 or less. but the codec also has such features as Fast decoding (disabling the unblocking filter and other complex conversion algorithms), as well as a low delay function - its effect is especially video at the moment when the animation reaches the end and starts from the beginning, if this function is not enabled, a lag for a fraction of a second will be noticeable, including this parameter corrects this flaw.
I will also add from myself that the choice of VP9 for stickers was unexpected and the worst decision. Because there was already an ideal candidate, this is WEBP (vp8), which already has animation built in. It is very much faster and supports transparency. And for drawn-art animation there is a lossless compression mode. A very bad decision was to choose VP9 and watch how everything freezes bad when opening the sticker pack.