kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

No image and warnings #30

Closed msj-fr closed 5 years ago

msj-fr commented 5 years ago

Hello,

Firs tof all thanks for this code, its exactly what I was looking for.

One remark, you code is no longer aligned with jsmpeg library. I had to find older versions of jsmpeg lib for the code to work .... The minified version does not suppor sending a websocket as an argument.

I am trying to use your code to display a FOSCAM IP webcam I have at home though a rapsberry pi. I have a nodejs express that is getting the url I am calling and starting the stream.

I call node-rtsp-stream on port 3333 my videostream is http://login:password@ip:554/videoMain my port is 333

Then I create using localtunnnel a tunnel to one of my hosted servers this maps the local port 3333 to the url given by localtunnel

This all goes fine and generates a html page with the relative infos .... Result is this :

Your Browser does not supprt Canvas.

I get a blank page with this in the console :

86[.WebGL-000002121E2B6A00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering. 85[.WebGL-000002121E2B6A00]RENDER WARNING: texture bound to texture unit 1 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering. 85[.WebGL-000002121E2B6A00]RENDER WARNING: texture bound to texture unit 2 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering. 1:1 WebGL: too many errors, no more errors will be reported to the console for this context. [Violation] 'setTimeout' handler took 114ms [Violation] 'message' handler took 155ms [Violation] 'setTimeout' handler took 58ms [Violation] 'message' handler took 727ms [Violation] 'message' handler took 156ms

kyriesent commented 5 years ago

@msj-fr thanks for the info. I haven't actually tried to use this with a newer version of jsmpeg. Is it only the minified version that doesn't work?

It might be from your error message that "Your Browser does not supprt Canvas" Have you tried using a modern browser? Most of them should have Canvas support.

kyriesent commented 5 years ago

I've updated the codebase to work with the latest jsmpeg. Hope this helps! Closing.

msj-fr commented 5 years ago

Hello,

Thank you for replying, I have tried with both minified and updated version of the library. I get the same errors. I am testing using latest version of chrome.

Here is what I am trying to achieve :

IP Camera (onvif) => Raspberry Pi <= localrunnel <= browser

I get the expected web page in the browser but I seem te get garbage frames.

I have gotten it to work with other solutions, but there is always a delay (between 2 to 10 seconds). I was hoping to reach below 1s.

Thanks Jérôme

Le mer. 15 mai 2019 à 03:41, David Jsa notifications@github.com a écrit :

@msj-fr https://github.com/msj-fr thanks for the info. I haven't actually tried to use this with a newer version of jsmpeg. Is it only the minified version that doesn't work?

It might be from your error message that "Your Browser does not supprt Canvas" Have you tried using a modern browser? Most of them should have Canvas support.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kyriesent/node-rtsp-stream/issues/30?email_source=notifications&email_token=ALYFJU464QXYDNRYFHFCKH3PVNS3JA5CNFSM4HDZ6ANKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNIKVA#issuecomment-492471636, or mute the thread https://github.com/notifications/unsubscribe-auth/ALYFJUZBBE3SJ4XLR3FAB4LPVNS3JANCNFSM4HDZ6ANA .

kyriesent commented 5 years ago

Are you using version 0.0.8 of node-rtsp-stream? Anything before that is going to fail with the new JSMPEG.

I have never been able to get <1s delay with this solution. I'm not sure what the bottleneck is and haven't invested serious time into figuring it out. It could be FFMPEG, it could be Node, it could be ws, it could be decoding video in JS browser side. Not sure unfortunately.

I was able to get lower delays with this nginx module: https://github.com/arut/nginx-rtmp-module I used an MPEG-Dash player with it. It still wasn't instant, but it was faster than this method.