Giter Site home page Giter Site logo

petoem / node-dronestream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bkw/node-dronestream

0.0 2.0 0.0 270 KB

Realtime video feed from ar.parrot 2.0 drones in pure javascript. Successor of nodecopter-stream.

License: Other

JavaScript 84.91% HTML 14.40% CSS 0.69%

node-dronestream's Introduction

node-dronestream

Get a realtime live video stream from your Parrot AR Drone 2.0 straight to your browser.

Requirements

You'll need a decent and current browser and some cpu horsepower. This code uses web-sockets and the incredibly awesome Broadway.js to render the video frames in your browser using a WebGL canvas.

How to use

Please see the http.createServer and Express 3.0 examples in the 'examples' dir. You attach the stream to your server like this:

// in node:
//
// note that the 'server' object points to a server instance and NOT an express app.
require("dronestream").listen(server); 
// if your drone is on a different IP
require("dronestream").listen(server, { ip: "192.168.2.155" });

We serve the client in the same manner as Socket.IO. Add a reference to /dronestream/nodecopter-client.js in your template. Then attach the stream to a DOM node:

<!-- on the client -->
<script src="/dronestream/nodecopter-client.js"></script>
<script>
  // video canvas will auto-size to the DOM-node, or default to 640*360 if no size is set.
  new NodecopterStream(document.getElementById("droneStream"));
</script>

How it works

The drone sends a proprietary video feed on 192.168.1.1 port 5555. This is mostly a h264 baseline video, but adds custom framing. These frames are parsed and mostly disposed of. The remaining h264 payload is split into NAL units and sent to the browser via web sockets.

In the browser broadway takes care of the rendering of the WebGL canvas.

Status

Node-dronestream has gained some stability in the last release. It attempts to recover lost connections to the drone, and it handles multiple clients, disconnections, etc. See "How to use" for API.

Thanks

  • Triple high fives to Felix 'felixge' Geisendörfer for getting the whole NodeCopter movement started and being extremely helpful in the process of getting this together.

  • André 'zoddy' Kussmann for supplying the drone and allowing me to keep hacking on it, even when he had to cancel the NodeCopter event for himself.

  • Michael Bebenita, Alon Zakai, Andreas Gal and Mathieu 'p01' Henri for the magic of Broadway.js

  • Johann Phillip Strathausen for being a great team mate at NodeCopter 2012 Berlin.

  • Brian Leroux for being not content with the original solution and for cleaning up the predecessor, nodecopter-stream.

  • @karlwestin for picking up where I was to lazy to actually make this usable.

Demo

Watch @felixge demoing node-dronestream live at german user group cgnjs: http://www.youtube.com/watch?v=nwGNNMJt4mE&t=19m52

node-dronestream's People

Contributors

bkw avatar karlwestin avatar eschnou avatar

Watchers

James Cloos avatar Michael Petö avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.