lottie-converter
v1.0.0
Published
Convert Lottie(.json) files to gif, mp4, webp, webm and [dot]lottie files.
Downloads
77
Maintainers
Readme
About The Package
This is an unoffical api for this website. It can convert any lottie(.json) file to other formats like gif, webp, etc.
To know more about it you can join my discord server here.
Uses
const converter = require('lottie-converter')
const fs = require('fs')
async function main() {
let converted = await converter({
file: await fs.readFileSync('lottie.json'),//file buffer
filename: 'hi.json',//optional
format: 'gif',// format to convert to, either 'gif' , 'mp4' , 'webp' , 'webm' or 'lottie'
width: 100,//optional, defaults to 1000
height: 100, //optinal, defaults to 1000
})
console.log(converted)//base64
fs.writeFileSync('converted.gif', converted ,'base64')
}
main()