Raspberry Pi Camera Module 3 on BlueOS

I want to use the Raspberry Pi Camera Module 3 on BlueOS.

I would like to expand the visible range using HDR (STARVIS2).
I’ve tried various things, but I couldn’t make it work.
How can I achieve this?

Hi @Itaru, welcome!

I’m the main maintainer of our stream software (Mavlink Camera Manager), and up to this date, Pi v3 cameras are not yet supported by it, unfortunately.

It is on our plans to add support for it, but there are other parts of the software that need to be handled first.

Until then, it should be possible to achieve it by developing a BlueOS extension, which is a docker container that can be installed on BlueOS to extend its functionality.

If you feel comfortable configuring a simple docker with a simple bash script as a service, I can guide you on how to use GStreamer with libcamera.

The idea would be a docker with GStreamer and libcamera installed that runs a bash script when it starts. This bash script would simply contain a pipeline using the libcamerasrc element, sending the stream to your QGS computer’s IP address, and (optionally) an HTTP post request to Mavlink Camera Manager to create a redirect Mavlink Camera so your GCS can talk to it.

Let me know if you want guidance on that,
Thanks

3 Likes

Hi João,

Thanks for the replies.

I tried using libcamera on BlueOS’s red-pill, but I encountered issues like freezing and it didn’t work smoothly.
It worked fine on regular Raspbian, so I’ll give it a try with GStreamer.

Until BlueOS supports v3 camera, I’ll be using two Raspberry Pi.
Looking forward to it !

I believe the IMX708 is a good choice, but if you know of a better camera that’s easier to connect, please let me know.

I tried the IMX291 below, but it kept flickering and didn’t work well.
It seemed to struggle with brightness in HDR mode.

Hy, i am in the same situation, trying to make a module 3 camera work with blueos…

https://ro.farnell.com/raspberry-pi/sc0872/rpi-camera-mod-3-standard-lens/dp/4132318

I have tried to install gst-launch-1.0 and run the pipeline command in the terminal from the webpage at 192.168.2.2, and it runs, but i don’t get any video on the windows side. I would really need a guide from scratch, for begginers, on how to do this.

These are all the commands i have tried so far.
Also, following this video, i managed to run the commands with no error, but i still got no video showing up in cmd, or VLC…

gst-launch-1.0 -v libcamerasrc ! video/x-raw, format=RGBx, width=1920, height=1080, framerate=30/1 ! timeoverlay ! videoconvert ! video/x-raw,format=I420 ! openh264enc ! rtph264pay config-interval=-1 ! udpsink host=192.168.2.1 port=5600 sync=false async=true
gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
gst-launch-1.0 tcpclientsrc host=$DEVICE_IP port=5600 ! \ multipartdemux ! autovideosink

gst-launch-1.0  ! h264parse ! queue ! rtph264pay config-interval=10 pt=96 ! multiudpsink clients=192.168.2.1:5600,192.168.2.1:2000

gst-launch-1.0 libcamerasrc name=cs src::stream-role=view-finder src_0::stream-role=video-recording \ cs.src ! queue ! video/x-raw,width=640,height=480 ! videoconvert ! autovideosink \cs.src_0 ! queue ! video/x-raw,width=800,height=600 ! videoconvert ! \ jpegenc ! multipartmux ! tcpserversink host=0.0.0.0 port=5600



gst-launch-1.0 tcpclientsrc host=$DEVICE_IP port=5600 ! \multipartdemux ! jpegdec ! autovideosink

1536x864

apt install gstreamer1.0-x gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

sudo nano /boot/firmware/config.txt
sudo screen -ls
sudo screen -r video

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl gstreamer1.0-plugins-base-apps libcamera-dev gstreamer1.0-libcamera
gst-launch-1.0 -v libcamerasrc ! video/x-raw, format=RGBx, width=1920, height=1080, framerate=30/1 ! timeoverlay ! videoconvert ! video/x-raw,format=I420 ! x264enc ! rtph264pay config-interval=-1 ! udpsink host=192.168.2.1 port=5600 sync=false async=true


Have a nice day!