Hi @tony-white
Thank you very much for your answer !
Some ideas playing with the BR2 low light USB camera :
You can also access the mjpeg or YUV stream as you mention
My apologies, I completely missed the point. You’re right, the BR USB Low light camera does indeed offer a YUV2 stream.
ffmpeg.exe -list_options true -f dshow -i "video=USB Camera"
display the best YUV2 resolution as :
pixel_format=yuyv422 min s=640x480 fps=15 max s=640x480 fps=30
If I’m not mistaken, YUV2 is a “RAW” image feed( Y′UV - Wikipedia)
While 640x480 isn’t a high-resolution format, it’s still quite manageable. For live feeds on small screens, it’s actually ideal—after all, TV hasn’t always been 4K or HDTV.
The bandwidth required for a YUV2 stream at 640x480 resolution and 30 fps is approximately 147.456 Mbps. Since the tether can only support around 30 to 80 Mbps, sending the YUV2 feed directly to the surface isn’t feasible.
A possible solution would be to capture the feed in the YUV2 format (640x480), then create a dual virtual video feed using a tool like v4l2loopback. One stream could be encoded by the Raspberry Pi as 640x480 30 fps H.264, while the other remains in the YUV2 format for easy screenshot extraction and saving in the PPM format ( Portable pixmap — Wikipédia).
Once this setup is complete, I will be able to receive a 640x480 30 fps H.264 video feed while simultaneously capturing PPM screenshots from the YUV stream by sending a capture command (via SSH or Telnet).
You can also access the mjpeg or YUV stream as you mention, but this is not likely to provide different results in terms of quality…
An interesting test using the BR2 low light USB camera with poor lighting:
I find that the YUV2 frame offers sharper edges, fewer fuzzy areas, and less noise. This is expected, as the H.264 stream is essentially the YUV2 stream processed and compressed by the camera’s internal hardware encoder. For capturing still images, the YUV2 frame seems ideal as it provides a lossless stream.
Some thoughts about the dual output camera :
Sharing the camera you’re referring to would be helpful! It may be possible to capture the HDMI stream with a USB capture card, but I don’t expect this to be that high-resolution…
ELP 4K USB Webcam IMX415 Color CMOS Sensor 3840X2160 30fps H.265 H.264 HDMI USB C Camera With No Distortion Lens [ELP-USB4KCAM01H-H120] - $97.34 : ELP USB Webcam
Definitely not a low-light camera, but it offers dual output!
One possible setup would be to use the HDMI stream through a USB capture card to output a 640x480 30 fps H.264 stream via the Raspberry then the tether. Meanwhile, the USB stream could be used for local recording by the Raspberry, either capturing 4K H.264 video or taking 1920x1080 YUV2 snapshots.
With this configuration, if I’m not mistaken, you get the best of both worlds while offloading all encoding tasks from the Raspberry Pi.
Other things :
Blue Robotics is getting quite close to launching an upgrade kit for the BlueROV2 that provides a significantly better, 4K camera, with amazing low light performance. Stay tuned!
That’s fantastic ! Do you know if the 1920x1080 H264 stream could be better than the existing low light USB camera ?