Media SDK: Steps to Install Intel(R) Media SDK in Ubuntu 16.04

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 (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(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 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/

  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. Change directory to MediaServerStudioEssentials2017R2:

    $ cd MediaServerStudioEssentials2017R2

  1. Extract Samples:

    $ tar -zxvf MediaSamples_Linux_2017R2.tar.gz

  1. Change directory to samples in MediaSamples_Linux_2017R2_b634:

    $ cd MediaSamples_Linux_2017R2_b634/samples

  1. Run build.pl:

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

  1. Run make:

    $ make -C __cmake/intel64.make.release

  1. Go to the release folder:

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

  1. Create the output_file:

    $ ./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


Thank you for reading our blog.

Leave a comment below in case of any concerns.

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

5 thoughts on “Media SDK: Steps to Install Intel(R) Media SDK in Ubuntu 16.04”

  1. I actually wanted to write a message so as to thank you for these pleasant techniques you are posting here. My considerable internet search has at the end of the day been honored with good quality knowledge to share with my family members. I ‘d assert that we visitors actually are unequivocally blessed to be in a wonderful community with many special individuals with valuable tips. I feel quite lucky to have come across your entire site and look forward to many more exciting times reading here. Thanks once again for a lot of things.

  2. I must show appreciation to you just for bailing me out of such a condition. Right after researching throughout the internet and meeting strategies which were not powerful, I figured my life was gone. Being alive without the solutions to the problems you have fixed as a result of the short article is a serious case, as well as the kind which could have in a negative way damaged my career if I had not encountered the website. Your main capability and kindness in maneuvering all the pieces was excellent. I don’t know what I would’ve done if I had not come across such a subject like this. I can also at this moment look forward to my future. Thank you so much for the specialized and amazing guide. I will not be reluctant to endorse your web blog to anybody who desires assistance on this problem.

  3. Thank you a lot for giving everyone an extraordinarily memorable chance to read critical reviews from this web site. It can be very cool and packed with a good time for me and my office acquaintances to search your site particularly three times every week to read the fresh guides you have. And indeed, I’m also at all times impressed with your good secrets you serve. Selected 1 ideas in this article are essentially the most suitable we have all ever had.

  4. Thank you so much for providing individuals with remarkably brilliant opportunity to read articles and blog posts from this site. It really is so lovely plus jam-packed with amusement for me personally and my office colleagues to search your web site at the very least thrice a week to learn the latest items you have got. And lastly, we’re usually contented concerning the brilliant knowledge you give. Selected 2 points in this post are definitely the finest I have had.

  5. Thank you for every other informative blog. The place else may just I am getting that type of information written in such an ideal method? I have a project that I’m simply now running on, and I’ve been at the glance out for such info.

Leave a Reply

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