Skip to content

Camera

UAVcast-Pro uses the well known media-handling library gstreamer to proccess the video pipeline towards the Ground Control Station. It supports PiCam, Logitech C615, Logitech C920 out of the box.

Info

Remember to activate camera in Rasperry Config if you are using PiCam.

sudo raspi-config raspi-config

Camera Type

  • Options: PiCam, C615, C920, Custom Pipeline

Each camera uses diffrent start code, also known as pipeline to be able to communicate or proccess the video source. UAVcast-Pro has three diffrent cameras pre-defined from the dropdown menu. However, if your camera is not listed then you can insert a custom pipline with the needed plugins to match your current camera model and type.

You can also send a test video by inserting the pipeline below to UAVcast-Pro custom field section, nice way to check if everyting is working without the camera itself.

Remember to change the Destination address:
gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink host=GCS_ADDRESS port=5600

Take a look at this page for pipeline examples http://wiki.oz9aec.net/index.php/Gstreamer_cheat_sheet

UDP or TCP protocol

  • Default value: UDP

UAVcast-Pro supports UDP and TCP for PiCam, other cameras only support UDP at the moment.

GCS Destination

All destinations you have added in Ground Control page will be shown in the dropdown list. Its only possible to select one destination for video.

Video resolution

  • Default value: 240p (320x240)
  • Options: 240p (320x240), 480p (720x480), 540p (960x540), HD (1280x720), Full HD (1920x1080)

Tip

If your broadband connection has a low transfer speed, then lower the resoultion to get smooth video.

Destination Port

  • Default value: 5600

Change the Video network port. Mission Planner and QGroundControl supports video in HUD by default on port 5600.

Bitrate

  • Default value: 2000000

Tip

If your broadband connection has a low transfer speed, then lower the Bitrate to get smooth video.

Example: 800000

Frames Pr.second

  • Default value: 20

Tip

If your broadband connection has a low transfer speed, then lower the FPS to get smooth video.

Example: 8

Start Video Stream

To verify if camera will start propely, simply press the start button. If any issues, press the Log button to reveal any problems.

Start and Stop

UDP video (Windows / Mac / Linux / Android)

Ubuntu

If you're going to stream to a Ubuntu PC, install the some packages locally beforehand.

sudo apt-get update
sudo apt-get install gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad

Android

  • Download and install QGroundControl for Android.

  • Find IP address of your device in preferences. You'll need it in order to connect to the phone from your RPi.

  • Run QGroundControl and it will automatically detect your vehicle.

Note: default port for video in QGC application is 5600

Here's the app in action capture

Mac OS X

The simplest way is to use brew. To install it run the following in your Mac terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install gstreamer gst-libav gst-plugins-ugly gst-plugins-base gst-plugins-bad gst-plugins-good

Windows

Solution #1

Download and install Mission Planner or QGroundControl both applications supports UDP video by default on port 5600.

Solution #2

Download and install gstreamer for Windows.

Open a new command-promt window and navigate to the gstreamer bin folder, usually C:\gstreamer\1.0\x86_64\bin

Start gstreamer For Windows/Ubuntu/Mac OS X:

Paste this gstreamer command in the command-prompt(windows) or terminal (unix/mac) to start gstreamer.

gst-launch-1.0 -v udpsrc port=5600 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

From now on, your computer will be waiting for the input stream from Raspberry PI. Once it gets a stream, you'll see the real-time video from your drone.

TCP video (Windows / Mac / Linux)

Select TCP from the dropdown menu in UAVcast-Pro webinterface. Add your raspberry IP address (if you use Zerotier VPN, add ZT IP address) in the TCP Host input box.

Press Start camera button. You should see video started successfully

Install gstreamer for your operating system (see above section), then open a new command-prompt(windows) or terminal(unix/mac)

Paste this gstreamer command in the command-prompt(windows) or terminal (unix/mac) to start gstreamer.

Info

Windows users needs to navigate to gstreamer folder before using the below gstreamer command.

You need to change the PI_IP to the same as you used for TCP Host

gst-launch-1.0 -v tcpclientsrc host=PI_IP port=5600 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

From now on, your computer will be connecting towards Raspberry PI. Once it gets a stream, you'll see the real-time video from your drone.

Startup help files (Windows)

Its possible to save the gstreamer pipline to a .cmd file, then you can just double click the file and video will start automatically.

Download files below, then right click and select edit. Change the port number or path of gstreamer if neccessary.

gstreamer UDP start file

gstreamer TCP start file