npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

puppeteer-lottie-cli

v1.0.9

Published

CLI for rendering Lottie animations via Puppeteer to image, GIF, or MP4.

Downloads

48

Readme

puppeteer-lottie-cli

CLI for rendering Lottie animations via Puppeteer to image, GIF or MP4.

NPM Build Status JavaScript Style Guide

This CLI is also available as a library.

Install

npm install -g puppeteer-lottie-cli

If you want to generate GIFs, you must also install gifski. On macOS, you can run:

brew install gifski

If you want to generate MP4s, you must also install ffmpeg. On macOS, you can run:

brew install ffmpeg

Usage

Usage: puppeteer-lottie [options]

Options:
  -i, --input <path>     relative path to the JSON file containing animation data
  -o, --output <path>    relative path to store output media (image, image pattern, gif, or mp4) (default: "out.png")
  -w, --width <number>   optional output width
  -h, --height <number>  optional output height
  -b, --background <css-color-value>
                         optional output background color (default: "transparent")
  -q, --quiet            disable output progress
  -V, --version          output the version number
  -h, --help             output usage information

Output must one of the following:
  - An image to capture the first frame only (png or jpg)
  - an image pattern (eg. sprintf format 'frame-%d.png' or 'frame-%012d.jpg')
  - an mp4 video file (requires FFmpeg to be installed)
  - a GIF file (requires Gifski to be installed)
Examples:
  $ puppeteer-lottie -i fixtures/bodymovin.json -o out.mp4
  $ puppeteer-lottie -i fixtures/bodymovin.json -o out.gif --width 640
  $ puppeteer-lottie -i fixtures/bodymovin.json -o 'frame-%d.png' --width 1024 --height 1024

Output Size

If you don't pass width or height, the animation's intrinsic size will be used, and if that doesn't exist it will use 640x480.

If you pass width or height, the other dimension will be inferred by maintaining the original animation's aspect ratio.

If both width and height are passed, the output will have those dimensions, but there will be extra whitespace (or transparency if rendering PNGs) due to lottie-web's default rendererSettings.preserveAspectRatio of xMidyMid meet (docs and demo).

For mp4 outputs, the height may be different by a pixel due to the x264 encoder requiring even heights.

Compatibility

All lottie-web features should be fully supported by the svg, canvas, and html renderers.

This includes all of the animations on lottiefiles.com! 🔥

Also see Lottie's full list of supported features.

Related

License

MIT © Travis Fischer