Closed genio closed 6 years ago
@genio you're right; it's pretty verbose. I was trying to get as much debug data as I could at the time so I didn't mind it.
What exactly isn't working when you systemd-ize it? Is the client socket not picking up the data? Does it work without -loglevel panic
? I can't imagine log levels changing the way that the app behaves with the websockets.
The library as-is is probably not really ready to be turned into a service without some work. You can feel free to fork and/or PR and I'd be happy to take it. It could use a verbosity option, should be fairly simple to add in via https://github.com/substack/minimist
FWIW, this was a side project that I haven't really touched for a few months (as you can tell); I'm not likely to jump back onto it for a little while. If I do I'm probably going to look at WebRTC too at the recommendation of a few others.
Hi, I'm using this library to stream video from an ONVIF camera to jsmpeg. I have the similar problem that if adding -loglevel panic
to ffmpeg option, it will give me below error when jsmpeg page is launched in browser:
buffer.js:784
throw TypeError('value is out of bounds');
^
TypeError: value is out of bounds
at TypeError (<anonymous>)
at checkInt (buffer.js:784:11)
at Buffer.writeUInt16BE (buffer.js:819:5)
at VideoStream.onSocketConnect (/home/brix/cdif-onvif-manager/lib/rtsp-stream/videoStream.js:112:18)
at WebSocketServer.<anonymous> (/home/brix/cdif-onvif-manager/lib/rtsp-stream/videoStream.js:88:19)
at WebSocketServer.EventEmitter.emit (events.js:95:17)
at /home/brix/cdif-onvif-manager/node_modules/ws/lib/WebSocketServer.js:88:14
at completeHybiUpgrade2 (/home/brix/cdif-onvif-manager/node_modules/ws/lib/WebSocketServer.js:271:5)
at completeHybiUpgrade1 (/home/brix/cdif-onvif-manager/node_modules/ws/lib/WebSocketServer.js:296:13)
at WebSocketServer.handleHybiUpgrade (/home/brix/cdif-onvif-manager/node_modules/ws/lib/WebSocketServer.js:324:3)
Hi, I've experiencing the same issue, did someone found a fix for that ?
Unfortunately I haven't seen anything that would help. :disappointed: Seems like the videoStream is trying to write a value to the Buffer that is invalid. But without knowing what that value is, I'm afraid I can't do much.
You could try to add a sanity check to the Buffer write, and discard values that are out of bounds. But unfortunately beyond that I'm not sure what will help. Sorry!
Stale issue, closing.
Firstly, I love how easy you have made it to stream an RTSP stream using node. I am getting a similar error to the other fellas - works fine when loglevel = info, but dropping it by a single log level (logLevel = error) the stream stops working without any errors stating why. The only output I get from this is within the browser:
[.WebGL-000002028C8DFBB0]RENDER WARNING: texture bound to texture unit 2 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
Can you suggest anything?
FFMPEG dumps lots and lots of stuff to stderr. Adding -loglevel panic into the mix quietens that down quite a bit, but also causes node-rtsp-stream to stop functioning as it should when run as a service via systemd.
Application
systemd config file
If I'm being dumb, please don't hesitate to point that out as I'm dumb quite often. I just don't like filling up /var/log/messages with tons of
entries.
Thanks, Chase