Skip to content

lokshunhung/line-sticker-to-gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

line-sticker-to-gif

Download and convert line stickers as gif with headless chromium

Prerequisites: node v14+, yarn v1

Install dependencies:

$ yarn

Usage

Example: download line sticker pack 14176479

$ yarn scrape 14176479   # download .png stickers
$ yarn convert 14176479  # convert downloaded stickers to .gif
$ yarn archive 14176479  # archives converted .gif as zip

output directory ./dist/14176479-converted

Example: download line emoji pack 6124aa4ae72c607c18108562

$ yarn scrape 6124aa4ae72c607c18108562 --emoji # download .png stickers
$ yarn convert 6124aa4ae72c607c18108562        # convert downloaded emojis to .gif

Example: run server and download 11366335

$ yarn app  # starts server
$ curl -X GET http://localhost:3000/api/sticker/11366335 --output 11366335.zip

How to make gif loop infinitely with ffmpeg without degrading image quality:

Converting one GIF:

$ ffmpeg -i 13.gif \
      -vf palettegen \
      13.palette.png && \
  ffmpeg -i 13.gif \
      -i 13.palette.png \
      -filter_complex paletteuse \
      -loop 0 \
      13.output.gif

Converting a sticker pack:

$ yarn fix-gif-loop 654f0d4061d46e24927970e3 # fixes converted stickers in 654f0d4061d46e24927970e3-converted

NEW: Convert .apng to .gif with loop fix and colour palette preserve

$ yarn scrape 64be327dd7e76e2262d501e9 --emoji
$ yarn convert2 64be327dd7e76e2262d501e9

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages