gstreamer1.16安装

step 1:

我们将gstreamer安装到默认的/usr/local/下,先直接将/usr/local/ 下的pkgconfig和lib路径 export 出来(这在安装完成gstreamer再安装相关插件的时候会用到)

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
export PATH=$PATH

step 2:

根据需要安装依赖

sudo apt-get install build-essential dpkg-dev flex bison autotools-dev automake liborc-dev autopoint libtool gtk-doc-tools
sudo apt-get install libxv-dev libasound2-dev libtheora-dev libogg-dev libvorbis-dev
sudo apt-get install libbz2-dev libv4l-dev libvpx-dev libjack-jackd2-dev libsoup2.4-dev libpulse-dev
sudo apt-get install faad libfaad-dev libfaac-dev
sudo apt-get install libx264-dev libmad0-dev
sudo apt-get install yasm
sudo apt-get install libssl-dev

step 3:

https://gstreamer.freedesktop.org/src/ 下载 gstreamer-1.16.2,gst-plugins-base-1.16.2,gst-plugins-good-1.16.2,gst-plugins-bad-1.16.2,gst-plugins-ugly-1.16.2,和 gst-libav-1.16.2,gst-rtsp-server-1.16.2(option),gstreamer-vaapi-1.16.2.tar.xz(vaapi硬件video加速)

解压,

cd gstreamer-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-plugins-base-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-plugins-good-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-plugins-bad-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-plugins-ugly-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-libav-1.16.2 && ./configure && make -j4 && sudo make install

cd gst-rtsp-server-1.16.2 && ./configure && make -j4 && sudo make install

安装gstreamer-vaapi前记得要先 export LIBVA_DRIVER_NAME=xx(对于Intel来说是 i965,对于004显卡是cx4)、export LIBVA_DRIVER_PATH=/usr/lib/x86_64-linux-gnu/dri、export GST_VAAPI_ALL_DRIVERS=cx4,然后再

cd gstreamer-vaapi-1.16.2 && ./configure && make -j4 && sudo make install

----------------------------------------------------------------------------------------------------
learn gstreamer: https://www.cnblogs.com/dong1/p/10423743.html

install gstreamer: https://www.cnblogs.com/walker-lin/p/11520064.html

install gcc7 , or error when compile plugin-bad
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt install gcc-7

error about glib, then,
https://www.cnblogs.com/pcat/p/5520317.html


安装完成后 gst-inspect-1.0 发现只有25个plugins,ls /usr/local/lib/gstreamer-1.0/ 下确实有很多 plugins,so export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/。完成后仍然只有25个plugins。使用 gst-inspect-1.0 libgstavi.so 发现无法正确解析其中的plugins。which gst-inspect-1.0 发现竟然是anaconda目录下的 gst-inspect-1.0。so,要么ln -s 使 gst-inspect-1.0 指向/usr/local/bin/gst-inspect-1.0,要么在使用 gstreamer的时候 conda deactivate。

在我的笔记本上编译 gst-plugins-bad-1.16.2的时候,提示 "gstnvdec.h:31:23: fatal error: gst/gl/gl.h: 没有那个文件或目录". /usr/local/include/gstreamer-1.0/gst/ 发现确实没有gl相关的头文件。./configure --prefix=/usr/local --enable-gl 提示 configure: No package 'gstreamer-gl-1.0' found 然后最终报告不会build gl plugin。

configure: *** checking feature: gl elements ***
configure: *** for plug-ins: gl ***
configure: *** These plugins will not be built: gl

ubuntu下 sudo apt-get install gstreamer1.0-gl是找不到这个包的。没办法只能 ./configure --prefix=/usr/local --disable-nvdec 放弃编译 nvdev。

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值