Community Forum

Video Stream

(Servo Motor) #1

I need two video streams (that’s why I will plug two usb camera to Navio2) One of them is through Ardupilot and the other from another platform. (I will do image processing.) While Ardupilot is running, can I get another video stream on my GUI (I will create it using PyQt5)?

USB Camera Guide
(Vikeyer) #3

Hello there!
I’m not actually familiar enough with using Ardupilot, but maybe I still can help you.
If you take a look right here you’ll see instructions on how to use GStreamer to pass your video stream from Navio to the computer. But since you are using USB cameras, GStreamer pipelines will be slightly different.

On RPi side try:
gst-launch-1.0 autovideosrc name='/dev/video1' ! jpegenc ! rtpjpegpay ! udpsink host= port=9000

Try between video0 and video1, because your target camera might be either one.

On the pc side:

gst-launch-1.0 udpsrc port=9000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG' ! rtpjpegdepay ! jpegdec ! autovideosink

Thus you’ll can at least try out your configuration. Next step will be trying out to utilize GStreamer’s appsink, which basically allows you to catch video stream with your application. I know for sure, that there are libraries for Python and C++.

This and this might be a good start for you.