Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 473
Mikhail Novikov Avatar asked Jan 15 '18 10:01

Mikhail Novikov


People also ask

Can I record a video from a website?

Navigate to the website you want recorded, then launch the screen video recorder app of your choice. You'll find plenty of tools online, from OBS to Screencastify to Loom. If you're a Mac user, you have an in-built screen recorder function.

Can headless Chrome be detected?

On the one hand, Google works to detect bots with reCAPTCHA, but on the other hand, they've created Headless Chrome. Google's solution for blocking bots isn't effective against their own technology. For now, DataDome is the only solution I've tested that can detect Headless Chrome.


2 Answers

For recording video with audio, try puppeteer-stream:

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

like image 97
Mike Sallese Avatar answered Sep 17 '22 03:09

Mike Sallese


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

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

like image 33
Luke Robertson Avatar answered Sep 17 '22 03:09

Luke Robertson