Camera connection with Raspberry pi 4B

Hi.

Qgroundcontrol version: 4.2.4
Pixhawk 2.4.8
Raspberry pi 4 Model B
Elp 170 USB Camera

I connected USB Camera to Raspberry pi. Pixhawk connected with USB to Raspberry pi. Pi connected topside computer(Windows) with ethernet.

The problem is, i cant see any video in qgroundcontrol. When i connect the camera to my Windows, i can see clear video without any problem. Pi can see the camera but i cant get any video from it.
I cant get any video but, i can get some weird white dot running around on black screen.

I add source from the video menu: udp://192.168.2.1:5600 and H264.

Pleaase find attached files. Any help would be grateful…




image-2

Hello @enseri, it seems to be just a configuration issue:

  1. Remove the “Fake” stream, that’s the “weird white dot running around on black screen”, which is a test video being generated (and encoded) in the raspberry pi. This is particularly useful to test the vehicle setup when lacking cameras, but it uses a lot of CPU power, so if you need to use it for some test, please prefer to use 240p instead of 1080p, and delete it after use, otherwise, the system can become less responsive.
  2. Create your H264 1080p stream from your “HD USB” Camera (it’s the first column in your second image) with the same endpoint udp://192.168.2.1:5600.

If H264 is not an option for your particular camera, you can select MJPG or YUYV and add an RTSP endpoint instead of UDP: rtsp://blueos.local:8554/HD_USB.

Hope it helps, thanks!

Hi @joaoantoniocardoso , thank you for replying.
Unfortunately, when i try to select MJPG or YUVY in HD Camera section, the site says “Only H264 encode is supported now, used: MJPG” . And, the camera cant added. It happens in any size settings(1080p,720p or lowest setting).

In addition that, I cant see USB camera from the blueos video page. I can only see it when i enter avaliable services, and mavlink camera manager.

I was being suspicious about the raspberry and software. I changed pi, deleted completely and re-upload BlueOS software. But nothing changed.

Sorry for my ignorance. I dont really understand the comminication and mavlink about my pc and pi. I dont understand the gst-streamer, v4l2-ctl tools as I looked in other topics. Should I download gst-streamer or v4l2 to my pi? Which tools should I download my pc and pi? Maybe this is because I didnt add bridges for comminication? I think I stucked in the mud.


Sorry, my mistake here - your BlueOS version is older than I though. MJPG is only available in more recent beta versions, can you upgrade it to the latest beta version (1.1.0-beta.15)? To do so you need to go to the version chooser page and click “DOWNLOAD AND APPLY” for 1.1.0-beta.15.

After upgrading to 1.1.0-beta.15, you will be able to configure your camera with MJPG encoding just as shown in this other post.

Since you mentioned communication, specifically about the streams, on the latest BlueOs, the Video configuration page should automatically suggest the right IP, but just to mention:

  • for UDP endpoints, the IP needs to be the local network IP of the computer running QGC;
  • for RTSP endpoints, the IP needs to be the local network IP of the ROV (blueos.local can be used here).

Let me know if you need more guidance, thanks!

1 Like

Thank you for replying.
I upgraded the version and the settings are changed. First, there is not a H264 option. Only MJPG and YUVY. I selected MJPG first, but the video didnt open. It gives me these errors:

resim
resim

Then, I switched MJPG to YUVY. Sometimes it says non-video device avaliable even the camera is plugged in. Sometimes it gives me errors as i mantioned in the MJPG.

After getting a lot of errors and stuff, it worked!! In 480p resolution with 5 fps. But after I switced to 720p, it closed and the settings are gone. I cant set the camera again because of these errors. How can I solve them?

Okay, that’s a known error that is being tracked here. I’ll raise its priority, but until it’s solved, you would need to keep with BlueOS version 1.1.0-beta.12. I’ll reply here as soon as we solve the bug.

Let me know if that works for you, thanks

1 Like

Thank you for replying.

After I changed version beta.15 to beta.12 , the camera finally works! I can get 1080p, 30fps with MJPG and RSTP. From Qgrouncontrol too.

Sometimes it gives me “no video stream acessibe for your device error” , but it disappears 1-2 seconds later.

Can I add 2 cameras instead of 1 with this method? Thank you so much for your support.

resim

1 Like

BlueOS can stream multiple cameras, but QGroundControl can only receive one stream at a time (although you can set up a joystick button function to toggle between the available streams if that’s desirable).

There are some additional video receiving options mentioned here, if you’re wanting to display and/or record multiple streams simultaneously.

2 Likes

3 posts were split to a new topic: Handling custom camera feeds (without MAVLink?)