Steps to Install Intel(R) Media SDK in Ubuntu 16.04 (Without Patching Kernel)

INTEL® MEDIA SDK for Ubuntu 16.04 in Virtual Machine

Intel® Media SDK (Software Development Kit) is a set of libraries used for decoding video formats into frames (.yuv files).

It uses hardware (HW) or software (SW) implementation.

For HW implementation, access to Intel’s integrated graphics should be possible.

If HW implementation is not possible, SW implementation can be used.

Media SDK (MSDK) helps to reduce the time required for decoding a video so that decoded frames can be synced with audio (decoded separately) to get the required output file.

Here let’s discuss about setting up Intel® MSDK in Ubuntu 16.04 in a virtual machine like VMware and Virtual Box.

Note 1: Make sure at least 2 cores are allocated in virtual machine (VM).

Note 2: If host of VM is Windows, it is not possible to access GPU from VM. So only SW implementation is used.




 

===================================================================================================================================

STEPS TO INSTALL INTEL(R) MEDIA SDK IN UBUNTU 16.04 (WITHOUT PATCHING KERNEL)

===================================================================================================================================

 

___________________________________________________________________________________________________________________________________

 

SYSTEM REQUIREMENTS:

___________________________________________________________________________________________________________________________________

 

  1. Perl* v5.16+    (sudo apt install perl)
  2. Cmake* v2.8+    (sudo apt install cmake)
  3. GCC* v4.8+    (sudo apt install gcc)

 

___________________________________________________________________________________________________________________________________

 

STEPS TO INSTALL REQUIRED PACKAGES AND MEDIA SDK:

___________________________________________________________________________________________________________________________________

 

 

  1. Install wget.

 

$ sudo apt update

$ sudo apt install wget

 

  1. Download and unpack installation package

 

$ wget http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/11167/MediaServerStudioEssentials2017R2.tar.gz

$ tar -zxvf MediaServerStudioEssentials2017R2.tar.gz

$ tar -zxvf MediaServerStudioEssentials2017R2/SDK2017Production16.5.1.tar.gz

$ cd SDK2017Production16.5.1/Generic/

 

  1. Remove other libdrm/libva

 

$ sudo apt remove libva1 libva-drm1 libva-dev –purge

$ sudo find /usr -name “libdrm*” | sudo xargs rm -rf

$ sudo find /usr -name “libva*” | sudo xargs rm -rf

 

  1. Remove old install files

 

$ sudo rm -rf /opt/intel/mediasdk

$ sudo rm -rf /opt/intel/common

$ sudo rm -rf /opt/intel/opencl

 

  1. Unpack the generic package

 

$ tar -xvzf intel-linux-media_generic*.tar.gz

 

  1. Put the generic components in standard locations

 

$ sudo /bin/cp -r etc/* /etc

$ sudo /bin/cp -r lib/* /lib

$ sudo /bin/cp -r opt/* /opt

$ sudo /bin/cp -r usr/* /usr

 

  1. Ensure that proper LD_LIBRARY_PATH and PACKAGE_CONFIG are set

 

$ sudo -i

$ echo ‘LD_LIBRARY_PATH=”/usr/lib64:/usr/local/lib:/opt/intel/mediasdk/lib64″‘ >> /etc/environment

$ echo ‘LIBVA_DRIVER_NAME=iHD’ >> /etc/environment

$ echo ‘LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64’ >> /etc/environment

$ echo ‘PKG_CONFIG_PATH=/usr/lib64/pkgconfig’ >> /etc/environment

 

  1. Ensure that new libraries can be found

 

$ echo ‘/usr/lib64’ > /etc/ld.so.conf.d/libdrm_intel.conf

$ echo ‘/usr/local/lib’ >> /etc/ld.so.conf.d/libdrm_intel.conf

# Exit from root mode by pressing ctrl+d

$ sudo ldconfig

 

  1. Reboot the system.

 

___________________________________________________________________________________________________________________________________

 

TO BUILD SAMPLE APPLICATION:

___________________________________________________________________________________________________________________________________

 

  1. $ cd MediaServerStudioEssentials2017R2

 

  1. Extract Samples

 

$ tar -zxvf MediaSamples_Linux_2017R2.tar.gz

 

  1. $ cd MediaSamples_Linux_2017R2_b634/samples

 

  1. $ perl build.pl –cmake=intel64.make.release

 

  1. $ make -C __cmake/intel64.make.release

 

  1. $ cd __cmake/intel64.make.release/__bin/release

 

  1. $ ./sample_decode h264 -i <input_file> -o <output_file>

 


    1. By default HW implementation is used. Use -sw flag for SW implementation.$ ./sample_decode h264 -i <input_file> -o <output_file> -sw

 

 

#############################################################################################################################

Do follow us on facebook and visit our website for more blogs.

Website:www.worldyouknow.com

Facebook:https://www.facebook.com/Worlduknw/?ref=bookmarks

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *