# Video Streaming (Companion Computer/QGroundControl)

PX4-based vehicles support video streaming using a camera connected to a companion computer.

Note

You can't video stream directly from a camera connected to PX4.

GStreamer is used to send the video to QGroundControl over an IP link. To support streaming use cases you will need to install GStreamer development packages on both your companion computer and on the system running QGroundControl. QGroundControl uses GStreamer 1.14.4 and a stripped down version of QtGstreamer to support UDP RTP and RSTP video streaming.

# Companion Computer Setup

General instructions for installing GStreamer and starting the stream on a companion computer are provided in the QGroundControl VideoReceiver README (opens new window).

The setup of cameras and data links depends on many factors. Examples in this library are listed below (note, these are options, not "recommended"):

# QGC Setup

To setup and use video steaming with QGC:

  1. Install GStreamer before running QGC. On Ubuntu this is done with the command:

    sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
    

    For other platforms follow the instructions in QGroundControl VideoReceiver README (opens new window).

  2. Enable video in Fly View: QGroundControl > General Settings (Settings View) > Video (opens new window)

  3. If everything works, you should see the video stream displayed in the QGC Video Switcher (QGC Fly View bottom left corner). You can click on the video switcher to toggle the video full-screen, as shown in the screenshot below.

    QGC displaying video stream

# Gazebo Classic Simulation

Gazebo Classic supports video streaming from within the simulated environment. For more information see Gazebo Classic Simulation > Video Streaming.