aboutmili.blogg.se

Mac gifski
Mac gifski







opts.ffmpegOptions object? Optional ffmpeg settings for.opts.puppeteerOptions object? Optional puppeteer launch settings.opts.rendererSettings object? Optional lottie renderer settings.opts.renderer string Which lottie-web renderer to use (optional, default 'svg').viceScaleFactor number Window device scale factor (optional, default 1).opts.quiet object Set to true to disable console output (optional, default false).opts.jpegQuality object JPEG quality for frames (does nothing if using png) (optional, default 90).opts.height number? Optional output height.opts.width number? Optional output width.opts.path string? Relative path to the JSON file containing animation data.opts.animationData object? JSON exported animation data.opts.output string Path or pattern to store result.A GIF file (requires Gifski to be installed).An mp4 video file (requires FFmpeg to be installed).sprintf format 'frame-%d.png' or 'frame-%012d.jpg') An image to capture the first frame only (png or jpg).You must pass either path or animationData to specify the Lottie animation. Renders the given Lottie animation via Puppeteer. 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).įor mp4 outputs, the height may be different by a pixel due to the x264 encoder requiring even heights. If you pass width or height, the other dimension will be inferred by maintaining the original animation's aspect ratio. 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.

mac gifski

Render the first frame of the animation as a JPEG image Output: 'frame-%d.png', // sprintf format Render each frame of the animation as PNG images with height 128px Create a GIF with width 640px from a lottie animation Usage const renderLottie = require('puppeteer-lottie') On macOS, you can run: brew install ffmpeg If you want to generate MP4s, you must also install ffmpeg. On macOS, you can run: brew install gifski If you want to generate GIFs, you must also install gifski. Install npm install -save puppeteer-lottie Renders Lottie animations via Puppeteer to image, GIF or MP4.









Mac gifski