Sorry, you need to enable JavaScript to visit this website.

Linux Gstreamer VAAPI/MSDK Installation Environment

To install basic dependent packages:
  1. To install basic dependencies on Ubuntu(18.04)
Basic:
#apt-get install -y cifs-utils autoconf libtool libdrm-dev yasm libghc-x11-dev libxmuu-dev libxfixes-dev libxcb-glx0-dev libgegl-dev libegl1-mesa-dev libcogl-gles2-dev
#apt-get install –y cifs-utils git xutils-dev libpciaccess-dev xserver-xorg-dev
#apt-get install –y libv4l-dev
#apt-get install –y libasound2-dev
Gstreamer and Gstreamer Plugins dependencies:
  • To install related pkg for gst core
#apt-get install -y bison flex gtk-doc-tools libpackagekit-glib2-dev autopoint libgudev-1.0-dev
  • To install related pkg for gst-base
#apt-get install -y liboggz2-dev libvorbis-dev libtheora-dev
  • To install related pkg for gst-good
#apt-get install -y liborc-0.4-dev libjpeg-dev
  • To install related pkg for gst-devtools
#apt-get install -y libjson-glib-dev
 
  1. To install basic dependencies on CentOS (7.5)
Basic:
#yum group install -y "Development Tools"
#yum install -y git autoconf.noarch automake.noarch xorg-x11-server-devel epel-release cmake cmake3 libtool
Upgrade automake version to 1.14+ (gstreamer build required)
#tar zxvf automake-1.14.1.tar.gz
#cd automake-1.14.1
#./configure --prefix=/usr
#make
#make install
Gstreamer and Gstreamer Plugins dependencies:
  • To install related pkg for gst core
#yum install -y gtk-doc glib2-devel
  • To install related pkg for gst-base
#yum install -y libvorbis-devel libtheora-devel
  • To install related pkg for gst-good
#yum install -y libjpeg-turbo-devel orc-devel
  • To install related pkg for gst-bad (using for gst-msdk)
#yum install -y libgudev1-devel
  • To install related pkg for gst-devtools

#yum install -y json-glib-devel

To setup downloaded source code and to build & install environment
#export ROOT_INSTALL_DIR=/opt/media/
#mkdir -p $ROOT_INSTALL_DIR
#export SRC_DIR=$HOME/media_src/
#mkdir -p $SRC_DIR
For Ubuntu(18.04)
    #export PKG_CONFIG_PATH=$ROOT_INSTALL_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH
    #export LD_LIBRARY_PATH=$ROOT_INSTALL_DIR/lib:$ROOT_INSTALL_DIR/lib/mfx/:$ROOT_INSTALL_DIR/lib/xorg/:$LD_LIBRARY_PATH
    #export LDFLAGS="-L$ROOT_INSTALL_DIR/lib"
For CentOS (7.5)
    #export PKG_CONFIG_PATH=$ROOT_INSTALL_DIR/lib/pkgconfig/:$ROOT_INSTALL_DIR/lib64/pkgconfig/:$PKG_CONFIG_PATH
    #export LD_LIBRARY_PATH=$ROOT_INSTALL_DIR/lib:$ROOT_INSTALL_DIR/lib64:$LD_LIBRARY_PATH
    #export LDFLAGS="-L$ROOT_INSTALL_DIR/lib -L$ROOT_INSTALL_DIR/lib64"
#export CPPFLAGS="-I$ROOT_INSTALL_DIR/include $CPPFLAGS"
#export CFLAGS="-I$ROOT_INSTALL_DIR/include $CFLAGS"
#export CXXFLAGS="-I$ROOT_INSTALL_DIR/include $CXXFLAGS"
#export PATH=$ROOT_INSTALL_DIR/share/mfx/samples/:$ROOT_INSTALL_DIR/bin:$PATH
#export LIBVA_DRIVER_NAME=iHD
#export LIBVA_DRIVERS_PATH=$ROOT_INSTALL_DIR/lib/dri
#export GST_VAAPI_ALL_DRIVERS=1
#export GST_GL_PLATFORM=egl

#export DISPLAY=:0.0

To install Gstreamer video stack dependent packages:
This section includes hwo to build and install for x264/x265, libdrm, 2D Driver(xf86-video-intel), VAAPI(libva and Intel video driver - iHD), and mediaSDK 

Linux VAAPI Video Stack Basic Packages Installation

To install Gstreamer
Gstreamer core
#cd $SRC_DIR/gstreamer
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8
#make install
gst-plugins-base
#cd $SRC_DIR/gst-plugins-base
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8
#make install
gst-plugins-good
#cd $SRC_DIR/gst-plugins-good
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8
#make install
gst-plugins-ugly
#cd $SRC_DIR/gst-plugins-ugly
#./autogen.sh --prefix=$ROOT_INSTALL_DIR --enable-x264
#make -j8
#make install
gst-plugins-bad
#cd $SRC_DIR/gst-plugins-bad
#./autogen.sh --prefix=$ROOT_INSTALL_DIR --disable-examples --enable-gtk-doc=no --enable-gtk-doc-pdf=no --enable-gtk-doc-html=no
#make -j8
#make install
gstreamer-vaapi
#cd $SRC_DIR/gstreamer-vaapi
#./autogen.sh --prefix=$ROOT_INSTALL_DIR --enable-encoders
#make -j8
#make install
gst-devtools
#cd $SRC_DIR/gst-devtools
#./configure --prefix=$ROOT_INSTALL_DIR -v
#make -j8
#make install
gst-checksum
#git clone https://github.com/ceyusa/gst-checksumsink $SRC_DIR/gst-checksum
#cd $SRC_DIR/gst-checksum
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8
#make install
gst-rawvideosrc
#git clone https://github.com/sreerenjb/gst-rawvideosrc $SRC_DIR/gst-rawvideosrc
#cd $SRC_DIR/gst-rawvideosrc
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8
#make install
gst-libav (Optional install)
Comments:
the gst-validate testing needs the gst-libav to do decode for some audio format;
The gst-libav has a dependency on gas-preprocessor which needs to setup a git proxy ( git://git.libav.org/gas-preprocessor.git)
#cd $SRC_DIR/gst-libav
#./autogen.sh --prefix=$ROOT_INSTALL_DIR
#make -j8

#make install

To export related environment variables
To add the below command lines in the file of “$HOME/.bashrc” for auto configure
#ROOT_INSTALL_DIR=”/opt/media/”
#export LIBVA_DRIVER_NAME=iHD
#export LIBVA_DRIVERS_PATH=$ROOT_INSTALL_DIR/lib/dri
#export GST_VAAPI_ALL_DRIVERS=1
#export GST_GL_PLATFORM=egl
#export DISPLAY=:0.0
For Ubuntu(18.04)
    #export PKG_CONFIG_PATH=$ROOT_INSTALL_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH
    #export LD_LIBRARY_PATH=$ROOT_INSTALL_DIR/lib:$ROOT_INSTALL_DIR/lib/mfx/:$ROOT_INSTALL_DIR/lib/xorg/:$LD_LIBRARY_PATH
    #export LDFLAGS="-L$ROOT_INSTALL_DIR/lib"
For CentOS (7.5)
    #export PKG_CONFIG_PATH=$ROOT_INSTALL_DIR/lib/pkgconfig/:$ROOT_INSTALL_DIR/lib64/pkgconfig/:$PKG_CONFIG_PATH
    #export LD_LIBRARY_PATH=$ROOT_INSTALL_DIR/lib:$ROOT_INSTALL_DIR/lib64:$LD_LIBRARY_PATH
    #export LDFLAGS="-L$ROOT_INSTALL_DIR/lib -L$ROOT_INSTALL_DIR/lib64"
#export PATH=$ROOT_INSTALL_DIR/share/mfx/samples/:$ROOT_INSTALL_DIR/bin:$PATH
#export CPPFLAGS="-I$ROOT_INSTALL_DIR/include $CPPFLAGS"
#export CFLAGS="-I$ROOT_INSTALL_DIR/include $CFLAGS"
#export CXXFLAGS="-I$ROOT_INSTALL_DIR/include $CXXFLAGS"