当前位置:   article > 正文

ubuntu16.04 上安装 gstreamer_ubuntu gstreamer环境变量

ubuntu gstreamer环境变量

简述:

GStreamer系列 - 基本介绍

系统:Ubuntu 16.04

这里主要介绍源码安装方式。

 

1、下载源码

下载地址中下载以下六个压缩包

  1. gstreamer-1.16.0.tar.xz
  2. gst-plugins-base-1.16.0.tar.xz
  3. gst-plugins-bad-1.16.0.tar.xz
  4. gst-plugins-good-1.16.0.tar.xz
  5. gst-plugins-ugly-1.16.0.tar.xz
  6. gst-libav-1.16.0.tar.xz

 

2、解压

  1. xz -d gstreamer-1.16.0.tar.xz
  2. tar -xvf gstreamer-1.16.0.tar

再次解压

  1. xz -d gst-plugins-base-1.16.0.tar.xz
  2. tar -xvf gst-plugins-base-1.16.0.tar
  3. xz -d gst-plugins-bad-1.16.0.tar.xz
  4. tar -xvf gst-plugins-bad-1.16.0.tar
  5. xz -d gst-plugins-good-1.16.0.tar.xz
  6. tar -xvf gst-plugins-good-1.16.0.tar
  7. xz -d gst-plugins-ugly-1.16.0.tar.xz
  8. tar -xvf gst-plugins-ugly-1.16.0.tar
  9. xz -d gst-libav-1.16.0.tar.xz
  10. tar -xvf gst-libav-1.16.0.tar

 

3、编译

1> 编译安装 gstreamer-1.16.0

  1. cd gstreamer-1.16.0
  2. sudo apt-get install build-essential dpkg-dev flex bison autotools-dev automake liborc-dev autopoint libtool gtk-doc-tools libgstreamer1.0-dev
  3. ./configure && sudo make && sudo make install

2> 配置环境变量 PKG_CONFIG_PATH

在安装其他plugins前先配置环境变量PKG_CONFIG_PATH。

  1. sudo gedit ~/.bashrc
  2. 添加PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
  3. source ~/.bashrc

3> 编译安装 gst-plugins-base-1.16.0

  1. cd ../gst-plugins-base-1.16.0
  2. sudo apt-get install libxv-dev libasound2-dev libtheora-dev libogg-dev libvorbis-dev
  3. ./configure && sudo make && sudo make install

4> 编译安装 gst-plugins-good-1.16.0

  1. cd ../ gst-plugins-good-1.16.0
  2. sudo apt-get install libbz2-dev libv4l-dev libvpx-dev libjack-jackd2-dev libsoup2.4-dev libpulse-dev
  3. ./configure && sudo make && sudo make install

5> 编译安装 gst-plugins-bad-1.16.0

  1. cd ../gst-plugins-bad-1.16.0
  2. sudo apt-get install faad libfaad-dev libfaac-dev
  3. ./configure && sudo make && sudo make install

6> 编译安装 gst-plugins-ugly-1.16.0

  1. cd ../gst-plugins-ugly-1.16.0
  2. sudo apt-get install libx264-dev libmad0-dev
  3. ./configure && sudo make && sudo make install

7> 编译安装 gst-libav-1.16.0

  1. cd ../gst-libav-1.16.0
  2. sudo apt-get install yasm
  3. ./configure && sudo make && sudo make install

8> 配置环境变量 LD_LIBRARY_PATH

  1. sudo gedit ~/.bashrc
  2. 添加LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
  3. 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

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/850932
推荐阅读
相关标签
  

闽ICP备14008679号