No video to QGroundControl from a RPI webcam

We have setup a Windows 10 PC running QGC 3.2.4 connected by Ethernet to a Raspberry Pi and a Pixhawk connect via usb to the RPI flowing the instructions at https://www.ardusub.com/resources/community.html4 this weekend. QGC connects to the Pixhawk, I can calibrate sensor and so on but I am not able to stream video from a webcam connect to the RPI. On the QGC application setting - general, I have selected UDP Video Stream and left the default port 5600. When I run lsusb I get the following result:
pi@raspberrypi:~ $ lsusb
Bus 001 Device 008: ID 04f2:1060 Chicony Electronics Co., Ltd
Bus 001 Device 007: ID 413c:301a Dell Computer Corp.
Bus 001 Device 006: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 009: ID 26ac:0011
Bus 001 Device 004: ID 046d:0809 Logitech, Inc. Webcam Pro 9000
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So the RPI sees the Logitech, Inc. Webcam Pro 9000 but when I run a command like: raspivid -n -fl -w 1280 -h 720 -b 10000000 -fps 30 -t 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.2.1 port=5600

The output looks like mmal:
mmal_vc_component_create: failed to create component ‘vc.ril.camera’ (1:ENOMEM)
mmal: mmal_component_create_core: could not create component ‘vc.ril.camera’ (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly

Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.000344111
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

I also tried running Wireshark on the widows computer and I do not see any traffic on UDP port 5600. I am thinking the RPI does not a drive to correctly handle the Logitech webcam. Is there a method to add support for USB webcams to the RPI image?
Thanks for the help.

Right now, this is how companion are using gstreamer to send the video to QGC.

But, for this pipeline, it’s necessary a camera that output h264, you can check your camera output formats with:

v4l2-ctl -d $DEVICE --list-formats

Than, you’ll be able to check the gstreamer pipeline and correct it if necessary.

The logitech camera does not support H.264 output: Logitech Support + Download

Thank you for the help, We just used a camera that I we had in a drawer. I will try it again when we have a appropriate camera.

We tried 2 different cameras. The Arducam 5 Megapixels 1080p Sensor OV5647 Mini Camera Video Module for Raspberry Pi connected to the RPI camera port and the an ELP 180 degree fisheye, 1080P H.264 microphone PC Web usb security camera connected to a RPI USB port , Both worked without any problem. Thank you for you help.

Hey
I am currently using Rpi3 as my companion computer and Qground control (version 3.5.4) on my laptop. I am using an rpi cam to get the live feed on Qground control. The camera is being detected in the companion web interface page but not giving any video in the Q ground control. I had enabled the video option in QGC and set the port as 5600 !,In case you need further details

$ v4l2-ctl --list-formats-ext --device=/dev/video0
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘YU12’
Name : Planar YUV 4:2:0
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 1
Type : Video Capture
Pixel Format: ‘YUYV’
Name : YUYV 4:2:2
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 2
Type : Video Capture
Pixel Format: ‘RGB3’
Name : 24-bit RGB 8-8-8
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 3
Type : Video Capture
Pixel Format: ‘JPEG’ (compressed)
Name : JFIF JPEG
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 4
Type : Video Capture
Pixel Format: ‘H264’ (compressed)
Name : H.264
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 5
Type : Video Capture
Pixel Format: ‘MJPG’ (compressed)
Name : Motion-JPEG
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 6
Type : Video Capture
Pixel Format: ‘YVYU’
Name : YVYU 4:2:2
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 7
Type : Video Capture
Pixel Format: ‘VYUY’
Name : VYUY 4:2:2
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 8
Type : Video Capture
Pixel Format: ‘UYVY’
Name : UYVY 4:2:2
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 9
Type : Video Capture
Pixel Format: ‘NV12’
Name : Y/CbCr 4:2:0
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 10
Type : Video Capture
Pixel Format: ‘BGR3’
Name : 24-bit BGR 8-8-8
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 11
Type : Video Capture
Pixel Format: ‘YV12’
Name : Planar YVU 4:2:0
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 12
Type : Video Capture
Pixel Format: ‘NV21’
Name : Y/CrCb 4:2:0
Size: Stepwise 32x32 - 2592x1944 with step 2/2

Index : 13
Type : Video Capture
Pixel Format: ‘BGR4’
Name : 32-bit BGRA/X 8-8-8-8
Size: Stepwise 32x32 - 2592x1944 with step 2/2

$ v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
/dev/video0

Screenshot%20from%202019-09-16%2016-54-42|690x388

Hello,

Do you have the dependencies listed here installed?

Yeah we have installed the required dependencies

Hey it started working
The problem was loose connection

2 Likes