跳转至

GStreamer gst-rtsp-server 使用

建议用新版本1.18

1. gst-rtsp-server 源码编译

1.1 源码编译

git clone -b 1.14 https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server.git
cd gst-rtsp-server

配置编译

meson setup --prefix=$(pwd)/_install builddir

## 或者重新配置
meson setup builddir --reconfigure  --prefix=$(pwd)/_install

meson compile -C builddir

安装

meson install -C builddir

image-20240828173352919

1.2 example 使用

example 含有很多例子:

image-20240828173520452

编译后的都在编译目录下:

image-20240828180806296

2. 问题解决

2.1 Can't exec "gtkdocize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293.

image-20240826152452753

解决办法:

sudo apt-get install gtk-doc-tools
sudo apt-get update
sudo apt-get upgrade libgstreamer1.0-dev
sudo apt-get upgrade gstreamer1.0-plugins-base

2.2 Did not find CMake 'cmake'

Did not find CMake 'cmake' Found CMake: NO

image-20240826141605873

解决方案:

sudo apt-get install cmake

2.2 Neither a subproject directory nor a gst-plugins-base.wrap file was found.

Run-time dependency gstreamer-1.0 found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency gstreamer-1.0

meson.build:138:10: ERROR: Neither a subproject directory nor a gstreamer.wrap file was found.

image-20240826141933871

解决方案

sudo apt-get install libgstreamer1.0-dev
sudo apt install libglib2.0-dev