title: Streaming Video from AR Drone
body: <p>I am trying to stream video from my ar drone but it is not working. I have installed ffmpeg version 2.6, am using Ubuntu 14.04, node.js and the ar-drone npm module. I am also using version 1.0 of the ar drone. I was told that I need to use 2.0 because that is what the modules were built using but I would rather not purchase a new one if I don't have to.Below is the code that I am using</p>
  
  <pre><code>var arDrone = require('ar-drone');
  var http    = require('http');
  
  console.log('Connecting png stream ...');
  
  var pngStream = arDrone.createClient().getPngStream();
  
  var lastPng;
  pngStream
    .on('error', console.log)
    .on('data', function(pngBuffer) {
      lastPng = pngBuffer;
    });
  
  var server = http.createServer(function(req, res) {
    if (!lastPng) {
      res.writeHead(503);
      res.end('Did not receive any png data yet.');
      return;
    }
  
    res.writeHead(200, {'Content-Type': 'image/png'});
    res.end(lastPng);
  });
  
  server.listen(8080, function() {
    console.log('Serving latest png on port 8080 ...');
  });
  </code></pre>
  
  <p>When I run it and go to <a href="http://localhost:8080/" rel="nofollow">http://localhost:8080/</a> in my browser I get the error message "Did not receive any png data yet." Is this because I am using version 1.0 of the drone??</p>