Create screencast of a website
docker run -v "${PWD}/data:/home/node/Downloads" apicore/puppetcam https://tobiasahlin.com/spinkit/ -l 10000
The output will be a 10 second long full HD video saved as ./data/video.webm
.
docker run -v "${PWD}/data:/home/node/Downloads" apicore/puppetcam https://site-triggered.example/ -t -l 10000
The recording is started when the window.triggerRenderer
variable on the website becomes true
and it is stopped when the same variable becomes false
again. This option can be used to control the recording from the website itself. In this case the --length
parameter is only used to set a sensible timeout. The output will be a full HD video saved as ./data/video.webm
.
export.js <url>
Record a video from a given url
Positionals:
url URL to record the video from [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
-o, --output Output path [string] [default: ~/Downloads/video.webm]
-l, --length Video length in milliseconds [number] [default: 5000]
-w, --width Video width [number] [default: 1920]
-h, --height Video height [number] [default: 1080]
-t, --trigger Use trigger from website [boolean] [default: false]
-s, --start-timeout Start trigger timeout [number] [default: 120000]
-e, --end-timeout End trigger timeout [number] [default: 5000]
- xvfb
- chrome browser
- nodejs
- npm modules listed in package.json
- up-to-date git submodules
npm install
npm run install-extension
Use the same way as the dockerized version. A few examples:
node export.js https://tobiasahlin.com/spinkit/ -l 10000 # Outputs ~/Downloads/video.webm
node export.js https://tobiasahlin.com/spinkit/ -o spinkit.webm # Outputs ./spinkit.webm
- Thanks to @muralikg for the original puppetcam idea.
- Thanks to @muaz-khan for his screen-recording chrome extension.