deepch / RTSPtoWSMP4f

RTSP Stream to WebBrowser MSE over WebSocket based MP4f segments
229 stars 64 forks source link

How to draw rectangle on go stream? #22

Closed yeshivsher closed 2 years ago

yeshivsher commented 3 years ago

I'm trying to draw a rectangle on the []uint8 stream. the goal is when I'm using the RTSPtoWSMP4f I can draw a bounding box prediction of ML models on the video in the client.

in short: []uint8 + rectangle => videoTagHtml

vdalex25 commented 2 years ago

[] uint8 is the bytes of frames of the stream encoded in h264 If you want to add something to the frame, then there are two options: 1.on the server side, you must first decode the frame, add elements to it and encode back. 2.client side overlay the canvas on top of the video and draw on it.