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

 

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)

解压,

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

 

 

----------------------------------------------------------------------------------------------------
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。

你可能感兴趣的:(音视频学习)