Mikhail Novikov
Mikhail Novikov

Reputation: 633

Is there any way to record a video of website using headless Chrome?

I know there is a way to make screenshots, using many available APIs, such as Puppeteer

https://github.com/GoogleChrome/puppeteer

but what about recording videos? my goal is to capture a CSS animation into an mp4 file.

Or am i doing it all wrong, are there better tools for that on the server side?

Upvotes: 19

Views: 13102

Answers (2)

Mike Sallese
Mike Sallese

Reputation: 827

For recording video with audio, try puppeteer-stream:

https://github.com/Flam3rboy/puppeteer-stream

Upvotes: 2

Luke Robertson
Luke Robertson

Reputation: 1652

https://www.npmjs.com/package/puppeteer-recorder

Something like this can work, it takes lots of screenshots and stitches them together

Upvotes: 1

Related Questions