For anyone curious, this line of comment shows how it's done:
> startCameraAndStream opens the webcam with GoCV, sends raw frames to FFmpeg (via stdin), reads IVF from FFmpeg (via stdout), and writes them into the WebRTC video track.
RezaSi · 12h ago
Neat demo — cool to see GoCV + Pion working together over WebRTC. Curious if you’ve tried running object detection or overlays before sending the stream?
Sean-Der · 11h ago
I did! I tried integrating with a couple different of the examples on here [0]
The good detection ones required users to download something first, so I was worried the friction would make people less likely to use them. The one I almost went with was hand-gestures, but it wasn't as reliable.
I haven't used opencv that much. I see people talk about in Pion discord (and examples like this) and gets me into. I think someone more proficient could build a more compelling demo pretty quickly :)
> startCameraAndStream opens the webcam with GoCV, sends raw frames to FFmpeg (via stdin), reads IVF from FFmpeg (via stdout), and writes them into the WebRTC video track.
The good detection ones required users to download something first, so I was worried the friction would make people less likely to use them. The one I almost went with was hand-gestures, but it wasn't as reliable.
I haven't used opencv that much. I see people talk about in Pion discord (and examples like this) and gets me into. I think someone more proficient could build a more compelling demo pretty quickly :)
[0] https://gocv.io/writing-code/more-examples/
It's really cool how you can have a heavy server doing all this cool computer vision stuff, but then a simple client that just does WebRTC.
If you adjusted the example you can quickly be sending OBS or ffmpeg in. Then that gets really cool/powerful