rtsp-relay
rtsp-relay copied to clipboard
Snapshot?
Hello, I just want to ask if this library supports grabbing snapshot from IP Cameras whenever possible? Thank you. :)
Hi, apologies for the delayed response. At the moment this library doesn't support that, because on slow networks we would need to merge several incomplete frames to get a reliable image.
In my situation, I found that the IP cameras had an HTTP endpoint that returns a JPG image, which is a much simpler method.
Ohhh, it's okay. Thank you.
Is taking a snapshot from live stream possible ? i tried with html2canvas but could just take snapshot of a text and not from live video https://stackoverflow.com/questions/71773950/capture-snapshot-of-inside-div-doesnt-show-everything
I don't recommend this - read https://github.com/k-yle/rtsp-relay/issues/97#issuecomment-925337675 first - but you can take a screenshot of the HTML canvas.
My ip cameras doesnt have http endpoint
Something like this would work:
loadPlayer({
url: 'ws://localhost:5000/api/stream',
canvas: canvasRef.current,
+ preserveDrawingBuffer: true
});
+ const myScreenshot = document.querySelector('canvas').toDataURL();