赞
踩
简述:
系统:Ubuntu 16.04
这里主要介绍源码安装方式。
1、下载源码
在下载地址中下载以下六个压缩包
- gstreamer-1.16.0.tar.xz
- gst-plugins-base-1.16.0.tar.xz
- gst-plugins-bad-1.16.0.tar.xz
- gst-plugins-good-1.16.0.tar.xz
- gst-plugins-ugly-1.16.0.tar.xz
- gst-libav-1.16.0.tar.xz
2、解压
- xz -d gstreamer-1.16.0.tar.xz
- tar -xvf gstreamer-1.16.0.tar
再次解压
- xz -d gst-plugins-base-1.16.0.tar.xz
- tar -xvf gst-plugins-base-1.16.0.tar
-
- xz -d gst-plugins-bad-1.16.0.tar.xz
- tar -xvf gst-plugins-bad-1.16.0.tar
-
- xz -d gst-plugins-good-1.16.0.tar.xz
- tar -xvf gst-plugins-good-1.16.0.tar
-
- xz -d gst-plugins-ugly-1.16.0.tar.xz
- tar -xvf gst-plugins-ugly-1.16.0.tar
-
- xz -d gst-libav-1.16.0.tar.xz
- tar -xvf gst-libav-1.16.0.tar
3、编译
1> 编译安装 gstreamer-1.16.0
- cd gstreamer-1.16.0
- sudo apt-get install build-essential dpkg-dev flex bison autotools-dev automake liborc-dev autopoint libtool gtk-doc-tools libgstreamer1.0-dev
- ./configure && sudo make && sudo make install
2> 配置环境变量 PKG_CONFIG_PATH
在安装其他plugins前先配置环境变量PKG_CONFIG_PATH。
- sudo gedit ~/.bashrc
- 添加PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
- source ~/.bashrc
3> 编译安装 gst-plugins-base-1.16.0
- cd ../gst-plugins-base-1.16.0
- sudo apt-get install libxv-dev libasound2-dev libtheora-dev libogg-dev libvorbis-dev
- ./configure && sudo make && sudo make install
4> 编译安装 gst-plugins-good-1.16.0
- cd ../ gst-plugins-good-1.16.0
- sudo apt-get install libbz2-dev libv4l-dev libvpx-dev libjack-jackd2-dev libsoup2.4-dev libpulse-dev
- ./configure && sudo make && sudo make install
5> 编译安装 gst-plugins-bad-1.16.0
- cd ../gst-plugins-bad-1.16.0
- sudo apt-get install faad libfaad-dev libfaac-dev
- ./configure && sudo make && sudo make install
6> 编译安装 gst-plugins-ugly-1.16.0
- cd ../gst-plugins-ugly-1.16.0
- sudo apt-get install libx264-dev libmad0-dev
- ./configure && sudo make && sudo make install
7> 编译安装 gst-libav-1.16.0
- cd ../gst-libav-1.16.0
- sudo apt-get install yasm
- ./configure && sudo make && sudo make install
8> 配置环境变量 LD_LIBRARY_PATH
- sudo gedit ~/.bashrc
- 添加LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
- source ~/.bashrc
4、验证
dpkg -l | grep gstreamer
5、命令安装方式
据说在ubuntu18.04上是可以安装成功的。
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。