Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Media SDK 2015 R2 CentOS Sample Codes

NAves
Novice
458 Views

Hi

Installed MSDK 2015R2, Preview Evaluation 16.4,  on Centos 7, 3.10.0-123.el7.x86_64, with Intel(R) Core(TM) i7-4760HQ CPU @ 2.10GHz. While trying to run the sample transcode example, I am getting the follwing error:

$ sudo ./sample_multi_transcode_drm -i::h264 ~/Ubuntu/home/navesta/Videos/Parkjoy_1080p50_1920x1080.h264 -o::h264 ~/Video/tes.h264 -hw
Multi Transcoding Sample Version 5.0.1604227.27

libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

lsmod returns the following:

$ lsmod | grep 'i915'
i915                  710975  5 
i2c_algo_bit           13413  1 i915
drm_kms_helper         52758  1 i915
drm                   297829  4 i915,drm_kms_helper
i2c_core               40325  6 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,videodev
video                  19267  1 i915

 

Did I miss a step?

Cheers,

 

 

 

0 Kudos
6 Replies
Sravanthi_K_Intel
458 Views

Hello there

Looking at the driver that is being picked up "/usr/lib64/dri/i965_drv_video.so", if the install worked properly and all the variables are set correctly, it should pick the driver from /opt/intel/mediasdk/lib64/iHD_drv_video.so.

Can you please given some details on your install process? Your path to input reads "~/Ubuntu" while you are on CentOS - are you working on Ubuntu or mounted Ubuntu?

Also, after install process, did you reboot into the correct kernel?

0 Kudos
NAves
Novice
458 Views

Hi Sravanthi

It's a dual boot system and I am booting into CentOS, it just so happens that clips are under Ubuntu partition, as I am testing both distros. Tried setting LD_LIBRARY_PATH to /opt/intel/mediasdk/lib64, but it did not make a difference. Here is what I did:

From SDK2015PreviewEvaluation16.4 directory

  1. ./install_sdk_UMD.sh
  2. ./install_KMD.sh
  3. reboot
  4. Copied over mfxhei.h to /opt/intel/mediasdk/include
  5. perl build.pl --cmake=intel64.make.release -build

Here is the kernel version and distro

$ uname -ar
Linux 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

Any thoughts?

Cheers,

0 Kudos
Sravanthi_K_Intel
458 Views

The uname -ar command is showing the wrong kernel. On my installation, it shows 3.10.0MSSr2 kernel, which is what we expect to see if the install_KMD_CentOS.sh script ran to completion successfully. You can actually see that we replace the kernel name using "sed" command in the install file (line 42).

Can you please re-run the install scripts and re-check your uname -ar command output after reboot into the correct kernel (3.10.0MSSr2)?

0 Kudos
NAves
Novice
458 Views

Hi Sravanthi

Thank you for pointing out the mismatched kernel, seems there was a conflict between Ubuntu and CentOs grub2. Did steps 1-3 and 5 from above, and booted to Intel kernel; however, still having the same problem:

[navesta@dhcp-161-44-210-82 x64]$ sudo ./sample_encode_drm h264 -hw -i ~/Ubuntu/home/navesta/Videos/Parkjoy_1080p50_1920x1080.yuv -o ~/Videos/test1.h264 -w 1920 -h 1080 -b 3000
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[navesta@dhcp-161-44-210-82 x64]$ uname -ar
Linux dhcp-161-44-210-82.cisco.com 3.10.0MSSr2 #1 SMP Wed Nov 26 15:55:15 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

Perhaps it is worth mentioning again that that I am try this in the Preview version and not the Production version if that makes a difference.

Cheers,

0 Kudos
NAves
Novice
458 Views

So I cheated: ln -s /opt/intel/mediasdk/lib64/iHD_drv_video.so /usr/lib64/dri/i965_drv_video.so. (i965 did not exists in my system.)

Any recommendations on H265 encode -async value?

Cheers,

0 Kudos
Sravanthi_K_Intel
458 Views

Hello Nastooh,

Happy New Year!

Sorry for the delayed response - this thread skipped my view. First, we have released the R3 version of Media Server Studio for Linux and Windows. I would highly recommend you update to the latest release since the performance (for HEVC in particular) has made very good progress.

Regarding async value, there is no magic number that works the best. Based on the system, we experiment with a sweep ranging from async depth of 1 all the way to 16 and pick the depth with best performance. In my experiments on the Brix (i7-4770), async depth of 5-8 gave me the best performance saturating at 8. (This was on HD resolution). Hope this helps.

0 Kudos
Reply