tungs / timecut

Node.js program to record smooth movies of web pages with JavaScript animations
BSD 3-Clause "New" or "Revised" License
623 stars 72 forks source link

animation speed #10

Closed gunsha closed 5 years ago

gunsha commented 5 years ago

Hi, great library! I'm trying to record a css animation that lasts 12 seconds realtime on browser, but with the following code, the animation lasts 3 seconds and the video the 12 seconds, any idea if I'm missing some configuration? Thanks!

const timecut = require('timecut'); timecut({ url: '', viewport: { width: 300, height: 250 }, quiet: false, pipeMode: true, fps: 30, duration: 12, output: 'video.mp4' }).then(function () { console.log('Done!'); });

tungs commented 5 years ago

Hi @gunsha! Thanks for asking this question.

Unfortunately CSS animations probably won't be recorded correctly, as timecut and timesnap don't capture screenshots in real-time. They're intended only to capture JavaScript animations (and maybe videos in the future). You can read more at https://github.com/tungs/timecut#limitations