GithubHelp home page GithubHelp logo

mjpeg-camera's People

Contributors

andycb avatar mmaelzer avatar savikko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mjpeg-camera's Issues

NPM Install locally?

Hi, I just wondering, why I cant install this magnificent plugin locally?
but have to do it globally. any clues to do it manually?

lodash Prototype Pollution Vulnerability

The Lodash library has been found to be vulnerable to Prototype Pollution attack.
npm advises an update to the latest library version.

Do you think it will require a lot of effort?

I tried running 'npm audit fix' but apparently the patch causes breaking changes in mjpeg-camera code.

Linux won't work

I use cs command in zsh

cs http://140.120.200.61/mjpg/video.mjpg?camera=1 -n "Spring Grove" -p 12345

Result says

: No such file or directory

Please tell me how to fix it, thanks!

"Stand-alone Server Example" error camera.unpipe is not a function

[root@cctv]# cs -l http://10.0.0.200:8008 -n "cam"
=== cam camera server listening on 8080 ===

after close browser:

/usr/lib/node_modules/mjpeg-camera/cs:50
      camera.unpipe(ws);
             ^

TypeError: camera.unpipe is not a function
    at ServerResponse.<anonymous> (/usr/lib/node_modules/mjpeg-camera/cs:50:14)
    at emitNone (events.js:67:13)
    at ServerResponse.emit (events.js:166:7)
    at Socket.onServerResponseClose (_http_server.js:131:44)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at TCP._onclose (net.js:469:12)

[root@cctv]# node -v v4.1.1

not capture mjpeg

hiii,
thanks, good work.
i try mjpeg-camera in windows, it work well.

but not work in linux.

i use node v10.24.1 may be need upper version??

best regards

camera.getScreenshot example null/timeout issue

The camera.getScreenshot example code doesn't seem to be working correctly. It correctly saves a frame into the camera-screenshot.jpg file, but it "hangs" until the following error is thrown:

TypeError: Cannot call method 'abort' of null
    at Camera.stop (/mjpeg-camera-example/node_modules/mjpeg-camera/mjpeg-camera.js:97:19)
    at Camera.<anonymous> (/mjpeg-camera-example/node_modules/mjpeg-camera/mjpeg-camera.js:119:10)
    at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

Since the Camera.prototype.stopmethod is setting the connection to null after aborting it, it seems to me that two consecutive stop calls would cause the error, most likely caused by the camera.getScreenshot call followed by the keepalive timer call.

My use case allows me to "fix" the stop call by checking if the connection is null before aborting, but this doesn't seem to be the proper fix (or at least not enough to fix it), since the same example code will hang forever (i.e., no error is thrown but the program never quits).

Thank you for mjpeg-camera by the way, I was looking for a module capable of grabbing a single MJPEG frame and this was exactly it.

possible corruption memory

I have an error importing this module and pg using Node 10.x
an example is:

const pg_1 = require("pg");
var MjpegCamera = require('mjpeg-camera');

async function getNow() {
let pg = new pg_1.Pool({
user: 'userDB',
database: 'DB',
password: 'passDB',
port: 5432,
host: 'localhost',
max: 15,
idleTimeoutMillis: 3000,
});
let strsql = "SELECT NOW() as now;";
console.log('query:' + strsql);
console.log(pg);
return await pg.query(strsql);
}

getNow();

getScreenshot problem

using getScreenshot fuction, i have a problem when the camera breaks the connection. In this case, the getScreenshot fuction never gives a callback or error.

thanks

Display on a Reactjs app

Hi,

My goal is to display in a Reactjs web app the images that my camera is streaming as MJPEG (10 per second)

Also I want to take a picture everytime I press a button.

I have the IP, username, password and url where my camera is streaming.

Am I supposed to run this library on Express backend?

I have tried it but I'm not seeing that the file is writed on /frames or /motion

Sometimes when I try to snapshot I get the next error:

videostream.on('data', this.onFrame.bind(this));
^
TypeError: Cannot read properties of undefined (reading 'on')
at Camera.start (C:\Users\100032595\Documents\GitHub\welcomi_localweb\welcomi_localweb\backend\node_modules\mjpeg->camera\mjpeg-camera.js:50:15)

Is a Hikvision camera and I followed the next doc to get the MJPEG stream:
HIKVISION

keepalive called after connection.abort() resulting in error.

When camera.stop() is called and the connection is aborted then keepalive is called by this line:
this.connection.on('error', this.keepalive.bind(this));
and so when stop() is called again in keepalive() it tries to abort the connection that has already been aborted and set to null
resulting in error: TypeError: Cannot read properties of null (reading 'abort')

Using Node v16.14.2

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.