Process RTSP with Node.js for taking an image snapshot

时光怂恿深爱的人放手 提交于 2019-12-07 04:16:19

问题


I have a RTSP that I would love to make Node.JS understand. I found a way to do it using Java taking a capture from a webcam but I would love to just use Node.js on this task and get it from a video RTSP'd.

My intention is to use setInterval, grab the stream, convert it to base64 and stream it through Socket.IO to a client so they can see it as a <img> tag on their browser. Much of this will be taken from the guy who make it with a webcam but I only have a RTSP available as video-source.

So, does anyone knows if there's a way to do this?


回答1:


I really found the answer months ago but forgot I asked here.

My code is at https://github.com/ghostbar/RTSP-Streaming.js. It reads it from an RTSP stream and converts it to JPEG, then to base64 in order to pass it via Socket.IO to the client.




回答2:


Here's some code with minimal dependencies which can read data from a Webcam and upload it to as an image on the server using Node: https://github.com/josher19/node-jpegcam

You could have it send the data to the client instead of saving it as an image on the server.

->> Josh <<-



来源:https://stackoverflow.com/questions/8289421/process-rtsp-with-node-js-for-taking-an-image-snapshot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!