Productivity
There are 2 options:
Replace with directory with Lottie animations / Telegram stickers and run:
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-gif
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-png
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-apng
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-webp
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-webm
You can provide parameters via env variables:
HEIGHT
: Output image height. Default: 512WIDTH
: Output image width. Default: 512FPS
: Output frame rate. Default: apng,png,webp - 60; gif - 50QUALITY
: Output quality. Default: 90THREADS
: Number of threads to use. Default: number of CPUsExample:
docker run --rm -e HEIGHT=256 -e WIDTH=256 -e FPS=30 -v /home/ed/Downloads/lottie-animations:/source edasriyan/lottie-to-apng
Results will be saved next to each source file in the same directory.
PATH
variable:
lottie_to_apng.sh
lottie_to_gif.sh
lottie_to_png.sh
lottie_to_webp.sh
lottie_to_webm.sh
$ ./bin/lottie_to_gif.sh -h
usage: ./bin/lottie_to_gif.sh [--help] [--output OUTPUT] [--height HEIGHT] [--width WIDTH] [--threads THREADS] [--fps FPS] [--quality QUALITY] path
Lottie animations (.json) and Telegram stickers for Telegram (*.tgs) to animated .gif converter
Positional arguments:
path Path to .json or .tgs file to convert
Optional arguments:
-h, --help show this help message and exit
--output OUTPUT Output file path
--height HEIGHT Output image height. Default:
--width WIDTH Output image width. Default: 512
--fps FPS Output frame rate. Default: 50
--threads THREADS Number of threads to use. Default: number of CPUs
--quality QUALITY Output quality. Default: 90
cmake --preset conan-release
cmake --preset conan-default
cmake -DCMAKE_BUILD_TYPE=Release -DLOTTIE_MODULE=OFF CMakeLists.txt && cmake --build . --config Release
./bin/lottie_to_gif.sh /home/ed/Downloads/animation.json
./bin/lottie_to_png.sh /home/ed/Downloads/animation.json
./bin/lottie_to_apng.sh /home/ed/Downloads/animation.json
./bin/lottie_to_webp.sh /home/ed/Downloads/animation.json
./bin/lottie_to_webm.sh /home/ed/Downloads/animation.json