I've been trying to capture a sequence of pngs from a website using phantomjs or slimerjs, then send the output to /dev/stdout and pipe it to ffmpeg to make a video.
Like so:
phantomjs test.js | ./ffmpeg -analyzeduration 2147483647 -probesize 2147483647 -y -c:v png -f image2pipe -r 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart test.mp4
test.js:
var page = require('webpage').create();
page.clipRect = { top: 0, left: 0, width: 900, height: 800};
page.viewportSize = { width: 900, height: 800};
var url = 'http://dl.dropbox.com/u/621993/voronoi/voronoi.html';
var frames = 50;
page.open(url, function(){
setInterval(function(){
page.render('/dev/stdout');
if( frames == 0 ) {
phantom.exit();
}
frames--;
}, 100);
});
But i don't get absolutely anything on stdout, tried this on latest ubuntu and debian wheezy with node.js from ports and node.js compiled from git.
phantomjs installed with npm install -g phantomjs
I'm guessing this is a bug, tried looking on their github issue tracker but there are 1000+ open issues, i would like to check before opening a ticket if i'm actually doing things right.
Thank you.