MAVLink 相机管理服务
An extensible cross-platform camera server built on top of GStreamer and Rust-MAVLink
Download the mavlink-camera-manager binary for your architecture from our releases, or build it from sources as described here
note: We recommend GStreamer 1.24.0 or above. Previous versions have thread leaks when using WebRTC. You can check it by running gst-launch-1.0 --version. If the required version is not available on your operating system from their official store, follow the recommendations from here
note 2: for a docker-based installation, you can use this folder as an example
Linux (Ubuntu-based distros)
sudo apt update -y && \
sudo apt install -y --no-install-recommends \
libgstreamer1.0-0 \
libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libgstrtspserver-1.0-0 \
gstreamer1.0-x \
gstreamer1.0-nicePATHWindows
macOS
brew install gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good gst-rtsp-serverPATHAfter the installation, the binary can be run by calling it from the terminal, as simple as:
mavlink-camera-manager --mavlink=tcpout:0.0.0.0:14000 --verboseAt this point, the API should be ready. By default, it's accessible from any computer in the same network at port 6020, but it is customizable using the --rest-server CLI argument.
For more information about the CLI arguments, mavlink-camera-manager --help will give a list of accepted parameters for your version.
Along with the REST API, a simple management interface is available at http://localhost:6020, in which streams can be created and managed:
For developers, the Swagger UI with documentation for the entire REST API can be found at http://localhost:6020/docs
The short clip below shows how an H264 UDP stream can be configured using the management interface, and how it can be accessed as a WebRTC stream.
The video should automatically popup if you are using any modern GCS, like QGroundControl, that has support for MAVLink camera messages.
mavlink-camera-managermavproxy or sim_vehicle with a TCP server at 5777 (mavlink-camera-manager's default can be changed via the CLI argument --mavlink)mavlink-camera-managergstreamer-launch-1.0 rtspsrc location=$RTSP_ADDR latency=0 \
! decodebin
! fpsdisplaysink sync=falsegstreamer-launch-1.0 udpsrc port=$PORT \
! application/x-rtp,payload=96 \
! rtph264depay \
! avdec_h264 discard-corrupted-frames=true \
! videoconvert
! fpsdisplaysink sync=falseThis section assumes a Ubuntu 24.04, adaptation will be necessary for other distros.
sudo apt update -y &&\
sudo apt install -y --no-install-recommends \
libunwind-dev \
libclang-dev \
pkg-config \
build-essential \
curl \
gnupg \
ca-certificates \
git \
libmount-dev \
libsepol-dev \
libselinux1-dev \
libglib2.0-dev \
libgudev-1.0-dev \
gstreamer1.0-tools \
gstreamer1.0-nice \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstrtspserver-1.0-devInstall cargo if not available (official instructions here)
Install NodeJS greater or equal to 19 (official instructions here), and the latest Yarn (official instructions here), as shown below:
…git clone https://github.com/mavlink/mavlink-camera-manager.git &&\
cd mavlink-camera-manager./build.sh --releasenote: If the compilation fails to find one of these packages, make sure that they are visible for pkg-config, which may be necessary to set PKG_CONFIG_PATH environment variable.
This project is licensed under the MIT License.
The Mavlink Camera Manager project originated as a personal experiment by @patrickelectric, driven by the need to address a critical challenge in remotely operated vehicles – effectively managing and providing camera streams to the topside computer. At the time, there was a noticeable absence of open-source alternatives, which motivated the project's inception.
Over time, the project gained recognition and was officially embraced by Blue Robotics as a core development effort. It became an integral part of their operating system, BlueOS, and was widely distributed worldwide. The adoption of the Mavlink Camera Manager by Blue Robotics served as a testament to its capabilities and value.
Due to increasing interest from other developers and integrators, the project was transferred to the MAVLink organization on May 25, 2023.
暂无开放 Issues,或尚未同步最近议题。