• Sat. May 11th, 2024

Intel® Media SDK in Ubuntu | Steps to Install Intel® Media SDK in Ubuntu 16.04 | QuadBloggers

BySam

Mar 13, 2018 #Intel MSDK
media sdkUbuntu

Intel® Media SDK (Software Development Kit) is a set of libraries 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® Media SDK in Ubuntu 16.04 in a virtual machine (VM) like VMware and Virtual Box.

Note 1: Make sure at least 2 cores are allocated in 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® 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
  2. Download and extract 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/
  3. 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
  4. Remove old install files:
    $ sudo rm -rf /opt/intel/mediasdk
    $ sudo rm -rf /opt/intel/common
    $ sudo rm -rf /opt/intel/opencl
  5. Unpack the generic package:
    $ tar -xvzf intel-linux-media_generic*.tar.gz
  6. 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
  7. 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
  8. 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
  9. Reboot the system.

TO BUILD SAMPLE APPLICATION:

  1. Change directory to MediaServerStudioEssentials2017R2:
    $ cd MediaServerStudioEssentials2017R2
  2. Extract Samples:
    $ tar -zxvf MediaSamples_Linux_2017R2.tar.gz
  3. Change directory to samples in MediaSamples_Linux_2017R2_b634:
    $ cd MediaSamples_Linux_2017R2_b634/samples
  4. Run build.pl:
    $ perl build.pl --cmake=intel64.make.release
  5. Run make:
    $ make -C __cmake/intel64.make.release
  6. Go to the release folder:
    $ cd __cmake/intel64.make.release/__bin/release
  7. Create the output_file:
    $ ./sample_decode h264 -i <input_file> -o <output_file>
  8. By default HW implementation is used. Use -sw flag for SW implementation:
    $ ./sample_decode h264 -i <input_file> -o <output_file> -sw

Thank you for reading our blog.

Leave a comment below in case of any concerns or questions. We love to answer your questions related to the subject.

Also, visit other technology contents here. Do checkout in detail about how to change the default operating system to boot here.

By Sam

Leave a Reply

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