Comments (16)
I just tried your code with a fresh install of the module (from npm) and it works great for me. I get hundreds of pngs. It disconnected once, but the reconnect code worked fine so the stream was interrupted for only 1~2 seconds.
So, some ideas on where the issue could come from:
- do you have the latest module version ? (0.1.0)
- what about your version of node ?
- are you sure nothing else is also connecting to the drone (e.g. your ipad/android navigation software)
- do you see error messages about disconnections?
from node-ar-drone.
Thanks for checking it out, I'll give that a shot when I get home this evening.
I didn't get any errors, i'm using the ar-drone module from the master branch via npm link into my project.
Now that you ask, i'm not 100% sure what version of node i'm no now, I installed via apt-get a few days ago.
I don't think anything else is connecting, but will double check that my phone didn't try to auto connect on me.
I'm thinking it's something to do with ffmpeg and will dive in more from that side.
from node-ar-drone.
Good point about ffmpeg. My ffmpeg version is 0.10.4, as for node I'm still in 0.8 (0.8.8).
from node-ar-drone.
2 people including myself had this same problem at the Nodecopter Southampton event. Both using linux, node v0.8.22 & v0.10.15.
Also compiled ffmpeg to most recent:
ffmpeg version git-2013-08-10-b37ff48
built on Aug 10 2013 13:34:17 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
configuration: --prefix=/home/bencevans/ffmpeg_build --extra-cflags=-I/home/bencevans/ffmpeg_build/include --extra-ldflags=-L/home/bencevans/ffmpeg_build/lib --bindir=/home/bencevans/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 52. 41.100 / 52. 41.100
libavcodec 55. 24.100 / 55. 24.100
libavformat 55. 13.102 / 55. 13.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
from node-ar-drone.
We saw this too back in Florida. Most likely cause was wifi interference. Try to find an empty space for your drone (no other drones near) and try again. If it works, it's WiFi interference. A problem where we haven't found a good solution for so far, despite having more space.
from node-ar-drone.
I had a bit of a play and found that the .getVideoStream()
would work well when piped through the lib/video/PaVEParser.js
parser would emit a working h264 stream that I could open with VLC or stream to the browser (only firefox seems to support h264 at the moment).
Thus I'm not ever so sure it is the WiFi as the PNG stream, at least I believe is a re-encoded stream derived from the .getVideoStream
Parrot/h264 stream. I think the problem is somewhere in the decoding and re-encoding of the PNG frames.
from node-ar-drone.
The decoding is indeed done by forking a ffmpeg process and I wonder if ffmpeg versions, or machine performance, could have an impact. The ideal would be to drop this ffmpeg hack altogether and find another way to decode the images. I wonder if some code of @bkw node-dronestream could be used for this.
from node-ar-drone.
Sorry for picking up this so late. The decoder of dronestream could certainly be run on the server, but it would only deliver YUV component bitmaps. You'd still have to convert these to rgb pngs somehow. That's why dronestream runs client side, since we can do all of that with a WebGL canvas in a very efficient way. Also we only have to transport the bare minimum to the browser.
Whenever I need pngs from the video, I use canvas.toDataURL() on the dronestream canvas and send the resulting uuenocded png back to the server.
from node-ar-drone.
I can recommend LearnBoosts cairo backed server-side canvas module: https://github.com/LearnBoost/node-canvas
from node-ar-drone.
@bencevans last I time I checked, node-canvas did not support WebGL contexts.
from node-ar-drone.
Changing ffmpeg
to avconv
in PngEncoder.js
solved the problem for me.
ffmpeg version
$ ffmpeg -version
ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.6-4:0.8.6-0ubuntu0.12.04.1
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0
avconv version
$ avconv -version
avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
avconv 0.8.6-4:0.8.6-0ubuntu0.12.04.1
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0
from node-ar-drone.
Nice find! We should make this configurable and also try to find and use
avconv by default, right?
Am 21.10.2013 12:27 schrieb "Jan Pieper" [email protected]:
Changing ffmpeg to avconv in PngEncoder.js solved the problem for me.
ffmpeg version$ ffmpeg -version
ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.6-4:0.8.6-0ubuntu0.12.04.1
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0avconv version
$ avconv -version
avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
avconv 0.8.6-4:0.8.6-0ubuntu0.12.04.1
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0—
Reply to this email directly or view it on GitHubhttps://github.com//issues/60#issuecomment-26706424
.
from node-ar-drone.
I've modified PngEncoder.js
to allow the user to change the video converter path via an client option:
https://github.com/janpieper/node-ar-drone/tree/allow-different-converter
This solution is quite generic because it allows the user to specify any video converter, regardless if it is supported or not. I don't know if this is a good way to go. On the other hand, changing the converter path is required for users that does not have ffmpeg
and/or avconv
available in their PATH
.
from node-ar-drone.
I've modified PngEncoder.js to allow the user to change the video converter path via an client option:
https://github.com/janpieper/node-ar-drone/tree/allow-different-converter
I'm 👍 on making the converter configurable. That being said, your patch seems to assume that all converters take the same arguments? IMO the converter config needs to be a cmd template, or a callback function that returns the cmd. You're also assuming the converter has the same output, but that may be reasonable assumption for now.
from node-ar-drone.
Yes, my implementation requires the use of ffmpeg
or avconv
. No other video converters are supported unless they use the same arguments but thats quite unlikely. There is no real difference to the actual implementation in master - master requires the use of ffmpeg
:-) Now you are able to configure the path and the converter, but you are (still) limited to ffmpeg
and avconv
.
But yeah, we should find a more generic way to change and configure the converter to support all converters without having to change this module to support the converter.
from node-ar-drone.
What about using node-which
to figure out if they have avconv or ffmpeg and use the one they have? If they have both just use avconv since ffmpeg is deprecated
from node-ar-drone.
Related Issues (20)
- Vision Detect..TypeError: Cannot read property 'nbDetected' of undefined HOT 8
- pngstream stops sending new images after sometime HOT 3
- How do I access just the gps.latitude property? HOT 5
- How can i get the only navdata - magneto data ?
- How to add delay to navdata read, and make real time graph? HOT 4
- is bebop 2 supported
- Can I disable the ultrasonic sensor? HOT 1
- use gps to make a path HOT 1
- drones to fly using the google maps
- Multiple clients - multiple drones communicate through nodejs server HOT 2
- Troubleshooting 'undefined' error HOT 1
- TcpVideoStream timeout HOT 2
- when trying to npm install ar-drone
- pngStream only sends one image to browser
- Error: Cannot find module 'simple-debug' HOT 1
- Error: Ffmpeg exited with error code: null
- Cannot perform a counter clockwise rotation
- IDE
- External sensors HOT 1
- Feeding PngStream to openCV
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ar-drone.