3

Here is what I have tried:

I used a library called Konva.js to create animations in the Frontend.

Animations include Text, Image, Shapes etc

Everything works fine in Frontend.

I want to make change text and render 1000s of videos in the backend.

I’m not sure whether Konva.js library is the right approach. I was able to run Text animations and save them in the Backend using an approach which converts frames to video.

However, I'm not able to do Text animations with Video as Background in the Canvas.

More details - https://leanylabs.com/blog/node-videos-konva/

I’m aware of the concept where I can render videos in the backend using headless browsers like Phantom or Pupeteer.

That would mean too much compute resource when deploying it at scale, is there any other good approach?

Anirudh
  • 2,767
  • 5
  • 69
  • 119
  • Questions like this one get closed all the time under "Seeking recommendations for books, tools, software libraries, and more" ... if you are not able to do text animations post minimal code reproducing your issue – Helder Sepulveda Feb 23 '22 at 20:05
  • https://julien-decharentenay.medium.com/how-to-save-html-canvas-animation-as-a-video-421157c2203b – The scion Mar 01 '22 at 06:48

1 Answers1

1

If scalibility is the main concern, than the best solution is that you save animation (Say text, times and customizations) in DB. And instead of video you instead return this Animation files back to be re-rendered in output (Canvas).

It will save space, will be scalable and lighter to the network. GUI can alwasy switch between when to display animation and wen to play a real video.

Regarding approach of rendering 1000s of customizable video, it will alwasy be resource intensive in all respect, unless you design a specific rendering engine for a specific task.

Anurag Vohra
  • 1,781
  • 12
  • 28