transitive-bullshit / puppeteer-lottie

Renders Lottie animations via Puppeteer to image, GIF, or MP4.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use webcodec to accelerate lottie to video

Dramalf opened this issue · comments

Use puppeteer in nodejs using webcodec to convert lottie file to mp4 video

No need to take screenshot of each frame (it takes much time)

Its workflow basiclly looks like this:

  • load in puppeteer lottie-web
  • encode each frame by webcodec API : VideoEncoder and VideoFrame
  • frames -> buffer -> blob -> file
  • send back to nodejs
  • use ffmpeg to generate video

I write a demo here https://github.com/Dramalf/puppeteer-webcodec-lottie/tree/master

I think it can be merged into this project