0.2.1 • Published 10 years ago

page2video v0.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

page to video

Build Status

基于 casperjsfluent-ffmpeg,把页面生成视频功能

原理

casperjs生成多张图片,再用fluent-ffmpge把多张图片合成视频

安装

npm安装

$ npm install page2video

使用

var P2V = require("page2video");


var p2v = new P2V(url, selector);

p2v.start(function(videoPath){
	
	// videoPath: 最终生成的视频路径, 需要复制到别的地址,不然会被删除

});

page页面

需要设置开始截屏与结束截屏

send("captureStart");

send("captureEnd");

function send(action){
  if (typeof window.callPhantom === 'function') {
    window.callPhantom({ 'action': action });
  }
}
0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago