-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newbie question. how can i get videostream off the bebop #14
Comments
I think you will find this issue helpful #9 |
Hello Johan, I tried the code as you told me to but i am getting the following error. [image: Inline image 1] On Thu, Dec 24, 2015 at 7:27 PM, Johan Olsson [email protected]
|
@uaedronemaster Think your image failed to upload or something. |
I havent installed emscripton thou, its not mandatory right! plus is there On Thu, Dec 31, 2015 at 8:27 PM, Johan Olsson [email protected]
|
No it shouldn't be. But I meant that I can't see the image you posted of your error in your previous comment. |
well do u see it now? On Thu, Dec 31, 2015 at 8:57 PM, Adham Al-Khaja [email protected]
|
Does look like you haven't installed node-bebop. did you run |
yes it is installed globally On Thu, Dec 31, 2015 at 9:36 PM, Johan Olsson [email protected]
|
i installed it locally now it says 'Broadway-masterPlayerPlayer' module is On Thu, Dec 31, 2015 at 9:37 PM, Adham Al-Khaja [email protected]
|
Install it locally and try again. You shouldn't install it globally |
Yes i did ... i got a new error now On Thu, Dec 31, 2015 at 9:42 PM, Adham Al-Khaja [email protected]
|
I posted the new error picture On Thu, Dec 31, 2015 at 9:44 PM, Adham Al-Khaja [email protected]
|
Maybe it's easier if you just post your code and I can have a look at it. |
this is the code: var bebop = require('node-bebop'); var player = new Player({ document.body.appendChild(player.canvas); var toUint8Array = function (parStr) {
}; stream.on('data', function (data) { On Fri, Jan 1, 2016 at 6:24 PM, Johan Olsson [email protected]
|
Doesn't seem to be anything wrong with this assuming the paths are correct and you are creating an Electron app or similar. Is this the case? |
no i am not making and electron app.. what is that and am i suppose to make On Sun, Jan 3, 2016 at 9:40 PM, Johan Olsson [email protected]
|
I downloaded electron, but what should i do exactly? i am dragging and On Sat, Jan 2, 2016 at 2:34 PM, Adham Al-Khaja [email protected] wrote:
|
@uaedronemaster I would not worry about Electron at this point, that was I think just a general question. |
Alright, in that case you have to divide the code to backend nodejs and client js with Broadway. Something like this should work assuming you are using browserify for the client. Node part: var io = require('socket.io')(80);
var bebop = require('node-bebop');
var Drone = bebop.createClient();
var stream = Drone.getVideoStream();
var toUint8Array = function (parStr) {
var raw = atob(parStr);
var array = new Uint8Array(new ArrayBuffer(raw.length));
Array.prototype.forEach.call(raw, function (data, index) {
array[index] = raw.charCodeAt(index);
})
return array;
};
io.on('connection', function (socket) {
stream.on('data', function (data) {
socket.emit('data', {
base64: toUint8Array(data.toString('base64'))
});
});
}); Client part: var Player = require('./Broadway-master/Player/Player');
var player = new Player({
useWorker: true,
workerFile: './NodejsConsoleApp3/Broadway-master/Player/Decoder.js'
});
document.body.appendChild(player.canvas);
var socket = io('http://localhost/');
socket.on('data', function (data) {
player.decode(data.base64);
}); |
@uaedronemaster I created a project for you to clone if you want an example on how to get it running. |
Everything works well now including gulp watch... but the only problem is On Fri, Jan 8, 2016 at 2:19 PM, Adham Al-Khaja [email protected] wrote:
|
What bufferutil and utf8 can't be installed? Could you show me your installation error? |
this is the error i get : Microsoft Windows Version 10.0.10586 2015 Microsoft Corporation. All rights reserved. [21:33:12] Using gulpfile ~\Desktop\Robotics\Parrot On Mon, Jan 11, 2016 at 6:53 PM, Johan Olsson [email protected]
|
I assume you have tried |
what do you use? mac? linux? On Tue, Jan 12, 2016 at 9:47 PM, Johan Olsson [email protected]
|
I use mac. But did you try to install the missing dependencies? |
Yes I did , but it fails at node-gyp rebuild On Tuesday, January 12, 2016, Johan Olsson [email protected] wrote:
|
I really can't help you much with windows related issues. But the repository I linked you work so you should be able to google the more general errors you get |
little late to this, but the node-gyp issues are likely because you are using a newer version of node.... I find that using nvm-windows on a windows box allows me to install and change node version (and npm) which then fixes most these node-gyp problems. Newer (v4 and 5) nodes have issues with nodegyp stuff that was compiled with the old 0. vaersions... When node and IO merged. |
Closing due to age of issue, and that the original point got a little lost. :) Please open new issues as needed, thanks everyone! |
Hello,
i wanted to know how can i get live video stream on an http local host?
and any references i can learn from?
thanks
The text was updated successfully, but these errors were encountered: