Raspberry Pi Camera stream not working

I have finally reached the point of installing my Raspberry HD camera (ribbon, not USB) and, having enabled such in Rasbian code, am receiving no picture and an error of, “MAV_CMD_DO_DIGICAM_CONTROL command not supported” in a QGroundControl Daily window (when trying to take still - in movie mode, no error but still no picture).
Does anyone have experience with this?

Hi @ogopogo,

I’ve moved your post here because it’s on the same topic. As above,

I’d recommend looking at that comment for suggestions on workarounds/alternatives :slight_smile:

Eliot, my problem is that I see no video on screen. I’m not really concerned about recording this as my GoPro should be doing that.

Ahh, ok. Does the camera come up in the detected devices on the System page of the web interface, and is it available/selected in the Camera page? :slight_smile:

I have enabled camera in the menu. I am not yet familiar with the system page. Let me check that. I was working from the terminal in raspberry not ssh etc.

I’m not certain what you mean by this (unless you’re just saying it’s selected on the Camera page), and having re-read your post I’m unsure what you mean by having “enabled [the camera] in Raspbian code” - our Companion software should detect and stream the camera automatically, and shouldn’t require configuration, so there shouldn’t have been anything you needed to enable.

what I meant was plugging in a keyboard and monitor and logging in to the raspberry to enable the camera. I am now in the system menu via web. Under System, I have no camera detected. Under camera, I have some confusion. I have streaming settings and camera settings. Camera settings shows “preset profile”

I wonder if I have a bum camera? I have plugged in a MS USB camera and it registers in system but QGC still reports “waiting for video”

This is what I get on the System page when I have both a Raspberry Pi Camera and our Low Light HD USB Camera connected:

I’m able to select which one is being streamed in the Camera page:

Companion only streams H264-encoded video streams, which many USB cameras don’t provide, so it’s possible that camera isn’t supported.

Alternatively (or as well) there could be an issue with permissions/firewall/QGroundControl version. If the telemetry is coming through then it shouldn’t be a permissions or firewall issue. Which version of QGroundControl are you using, and on which operating system? :slight_smile:

QGC 4.1.6
telemetry is ok
looked for files on my laptop and there are MKV files stored - guess that’s the MS USB codec. I’ll try a newer usb camera tomorrow

That should at least display video, although it may have trouble recording - you may want to try v4.1.7, although it likely won’t fix the display issue.

Is there a camera available on the Camera page? You should have /dev/video1 as the Active Camera - if that’s not available then the camera either isn’t detected or doesn’t support H264 streaming.

MKV is the Matroska file format, which QGC records to by default - it’s unrelated to the camera stream’s encoding.

Maybe it’s worth double-checking that the raspberry pi camera was plugged in correctly. Make sure it’s in the CSI port (middle of the board, between the barrel jack and HDMI port) and not the DSI port (end of the board, above the SD card). The port itself is a bit fiddly - the black plastic clip needs to be lifted so the cable can plug in, and the cable pins should be on the HDMI port side (the blue strip on the back of the cable should be facing the barrel jack/ethernet port).

As mentioned, many USB cameras don’t provide a H264-encoded output, and supported encodings aren’t always listed on the packaging / in the specifications so it could be tricky to find an appropriate one.

Raspberry website shows high quality output = RAW12/10/8, COMP8. I am thinking that means no onboard processing. Does your Raspberry camera have the same outputs? Is your software written to process this to h.264 ?

The Raspberry Pi hardware has some conveniences for using the Raspberry Pi camera, which includes encoding the raw frames from the CSI port into a H264-encoded stream, which is presented to the other software running on the RPi as just another format supported by the camera itself.

I only have V2.1 RPi Camera modules on hand, and can confirm those work, but as I understand it that capability should be available for all Raspberry Pi Camera modules.

I have received a new camera to test and find the same “no camera detected”. Ribbon cables exchanged and checked for correct insertion. camera is not detected from the raspbian shell or in QGC. I am re-flashing companion to the micro SD card and, if that makes no difference, will test the camera on my pi4 (Octoprint server) tomorrow.The final test I believe would be to borrow another Pi 3B to see if mine has a hardwire issue related to the camera. I really wish I had never purchased this camera now and had instead purchased the USB unit you sell. I had hoped to benefit from a better lens but all for naught it seems.

An update for you Eliot. My Raspberry Pi 12.3 mp camera works ok on a Pi 3B+ (the only one I could find locally to substitute) although the ardu-sub program does not. Many things changed with this version. Think I need stay with USB.

just ordered your USB Camera

From an online review,

Accordingly, it should at least be compatible with the 3B, and I assume our Companion software should work with it since it works with the other Raspberry Pi cameras. My guesses then are that either your existing RPi 3B has a hardware issue related to the camera, or there was some unanticipated change when you were trying to enable the camera (which I suspect is unlikely, but if that’s the case you could fix it by flashing on a fresh Companion image).

BlueOS (our new replacement for Companion) should work on the RPi 3B+ (and 4B), but unfortunately does not yet support the Raspberry Pi cameras (although that is something we’re working on).

Apologies I wasn’t able to respond sooner, if that would have influenced your decision. Our camera should work well, but if you bought it on the grounds that another camera we support wasn’t working as expected, and then manage to get that camera working, it should be fine for you to cancel that order and/or return the purchased one if you’d like to :slight_smile:

Assuming you choose to stick with our camera, I hope you enjoy using it :slight_smile:

“Don’t assume”, returning for another bite…

Having looked a bit more, the HQ camera came out in 2020, and apparently requires different drivers to run, because it uses a different image sensor. Our Companion software is based on Raspberry Pi OS Jessie, which is old enough that it likely doesn’t have access to those new drivers, and it’s unclear whether it would even work to install them manually.

Accordingly, the options to get the camera working are:

  • try to install the relevant drivers via rpi-update
    • no idea if it would work
  • install a more recent base image and install Companion over that
    • could work on a more recent Raspberry Pi device (if you want)
    • would require a Buster (Legacy) image rather than Bullseye because of the same camera changes that are making it not work in BlueOS
    • that branch is only up to 0.0.29, so misses the updates from 0.0.30 and 0.0.31 (unless you pull them in yourself locally)
  • wait for BlueOS to add support for Raspberry Pi cameras
    • reliant on our schedule, which isn’t fixed
  • install BlueOS manually on a Raspberry Pi OS (Lite) Buster image (instead of Bullseye)
    • I expect this to work, but haven’t tried it since we updated the default image to Bullseye

Eliot, I do admire your tenacity. I have tried to envision all the possible / probable disconnects and one obvious path becomes clear. Move forward, not backward. In my couple of years absence from your development I have been ignorant of your progress on BlueOS. Your group of developers and beta testers have worked hard to move the ball forward and I’m sucking up oxygen trying to tie older firmware / software to newer hardware. That is just counter-productive. It may be fun /unique to shoehorn a Tesla propulsion system into a '57 ford but how many people would really benefit from the process?

I have etched the “new Blue” and will be experimenting with 3B+ (borrowed) and 4 (from my Octopi process) and do hereby solemly affirm and attest that I shall look forward, not rearward!!!

1 Like