Home        Store        Docs        Blog

Help: BlueROV2 Camera Stream


I am trying to stream the video from the BlueROV2 into Matlab. Is there an ip the camera stream is fed into that I can use, or is there a way to easily stream it to an ip? I’m not sure if I can tap into the stream that’s in qgroundcontrol. I recently also found out about gstreamer. I’m not sure if I can use that to stream the video into Matlab. I’ve been looking into PsychToolbox 3 add-on in Matlab to use with gstreamer, but a simple IP stream would be much more simple it seems. I’ve also been looking into the companion software, and it looks like there should be a stream going somewhere, but every URL I’ve tried hasn’t worked. I’ve been looking at this post on the forums but can’t seem to figure it out. I got it working in VLC media player, and I’m currently attempting to integrate my Matlab scripts into that. Basically, I’m not sure which direction to take this, or which would be easiest. If anyone has any advice or tips, I would really appreciate it. Thank you!

Hello Chris,

Currently our video is implemented by a simple UDP stream of a raw (as in not-encapsulated) H264 stream. This h264 stream is sent to the topside computer at IP and port 5600.
Is this what you mean by “stream it to an ip”? I believe that relies on loading a RTSP stream, which we currently do not provide.

Are you on Linux?

After some messing around on Ubuntu 18.04 I seem to be able to use the v4l2loopback driver to create a fake video device as described here:


In my case I called my new device /dev/video8 by passing the video_nr=N argument when I loaded the module:

sudo insmod ./v4l2loopback.ko exclusive_caps=1 video_nr=8

Then I take my usual gstreamer receiver that listens for UDP packets and replace the last element with v4l2sink pointing at the new fake video device:

gst-launch-1.0 udpsrc port=5600 ! "application/x-rtp, payload=96" ! rtph264depay ! vaapidecodebin ! videoconvert ! video/x-raw ! v4l2sink device=/dev/video8

With that gstreamer pipeline running, the H.264 stream coming in over UDP is decoded to raw video and is then available to other programs by opening the /dev/video8 video device.

If Matlab can use a local webcam, this might work.

If you’re on Windows I don’t know how to do it.

I am using a Blue Robotics USB cam streaming from a Raspberry Pi as the UDP video source on port 5600.

EDIT: the latency is pretty bad using vaapidecodebin in my pipeline.

It’s much better using avdec_h264, but requires a lot more CPU for the reciever/translator.

I don’t know enough about gstreamer to optimize the pipeline for this setup. It might be you don’t need to process things as much in between the udpsrc and the v4l2sink.

Thank you for the reply. Currently the laptop we are using is a pretty beefy gaming laptop running windows 10, but I should be able to install Ubuntu on it as long as my employer doesn’t care. I’m going to give this a try tomorrow or some other time this week. Thank you!

Hi Daniel,

If you need some help to understand how to create gstreamer pipelines and debug it, you should check this post that explains a workflow that may help you.

1 Like