Install Gstreamer With Rockchip MPP Hardware Accelerate - BlueBrightWind/gstreamer GitHub Wiki

Install Build Dependencies

apt install git meson ninja-build build-essential cmake pkg-config openssl flex bison libudev-dev

Install Rockchip MPP

git clone https://github.com/BlueBrightWind/mpp.git --depth=1
cd mpp
mkdir build-linux
cd build-linux
cmake \
    -DCMAKE_INSTALL_PREFIX=/usr/local/mpp \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_TEST=ON \
    ..
make -j $(nproc)
make install

Install Rockchip RGA

git clone https://github.com/BlueBrightWind/rga.git --depth=1
cd rga
meson setup build --prefix=/usr/local/rga
meson compile -C build
meson install -C build

Install Gstreamer

git clone https://github.com/BlueBrightWind/gstreamer.git --depth=1
cd gstreamer
meson setup build \
    -Dbase=enabled \
    -Dgood=enabled \
    -Dugly=enabled \
    -Dbad=enabled \
    -Dlibav=disabled \
    -Ddevtools=enabled \
    -Dges=disabled \
    -Dpython=disabled \
    -Dlibnice=disabled \
    -Dtls=enabled \
    -Dqt5=disabled \
    -Dqt6=disabled \
    -Dwebrtc=disabled \
    --prefix=/usr/local/gstreamer
meson compile -C build
meson install -C build

Setup Environment

echo "# Gstreamer" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/gstreamer/lib/aarch64-linux-gnu:\$LD_LIBRARY_PATH" >> ~/.bashrc
echo "export PKG_CONFIG_PATH=/usr/local/gstreamer/lib/aarch64-linux-gnu/pkgconfig:\$PKG_CONFIG_PATH" >> ~/.bashrc
echo "export PATH=/usr/local/gstreamer/bin:\$PATH" >> ~/.bashrc
echo "" >> ~/.bashrc

echo "# Rockchip MPP" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/mpp/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
echo "export PKG_CONFIG_PATH=/usr/local/mpp/lib/pkgconfig:\$PKG_CONFIG_PATH" >> ~/.bashrc
echo "export PATH=/usr/local/mpp/bin:\$PATH" >> ~/.bashrc
echo "" >> ~/.bashrc

echo "# Rockchip RGA" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/rga/lib/aarch64-linux-gnu:\$LD_LIBRARY_PATH" >> ~/.bashrc
echo "export PKG_CONFIG_PATH=/usr/local/rga/lib/aarch64-linux-gnu/pkgconfig:\$PKG_CONFIG_PATH" >> ~/.bashrc
echo "export PATH=/usr/local/rga/bin:\$PATH" >> ~/.bashrc
echo "" >> ~/.bashrc
source ~/.bashrc

Install Gstreamer Rockchip Plugin

git clone https://github.com/BlueBrightWind/gstreamer-rockchip.git --depth=1
cd gstreamer-rockchip
meson setup build --prefix=/usr/local/gstreamer
meson compile -C build
meson install -C build

Install Gstreamer Rockchip Rgaconvert Plugin

git clone https://github.com/BlueBrightWind/gstreamer-rgaconvert.git --depth=1
cd gstreamer-rgaconvert
meson setup build --prefix=/usr/local/gstreamer
meson compile -C build
meson install -C build