Media Server Studio Getting Started Guide
Media Server Studio Getting Started Guide
Overview
For the most up to date version of this guide please refer to “Getting Started Guide –
Linux* Installation” on the Intel® Media Server Studio Support documentation page.
https://software.intel.com/sites/default/files/media_server_studio_getting_started_g
uide.pdf
Intel® Media Server Studio 2017 R2 for Linux* provides software development
tools and libraries needed to develop enterprise grade media solutions on Intel®
server products.
This document covers installing the package components, which include source code,
libraries, user mode graphics stack components, and kernel module patches.
A set of simplified examples which can be used to validate the install can be found
under Intel® Media Server Studio Product Page-> Support -> Code Samples ->
Tutorials Package.
As multiple installation layouts are possible, we provide file paths relative to the
folder where intel-linux-media_<os>_<version>_64bit.tar.gz package is
unpacked.
Installation Procedure
IMPORTANT NOTE: The installation procedure for this release is different than
previous installations. This product is a combination of driver, library, and
graphics stack components requiring specific hardware, Linux* distributions, and
kernel versions.
For Intel® Media Server Studio 2017, there is a new Gold OS and a new approach to
installing kernel updates. Supported processors also change from Intel® Media
Server Studio 2016.
Double check the processor on your system with “cat /proc/cpuinfo” before starting.
This release supports 6th Generation Intel® Core™ processors (formerly “Skylake”)
with integrated graphics. It also covers 5 th Generation Intel® Core (formerly
“Broadwell”). Note: 4th Generation Core™ and earlier processors are not supported
by Media Server Studio 2017 R2.
*Other names and brands may be claimed as the property of others.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 1 of 16
Please consult this article and the release notes for more background and details.
This release is validated with CentOS 7.2.1511 using patches to its default
kernel (3.10.0-327.13.1.x86_64), referred as “Gold”. A “Generic” option based on
the 4.4.0 kernel from www.kernel.org is also available.
Please note: 7.2.1511 is no longer the most recent CentOS 7 release, and is not the
default download from www.centos.org. For a "Gold" configuration please use
CentOS 7.2 from http://vault.centos.org/7.2.1511/isos/x86_64/. Other
distributions, including newer versions of CentOS, can be used with "Generic"
installation mode but cannot be considered "Gold".
Prerequisite Steps
Add the user(s) who will run Intel® Media Server Studio – SDK applications to the
video group
The command output above shows 193b as the graphics device ID. The ID reported
by lspci may be different for your machine. The main thing to look for is that an
Intel graphics adapter is available. If not, you may need to check your BIOS settings
and hardware configuration.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 2 of 16
Make sure that proxies, network connections, firewalls, etc. are set up to allow yum
and wget to download packages.
Please note: 7.2.1511 is no longer the most recent CentOS 7 release, and is not the
default download from www.centos.org. For a "Gold" configuration please use
CentOS 7.2 from http://vault.centos.org/7.2.1511/isos/x86_64/. Other
distributions, including newer versions of CentOS, can be used with "Generic"
installation mode but cannot be considered "Gold".
Important Note: It appears that CentOS has a bug in mirrorlist backend which
requires manual edit of /etc/yum.repos.d/CentOS-Base.repo file. Correct
installation procedure requires commenting out mirrorlist lines and uncommenting
baseurl lines. Like:
#mirrorlist=http://mirrorlist.centos.org/?release=\$releasever&ar
ch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 3 of 16
Note: you may see several warnings from depmod about “needs unknown symbol”.
This is from a step intended to remove previous installs and does not indicate that
anything is missing from the current install. These warnings can be ignored.
“Generic” Steps
The commands below show the steps to install using the Generic approach in the
Gold CentOS 7.2.1511 environment. These steps may need to be modified for other
configurations. For a version of the script ready to cut and paste as well as info for
other distros see https://software.intel.com/en-us/articles/how-to-setup-media-
server-studio-on-secondary-os-of-linux.
#!/usr/bin/bash
# install prerequisite packages
yum -y -t groupinstall "Development Tools"
yum -y -t 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
GENERIC_KERNEL_SRC=linux-4.4.tar.xz
GENERIC_KERNEL_WEB_PATH=http://www.kernel.org/pub/linux/kernel/v4.x
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 4 of 16
if [ ! -f ./$GENERIC_KERNEL_SRC ]; then
echo -e "Failed to get $GENERIC_KERNEL_SRC, please try download it
manually from $GENERIC_KERNEL_WEB_PATH, put it same folder as this
script, then run this script again." 1>&2
exit 1
fi
cp /opt/intel/mediasdk/opensource/patches/kmd/4.4/intel-kernel-
patches.tar.bz2 .
cd linux-4.4
for i in ../intel-kernel-patches/*.patch; do patch -p1 < $i; done
make olddefconfig
make -j 8
make modules_install
make install
The Linux Intel(R) SDK for OpenCL(TM) applications components, including drivers,
may be updated in separate standalone releases. Steps are similar to above, but
may diverge occasionally. Instructions on how to install these standalone versions
are included with those releases. Please note – these standalone releases are not
intended to be compatible with Media SDK.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 5 of 16
$ ls /opt/intel/mediasdk/
builder doc include lib lib64 opensource plugins samples tools
The vainfo utility should show the current driver, Media SDK's iHD (from
/opt/intel/mediasdk) and several codec entry points.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 6 of 16
Transcoding started
Transcoding finished
Samples are longer, more complex, and their main purpose is to show a broad range
of the capabilities in Media Server Studio. Tutorials are shorter, clearer, and
intended to be starting points for understanding how to develop code with the SDK.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 7 of 16
The tutorials are intended to be simple and clear starting points. They are built with
standard makefiles. By default executables can be found in the _build directory.
Note: example programs in the tutorials package are suitable for SDK API study
only. It has limited functionality and were not intended for any kind of SDK and
media stack validation.
The Intel® Media SDK samples are built with a recent version of CMake*. This can be
downloaded from www.cmake.org or installed via standard package management.
To install samples prerequisites in CentOS 7.2.1511:
To build, make sure $MFX_HOME is set to the directory corresponding to your build
(by default /opt/intel/mediasdk) then type
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 8 of 16
The build.pl script will only build samples if the prerequisites can be found. For most
cases only libdrm is needed. If X11 is not installed the _x11 samples will not be built.
To test OpenCL:
The CapsBasic sample prints OpenCL query results for your system, and makes an
excellent smoke test.
Some OpenCL examples are included in the Media Server Studio samples package.
They are not built with cmake like the other samples. These samples illustrate use of
the vector motion estimation (VME) extensions.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 9 of 16
Please note: Intel® Media Server Studio 2017 is only fully validated against a
CentOS7.2 “Gold” environment with all ‘Runtime’ and ‘Devel’ libraries installed.
Rebuilding libva requires Media SDK ‘Devel’ libraries from a Gold install as well as
other prerequisites.
The script below builds Libva with only DRM support. This script should be run on
development system. The file will build required libraries and copy to compressed
folder libva_1.67.0.pre1.tar.gz in the /tmp/ directory
#!/bin/bash
cd /opt/intel/mediasdk/opensource/libva/1.67.0.pre1-*/
tar -xjvf libva*
cd libva-*
./configure --enable-x11=no --enable-glx=no --enable-egl=no --enable-
wayland=no --disable-static --prefix=/usr --libdir=/usr/lib64/
make clean
make
cd va/.libs/
tar -czvf /tmp/libva_1.67.0.pre1.tar.gz libva*.so*
Step 4: Copy the following rpms and tar files to target system
*Other names and brands may be claimed as the property of others.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 10 of 16
Run the following script to install ‘runtime’ libraries on your target system
#!/usr/bin/bash
#install Media Server Studio packages
rpm -Uvh \
intel-i915-firmware-16.5.1-*.el7.x86_64.rpm \
intel-linux-media-16.5.1-*.el7.x86_64.rpm \
libdrm-2.4.66-*.el7.x86_64.rpm \
intel-opencl-r4.0-*.x86_64.rpm \
intel-opencl-cpu-r4.0-*.x86_64.rpm
tar -xvf libva_1.67.0.pre1.tar.gz -C /usr/lib64
#install kmod-ukmd
echo "Installing kmod-ukmd-$MILESTONE_VER-$BUILD_ID..."
rpm -ivh kmod-ukmd-16.5.1-*.el7.x86_64.rpm
This section is intended to help identify the minimal set of libraries and dependencies
required on a production system.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 11 of 16
Runtime
libX11
libXext
libXfixes
mesa-dri-drivers
Devel
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 12 of 16
Util/sample
libva libXext
libXfixes
CentOS 7.2 minimal install includes all fundamental dependency libraries by default.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 13 of 16
libpciaccess Library is included in the CentOS7.2 minimal install therefore all internal
and direct dependencies of libdrm libraries are met on CentOS7.2.
Libva
• mesa-libGL
• libX11
• libXext
• libXfixeslibraries
libva-x11 is not required for general media transcoding applications as Libva uses
DRM interface. Rebuilding Libva with only DRM support will eliminate dependency
requirement on all four direct external dependencies listed above. To rebuild Libva
with only DRM support see section “CentOS 7.2 Intel® Media Server Studio “Gold”
minimum install steps”
Media SDK uses Libva DRM backend interface only. Where Libva is built with only
DRM enabled no external dependencies are required
kmod-ukmd
Legal Information
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 14 of 16
Intel may make changes to specifications and product descriptions at any time,
without notice. Designers must not rely on the absence or characteristics of any
features or instructions marked "reserved" or "undefined." Intel reserves these for
future definition and shall have no responsibility whatsoever for conflicts or
incompatibilities arising from future changes to them. The information here is subject
to change without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known
as errata which may cause the product to deviate from published specifications.
Current characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest
specifications and before placing your product order.
Copies of documents which have an order number and are referenced in this
document, or other Intel literature, may be obtained by calling 1-800-548-4725, or
by visiting Intel's Web Site.
VP8 video codec is a high quality royalty free, open source codec deployed on
millions of computers and devices worldwide. Implementations of VP8 CODECs, or
VP8 enabled platforms may require licenses from various entities, including Intel
Corporation.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 15 of 16
Optimization Notice
Intel's compilers may or may not optimize to the same degree for non-Intel
microprocessors for optimizations that are not unique to Intel microprocessors.
These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other
optimizations. Intel does not guarantee the availability, functionality, or effectiveness
of any optimization on microprocessors not manufactured by Intel.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Page 16 of 16