Home        Store        Docs        Blog

No video to QGroundControl from a RPI webcam


(Paul) #1

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.


(Patrick José Pereira) #2

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.


(Jacob) #3

The logitech camera does not support H.264 output: http://support.logitech.com/en_us/product/webcam-pro-9000/specs


(Paul) #4

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.


(Paul) #5

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.