Skip to content

Instantly share code, notes, and snippets.

@brainwo
Forked from xacnio/telegram_video_sticker_ffmpeg.md
Last active December 19, 2024 22:27
Show Gist options
  • Select an option

  • Save brainwo/dfa539e90b86ad7fd6186d57713960ad to your computer and use it in GitHub Desktop.

Select an option

Save brainwo/dfa539e90b86ad7fd6186d57713960ad to your computer and use it in GitHub Desktop.
Telegram - Create Video Sticker (.WEBM) with FFMPEG

Command

ffmpeg -y -i animated_sticker.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -s 512x512 -b:v 400K output.webm
  • If .webm file size greater than 256 KB, you should reduce "-b:v 400K"
  • .mov video file may has alpha channel but not required.
  • My video sticker pack for example: https://t.me/addstickers/msn_animations

Telegram Sticker Command

  • Go to @Stickers and type "/newvideo"
  • Type a name for sticker pack.
  • Send your .webm file, then type any emoji.
  • Follow bot's directions.

Note: video sticker pack and regular sticker pack are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment