環境
# cat /etc/system-release
Amazon Linux release 2 (Karoo)
# uname -r
4.14.203-156.332.amzn2.x86_64
gst-rtsp-serverのインストール
$ git clone git://anongit.freedesktop.org/gstreamer/gst-rtsp-server
$ cd gst-rtsp-server/
$ git checkout 1.4
$ ./autogen.sh
$ make
$ sudo make install
autogen.sh 実行に必要だったパッケージ
$ sudo yum install git
$ sudo yum install libtool
$ sudo yum install gettext-devel
$ sudo yum install gtk-doc
$ sudo yum install gcc-c++
$ sudo yum install python3
$ sudo python3 -m pip install meson
$ sudo python3 -m pip install ninja
$ sudo yum install gstreamer1
$ sudo yum install gstreamer1-devel
$ sudo yum install gstreamer1-plugins-base
$ sudo yum install gstreamer1-plugins-base-devel
# 後に下記インストール
$ sudo yum install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-devel-docs gstreamer1-plugins-base-devel gstreamer1-plugins-base-devel-docs gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-ugly-devel-docs gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
# cd /usr/local/src/
# wget http://ftp.gnome.org/pub/gnome/sources/glib/2.64/glib-2.64.4.tar.xz
# tar Jxvf glib-2.64.4.tar.xz
# cd glib-2.64.4/
# meson _build
# ninja -C _build
# less INSTALL.in
# ninja -C _build install
# pkg-config glib-2.0 --modversion
vi ~/.bash_profile
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
x264encインストール
# cd /usr/local/src/
# wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2
# tar jxvf x264-master.tar.bz2
# cd ../x264-master/
# ./configure --enable-shared
# make
# make install
# gst-inspect-1.0 x264enc
必要だったパッケージ
# cd /usr/local/src/
# wget https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz
# tar Jxvf nasm-2.15.05.tar.xz
# cd nasm-2.15.05/
# ./configure
# make
# make install
$ sudo yum install gstreamer1.0-plugins-ugly
$ sudo yum install gstreamer1-plugins-ugly
$ sudo yum install gstreamer1-plugins-ugly-devel-docs
# 後に下記インストール
$ sudo yum install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-devel-docs gstreamer1-plugins-base-devel gstreamer1-plugins-base-devel-docs gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-ugly-devel-docs gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
ffmpeg(直接不要だったかも)
# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libva-1.8.3-1.el7.x86_64.rpm
# rpm -ivh libva-1.8.3-1.el7.x86_64.rpm
# wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libass-0.13.4-6.el7.x86_64.rpm
# rpm -ivh libass-0.13.4-6.el7.x86_64.rpm
$ sudo amazon-linux-extras install epel
$ sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
$ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
$ sudo yum install ffmpeg ffmpeg-devel
テスト動画の再生
$ ./test-launch '( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )'