Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fs = require('fs');
  2.  
  3. var wonkavision = require('./')({
  4.     width: 640,
  5.     height: 480,
  6.     depth: 16
  7. });
  8.  
  9. // Spawn a fullscreen process of Stella, the Atari 2600 emulator within
  10. // wonkavision's contained X session.
  11. wonkavision.spawn('stella', [ __dirname + '/asteroids.bin', '--fullscreen' ]);
  12.  
  13. // Stream the entire session to ./test.webm.
  14. wonkavision.ffmpeg().format('webm').output(fs.createWriteStream('test.webm'));
  15.  
  16. // Update the screenshot of "test.png" every 3 seconds.
  17. setInterval(function () {
  18.     // .ffmpeg is fluent-ffmpeg after the necessary input filters.
  19.     wonkavision.ffmpeg().frames(1).output(__dirname + '/test.png');
  20. }, 3000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement