This Gist contains a portable PowerShell 5.1 script to convert .avif files into video .webm emojis or static .png stickers, suitable for Telegram. A key feature of this script is its ability to spoof the duration of the output .webm files, bypassing Telegram's 3-second limit for video emoji.
- AVIF to WEBM/PNG Conversion: Converts
.aviffiles into video.webmemojis or static.pngstickers. - Duration Spoofing: Modifies the metadata of
.webmfiles to bypass Telegram's 3-second duration limit for video emojis, a technique inspired by thetgradishPython script. - Parallel Processing: Utilizes a portable
ThreadJobmodule for concurrent file conversions, significantly speeding up the process. - Adaptive Quality: Attempts multiple CRF (Constant Rate Factor) levels to ensure the output file size is within Telegram's limits.