phantomjs / slimerjs输出到标准输出为空

我一直在试图用phantomjs或slimerjs从网站捕捉一个pngs序列,然后将输出发送到/ dev / stdout并将其传送到ffmpeg来制作video。

像这样:

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); }); 

但我没有得到绝对的标准输出,尝试了这个最新的Ubuntu和Debian wheezy从端口和node.js从git编译node.js。

npm install -g phantomjs

我猜这是一个错误,试图寻找他们的github问题跟踪器,但有1000多个开放的问题,我想打开票之前检查,如果我实际上做的事情正确。

谢谢。

看来phantomjs在页面上获取复杂的html / js(非常漂亮的方式),如果你尝试其他的URL为ex。 http://www.goodboydigital.com/pixijs/examples/12-2/和略有不同的命令和最近ffmpeg它只是工作;)

 phantomjs test.js | ffmpeg-2.4.2-64bit-static/ffmpeg -y -c:v png -f image2pipe -r 25 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart test.mp4