Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Process RTSP with Node.js for taking an image snapshot

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?

like image 768
ghostbar Avatar asked Oct 10 '22 09:10

ghostbar


1 Answers

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.

like image 92
ghostbar Avatar answered Oct 13 '22 11:10

ghostbar