Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Intel(R) Media SDK GStreamer* Getting Started Guide

$
0
0

Intel(R) Media SDK GStreamer* Installation Process

1 Overview

This document provides the system requirements, installation instructions, issues and limitations. System Requirements:

  • Intel(R) Core(TM) Processor: SkyLake, Broadwell.
  • Fedora* 24 / 25
  • Intel(R) Media Server Studio 2017 R2.

2 Installing Fedora* 24 / 25

2.1 Downloading Fedora*

Go to the Fedora* download site and download Workstation OS image:

Fedora* 24: http://mirror.nodesdirect.com/fedora/releases/24/Workstation/x86_64/iso/Fedora*-Workstation-Live-x86_64-24-1.2.iso
Fedora* 25: http://mirror.nodesdirect.com/fedora/releases/25/Workstation/x86_64/iso/Fedora*-Workstation-Live-x86_64-25-1.3.iso

2.2 Creating the installation USB

Get an imaging tool like Rufus to create the USB bootable image

2.3 Installing Fedora* 24 / 25 on the system

For Fedora* 25, you may log on to the system with "GNOME on Xorg" option in the Gnome login manager. This is because the default desktop for Fedora* 25 uses Wayland, and the renderer plugin (mfxsink) native Wayland backend is not very well supported by the Fedora* Wayland desktop. In this case, you should use the Wayland EGL backend in mfxsink for native Wayland rendering in Fedora* 25 Wayland.

2.4 Configuring the Fedora* system (optional)

In case the user is behind a VPN, you may use the following method to set up the network proxy:

vi /etc/dnf/dnf.conf
# Add the following lines:
proxy=http://<proxy address>:<port>

Enable sudo privileges:

$ su
Password:
# vi /etc/sudoers
Find one line such like
  root    ALL=(ALL)    ALL
Then add one line for the normal user who wants to use sudo, e.g. for normal user "user"
  user    ALL=(ALL)    ALL

2.5 Installing rpm fusion

Fedora* 24:

wget <http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-24.noarch.rpm> -e use_proxy=yes -e  http_proxy=<proxy_address>:<port>
sudo rpm -ivh rpmfusion-free-release-24.noarch.rpm

Fedora* 25:

wget <http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-25.noarch.rpm> -e use_proxy=yes -e  http_proxy=<proxy_address>:<port>
sudo rpm -ivh rpmfusion-free-release-25.noarch.rpm

2.6 Updating system

sudo dnf update

3 Installing Intel(R) Media Server Studio 2017

3.1 Downloading Intel(R) Media Server Studio (MSS) 2017 R2 Community Edition

Go to https://software.intel.com/en-us/intel-media-server-studio and download the tar.gz file

3.2 Installing the user-space modules for MSS

Note: Before starting the following command sequence, please take note that the last cp command may reset the system, the system may freeze for a while and logout automatically. This is expected, continue logging in and resume the installation procedure. Create a folder for installation, for example “development”, download the tar file MediaServerStudioEssentials2017R2.tar.gz to this folder.

# cd ~
# mkdir development
# cd development
# tar -vxf MediaServerStudioEssentials2017R2.tar.gz
# cd MediaServerStudioEssentials2017R2/
# tar -vxf SDK2017Production16.5.1.tar.gz
# cd SDK2017Production16.5.1/Generic/
# tar -vxf intel-linux-media_generic_16.5.1-59511_64bit.tar.gz
# sudo cp -rdf etc/* /etc
# sudo cp -rdf opt/* /opt
# sudo cp -rdf lib/* /lib
# sudo cp -rdf usr/* /usr

3.3 Installing the custom kernel module package

3.3.1 Install the build tools

# sudo dnf install kernel-headers kernel-devel bc wget bison ncurses-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel newt-devel numactl-devel pciutils-devel python-devel zlib-devel mesa-dri-drivers openssl-devel

3.3.2 Download and build the kernel

# cd ~/development
# wget  https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz -e use_proxy=yes -e  https_proxy= https://<proxy address>:<port>
# tar -xvf linux-4.4.tar.xz
# cp /opt/intel/mediasdk/opensource/patches/kmd/4.4/intel-kernel-patches.tar.bz2 .
# tar -xjf intel-kernel-patches.tar.bz2
# cd linux-4.4/
# vi patch.sh
(Added: “for i in ../intel-kernel-patches/*.patch; do patch -p1 < $i; done”)
# chmod +x patch.sh
# ./patch.sh
# make olddefconfig
# echo "CONFIG_NVM=y">> .config
# echo "CONFIG_NVM_DEBUG=n">> .config
# echo "CONFIG_NVM_GENNVM=n">> .config
# echo "CONFIG_NVM_RRPC=n">> .config
# make -j 8
# sudo make modules_install
# sudo make install

3.3.3 Validate the kernel change

Reboot the system with kernel 4.4 and check the kernel version

# uname –r
4.4.0

3.3.4 Validate the MSDK installation

The vainfo utility should show the Media SDK iHD driver details (installed in /opt/intel/mediasdk) and several codec entry points that indicate the system support for various codec formats.

$ vainfo
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)
vainfo: Driver version: 16.5.1.59511-ubit
vainfo: Supported profile and entrypoints
 VAProfileH264ConstrainedBaseline: VAEntrypointVLD
 VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
 VAProfileH264Main : VAEntrypointVLD
 VAProfileH264Main : VAEntrypointEncSlice
 VAProfileH264High : VAEntrypointVLD
 VAProfileH264High : VAEntrypointEncSlice

Prebuilt samples are available for installation smoke testing in MediaSamples_Linux_*.tar.gz

# cd ~/development/MediaServerStudioEssentials2017R2/
# tar -vxf MediaSamples_Linux_2017R2.tar.gz
# cd MediaSamples_Linux_2017R2_b634/samples/_bin/x64/
# ./sample_multi_transcode -i::h264 ../content/test_stream.264 -o::h264 out.264

This test should pass on successful installation.

4 Installing GStreamer*

4.1 Install GStreamer* and corresponding plugins packages

# sudo dnf install gstreamer1 gstreamer1-devel gstreamer1-plugins-base gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-free-extras gstreamer1-libav gstreamer1-plugins-bad-free-devel gstreamer1-plugins-base-tools

4.2 Validate the installation

# gst-launch-1.0 –-version
# gst-launch-1.0 -v fakesrc num_buffers=5 ! fakesink
# gst-play-1.0 sample.mkv

5 Building the GStreamer* MSDK plugin

5.1 Install the GStreamer* MSDK plugin dependencies

# sudo dnf install gcc-c++ glib2-devel libudev-devel libwayland-client-devel libwayland-cursor-devel mesa-libEGL-devel mesa-libGL-devel mesa-libwayland-egl-devel mesa-libGLES-devel libstdc++-devel cmake libXrandr-devel

5.2 Download the GStreamer* MSDK plugin

Go to https://github.com/01org/gstreamer-media-SDK and download the package to a "development" folder.

5.3 Build and install the plugin

# cd development/gstreamer-media-SDK-master/
# mkdir build
# cd build
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/lib64/gstreamer-1.0/plugins
# make
# sudo make install

5.4 Validate the installation

# gst-inspect-1.0 mfxvpp
# gst-inspect-1.0 mfxdecode
# gst-play-1.0 sample.mkv
# gst-launch-1.0 filesrc location=/path/to/BigBuckBunny_320x180.mp4 ! qtdemux ! h264parse ! mfxdecode ! fpsdisplaysink video-sink=mfxsink

You can go to the following site to download the clip: http://download.blender.org/peach/bigbuckbunny_movies/


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>