Skip to content

Latest commit

 

History

History
218 lines (147 loc) · 6.4 KB

File metadata and controls

218 lines (147 loc) · 6.4 KB

📡 GStreamer Installation for Wireless Reachy Mini

This guide will help you install GStreamer to receive video and audio streams from your wireless Reachy Mini.

🐧 Linux 🍎 macOS 🪟 Windows
✅ Supported ✅ Supported ⚠️ Partial Support

🔧 Install GStreamer

🐧 Linux

Step 1: Install GStreamer

For Ubuntu/Debian-based systems:

In your terminal, run:

sudo apt-get update
sudo apt-get install -y \
    libgstreamer-plugins-bad1.0-dev \
    libgstreamer-plugins-base1.0-dev \
    libgstreamer1.0-dev \
    libglib2.0-dev \
    libssl-dev \
    libgirepository1.0-dev \
    libcairo2-dev \
    libportaudio2 \
    libnice10 \
    gstreamer1.0-plugins-good \
    gstreamer1.0-alsa \
    gstreamer1.0-plugins-bad \
    gstreamer1.0-nice \
    python3-gi \
    python3-gi-cairo

Step 2: Install Rust

On Linux, the WebRTC plugin is not activated by default and needs to be compiled manually from the Rust source code. Install Rust from the command line using rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Step 3: Build and install WebRTC plugin

To build and install the WebRTC plugin, run the following commands:

# Clone the GStreamer Rust plugins repository
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd gst-plugins-rs
git checkout 0.14.1

# Install the cargo-c build tool
cargo install cargo-c

# Create installation directory
sudo mkdir -p /opt/gst-plugins-rs
sudo chown $USER /opt/gst-plugins-rs

# Build and install the WebRTC plugin (this may take several minutes)
cargo cinstall -p gst-plugin-webrtc --prefix=/opt/gst-plugins-rs --release

# Add plugin path to your environment
echo 'export GST_PLUGIN_PATH=/opt/gst-plugins-rs/lib/x86_64-linux-gnu:$GST_PLUGIN_PATH' >> ~/.bashrc
source ~/.bashrc

💡 Note: For ARM64 systems (like Raspberry Pi), replace x86_64-linux-gnu with aarch64-linux-gnu in the export command.

⚠️ Ubuntu 22.04 Special Handling

Ubuntu 22.04 uses GStreamer 1.20 by default. You need to use gst-plugins-rs version 0.11.3 for compatibility:

# Clone the GStreamer Rust plugins repository
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd gst-plugins-rs

# KEY: Switch to version 0.11.3 (last stable version compatible with GStreamer 1.20)
git checkout 0.11.3

# Fix dependency bug - 0.11.3 has a time library bug that needs manual update
cargo update -p time

# Install the cargo-c build tool
cargo install cargo-c

# Create installation directory
sudo mkdir -p /opt/gst-plugins-rs
sudo chown $USER /opt/gst-plugins-rs

# Build and install the WebRTC plugin (this may take several minutes)
cargo cinstall -p gst-plugin-webrtc --prefix=/opt/gst-plugins-rs --release

# Add plugin path to your environment
echo 'export GST_PLUGIN_PATH=/opt/gst-plugins-rs/lib/x86_64-linux-gnu:$GST_PLUGIN_PATH' >> ~/.bashrc
source ~/.bashrc

Why are these special steps needed?

  • Version 0.11.3: This is the last stable version compatible with GStreamer 1.20 (default on Ubuntu 22.04)
  • cargo update -p time: The 0.11.3 version depends on a time library with a "type annotations needed" bug. This command automatically updates to the fixed version.
🍎 macOS

Using Homebrew

brew install gstreamer libnice-gstreamer

The WebRTC plugin is activated by default in the Homebrew package.

🪟 Windows

⚠️ Note: Windows support is currently partial. Some features may not work as expected.

Step 1: Install GStreamer using the official installer

Download GStreamer for Windows

  1. Download both runtime and development installers (MSVC version)
  2. Install both with Complete installation option
  3. Add to system PATH: C:\gstreamer\1.0\msvc_x86_64\bin
  4. Add to PKG_CONFIG_PATH: C:\gstreamer\1.0\msvc_x86_64\lib\pkgconfig

💡 Important: Replace C:\gstreamer with your actual GStreamer installation folder if you installed it in a different location.

Step 2: Install Rust

On Windows, the WebRTC plugin is not activated by default and needs to be compiled manually from the Rust source code. Install Rust using the Windows installer:

  1. Download and install Rust from https://rustup.rs/
  2. Restart your terminal.

Step 3: Build and install WebRTC plugin

To build and install the WebRTC plugin, run the following commands:

# Clone the GStreamer Rust plugins repository
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd gst-plugins-rs
git checkout 0.14.1

# Install the cargo-c build tool
cargo install cargo-c

# Build the WebRTC plugin (this may take several minutes)
cargo cinstall -p gst-plugin-webrtc --prefix=C:\gst-plugins-rs --release

# Copy the plugin to GStreamer plugins directory
copy C:\gst-plugins-rs\lib\gstreamer-1.0\gstrswebrtc.dll C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0\

# Add plugin path to environment
set GST_PLUGIN_PATH="C:\gst-plugins-rs\lib\gstreamer-1.0;%GST_PLUGIN_PATH%"

💡 Note: Replace C:\gstreamer with your actual GStreamer installation path if different. The last command requires Administrator privileges to set system-wide environment variables.

✅ Verify Installation

Finally, you can test your GStreamer installation as follows:

# Check version
gst-launch-1.0 --version

# Test basic functionalities
gst-launch-1.0 videotestsrc ! autovideosink

# Verify WebRTC plugin
gst-inspect-1.0 webrtcsrc

💡 For advanced testing and troubleshooting: See the Advanced Raspberry Pi Setup Guide for detailed configuration options and system diagnostics.

🔧 Python Dependencies

When installing the Reachy Mini Python package, you will also need to add the gstreamer extra:

Install from PyPI

uv pip install "reachy-mini[gstreamer]"

Install from source

uv sync --extra gstreamer