apt-get update && apt-get install -y --no-install-recommends \
ca-certificates git build-essential pkg-config cmake meson ninja-build \
libdrm-dev libv4l-dev libudev-dev \
libglib2.0-dev libgudev-1.0-dev \
gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav \
gstreamer1.0-plugins-base-apps \
python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
4、下载mpp 代码并编译:
git clone --depth=1 https://github.com/rockchip-linux/mpp.git && \
cmake -S mpp -B mpp/build -DCMAKE_BUILD_TYPE=Release -DRKPLATFORM=ON && \
cmake --build mpp/build -j"$(nproc)" && \
cmake --install mpp/build
5、下载gstreamer 的mpp 插件并编译:
apt install -y git meson ninja-build pkg-config build-essential \
libdrm-dev libglib2.0-dev libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev
下载和编译gstreamer-mpp插件代码并编译,这个原本rk3588厂家在github 上的仓库已不存在,所以使用了其他分支的镜像。
git clone https://github.com/Meonardo/gst-rockchip
cd gst-rockchip
meson setup build --prefix=/usr --buildtype=release
ninja -C build
ninja -C build install
验证插件是否正确安装
gst-inspect-1.0 | grep rockchip
应该能看到类似:
rkmpph264enc
rkmpph265enc
rkmppjpegenc
rkmppvideodec
rkmppfilter