Faster Real Time A.R Drone Video Streaming

254 views Asked by At

I've attempted ffplay tcp://192.168.1.1:5555 to video stream from the AR Drone 2.0; however, the delay is way too high.

My second attempt was with the following:

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

This only streamed images. I had to refresh browser every second.

My third option was using this option:

var arDrone=require('ar-drone')
var client= arDrone.createclient();
require('ar-drone-png-stream')(client,{port:8000})

It streamed a lot of images in a short amount of time. The delay is still significant and I'm looking for a video.

Are there other approaches that will significantly lower the delay of the video stream?

0

There are 0 answers