2

In Android, I want to export bodymovin animation as mp4.

I have animation files like this Lottie Files. now I am looking for code in which I can export this animation as mp4

The code I have tried:

public void generateFrame(Drawable yourLottieDrawable) {
   drainEncoder(false);

   final Canvas canvas = inputSurface.lockCanvas(null);

    try {
        yourLottieDrawable.draw(canvas);
    } finally {
        inputSurface.unlockCanvasAndPost(canvas);
    }
}
TylerH
  • 20,799
  • 66
  • 75
  • 101

0 Answers0