@Sahil and @OSUblake Thank-you very much for your help. I could finally manage to record the animation.
Had to play the animation (progress) and <video> (currentTime) frame by frame. It was a little tricky for the video element because the number of frames may be different from the animation.
However, use the gif.ls lib did not work for me because of the quality of the image and I just could not make html2canvas work.. Always got blank screenshot.
So I added a delay of 1 second on each frame and console.log of some string. Then running headless browser (chrome) I could get console messages and take screenshot everytime this string was printed.. Each screenshot takes about 500ms so I still had some extra time to wait for the next frame.
After that ffmpeg to make the video from images.
It worked great and excellent quality. Totally recommend for who needs to get this same job done.
@yoannesDid you tried MediaRecorder with Headless chrome. If you did it, Kindly share me the result.
Thank you in advance.
TimelineLite to mp4
in GSAP
Posted
@yoannes Did you tried MediaRecorder with Headless chrome. If you did it, Kindly share me the result.
Thank you in advance.