I am trying to convert a .mp4
file to .gif
using NPM packages, but nothing seems to be working.
I tried using gifski binary package (NPM) for this, but no luck. It says its a binary package and you can use it by child_process.spawn()
or similar. I installed it with -g
(global
) flag and seems like its not recognized even with global
flag. Not sure If you can set PATH or anything. Let me know if its possible.
As for the other tries, I used gify and its just not doing anything (no file or error).
I am getting the .mp4
file from puppeteer-lottie NPM package. Here's my code, if needed for testing:
const renderLottie = require('puppeteer-lottie');
await renderLottie({ animationData: data, output: 'example.mp4', width: 640 });
animationData
: Sticker JSON
I am pretty sure that there are much easier ways to do this, but I am just using complex ones. I just want .mp4
to .gif
at the end.
Thanks for your time.