Installing and Running Intel Media SDK 2014 R2 for Servers on Linux

Legal Disclaimer

Contents-

1. Introduction

2. System Requirements

3. Installation

4. Execute a Sample

5. Summary


Introduction

This tutorial will guide you through the installation of Intel® Media SDK 2014 R2 for Servers on Linux and help you get started with developing media applications using some of our example code. Intel® Media SDK 2014 R2 for Servers enables development of media applications on both Linux and Windows OS, which can be optimized for the underlying hardware acceleration logic. To this end, the SDK provides some basic media functionality such as encode, decode and transcode functionality in form of samples.

System Requirements

Before you begin the installation process, please ensure your system meets the following requirements:

  • HW: Intel Xeon® processor E3-1200 v3 product family and 4th Generation Intel Core™ Processor-based Platforms with Intel Iris™ Pro and Intel HD Graphics
  • OS: Ubuntu*, SUSE* Linux Enterprise
  • Kernel requirements for Ubuntu* 12.04 Server (Note: For SUSE* Linux Enterprise Server 11, the default kernel is correct) - For Ubuntu* 12.04 Server, specific kernel is required to match the drm/i915 module in the release.
    • For 3rd Generation Intel Core™ Processors, install this set of kernel and headers
      apt-get install linux-image-3.2.0-41-generic
      linux-headers-3.2.0-41-generic
    • For Intel® Xeon® E3-1285/E3-1286 v3 and 4th Generation Intel Core™Processors, install kernel and headers as follows 
      apt-get install linux-image-3.8.0-23-generic
      linux-headers-3.8.0-23-generic
  • Intel Media SDK for Linux Servers comes with a customized libdrm. To avoid conflicts please remove any other versions of libdrm from the system. Where this cannot be done through regular package management commands, this can be accomplished as below
     
    $ sudo find /usr –name ‘libdrm*’ (check files to remove)
    $ sudo find /usr –name ‘libdrm* -exec rm –rf {} \;

     

Installation

Please download the Intel Media SDK for Linux Server from it's web page. It will be a compressed zip file "MediaSDK2014R2LinuxServersEvaluation". After you extract the contents of this folder, you will find multiple compressed files, each corresponding to a  processor architecture. Here, extract the file that corresponds to your system.(Note: The "mediasdk_getting_started_guide.pdf" in the parent folder also has instructions on the installation process).


Once you have the right files according to your system requirements, you can complete the installation by running the install_media.sh shell script in the terminal (shown below). Once the installation completes, you will see "Package Installation Done." message.

 



 

More information about the installation is present in "mediasdk_getting_started_guide.pdf" which comes in the package. To build the samples that are packaged in the SDK, you will need to download and install CMake, which is an open source software for managing build process of the software. 



Execute a Sample

Now that we are done with the installation part, let us go ahead and see how to use the SDK to build and run media applications. To ease your introduction, Intel® provides sample applications that use the Intel® Media SDK framework to perform media operations. These samples are a great introduction to how-to-use the SDK. You can find the samples in the samples/ folder in the SDK path.

To run the samples, we would require media file(s) as an input. One of the websites from where you can download these streams ( distributed under Create Commons license) is here. Note that you need to provide elementary video streams as input and not in a container form. So, once you download the media file, you can use software tools such as ffmpeg to extract the raw streams.

Below is an example of extracting raw streams using ffmpeg.  Here we are extracting the video stream out.h264 from input stream in.mp4.

ffmpeg -i in.mp4 -vcodec copy -bsf h264_mp4toannexb -f h264 out.h264

You can find more details about ffmpeg over here.

Now, let us build and execute use the sample_decode sample. For the build process, you will require CMake. If you do not already have it, download and install CMake. You can find the build.pl script in the samples folder.

sudo perl build.pl --cmake=intel64.make.release --build

This will generate an executable in the <path_to_samples>/__cmake/intel64.make.release/__bin/release

 

You can now run the executable as follows. The "-hw" option executes the sample on the underlying hardware. Other flags are self-explanatory - "-i" precedes the input file, "-o" precedes the output file. Apart from these, there are other options a user can control. You can find them in the help when you execute "sample_decode_drm" without any parameters.

sample_decode_drm h264 -i in.h264 -o output.yuv -hw

 

It will decode the frames and will give an output.yuv file which can be played through YUVplayer.



Summary

This article guided you through installing and executing a sample with Intel® Media SDK for Linux Server. We encourage you to try the other samples available in the package. Please go through the documentation and tutorials on the Media Solution Portal page as a next step. Also use forums to post and participate in discussions related to the SDK.

 

For more complete information about compiler optimizations, see our Optimization Notice.