Closed BuyMyMojo closed 2 years ago
Yeah, I think this exceeds the scope of this project by far. Everyone can join up and make a dedicated application for this specific use case, I'm pretty sure it won't be me.
Some thoughts. If I had to do it, I would consider using it via the help of GStreamer. It offers various camera sources methods for different platforms and allows capturing in JPEG format already if the camera supports it. Since the Teleport protocol is quite simple one would only have to inject a little header before each frame.
The media pipeline could look a bit like this:
v4l2src ! image/jpeg,width=1920,height=1080,framerate=30/1 ! appsink
appsrc ! tcpserversink
Here the application would hook into the appsink
, gets the jpeg buffer and adds the required header and pushes the new buffer into the second pipeline's appsrc
. This will end up in the tcpserversink
which would act as an access point for the OBS source plugin.
You'd still need to cover the multicast announcement so the service will appear in the OBS source list.
Then again, just use GStreamer RTSP server library to provide an RTSP feed from the camera and use OBS's media source..
This could be useful for simple sending of video without needing to have OBS running on the source hardware. There is an issue of Windows, Linux and Mac using different frameworks for their usb devices so it might require separate versions for each which isn't that nice.
Linux video lib: https://github.com/blackjack/webcam Windows API Example: https://github.com/SaturnsVoid/Windows-API-Capture-Webcam Weird cross platform lib that uses electron: https://github.com/vee2xx/camtron
Outside of the last cross platform one I don't know of any libs that would work on mac