Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_B_2
Beginner
195 Views

Media Server Studio Generic installation

I am wanting to trial the Media Server Studio on Ubuntu.  I am aware this isn't now supported in the 2015 SDK but I have read that I can use the Generic installation to install the Media Server Studio on Ubuntu.  I ran the script to install the generic installation with no errors and rebooted.  I then went on to build the samples with no problem.  The problem I have is that the samples don't work.

Trying the sample_decode_drm I get the following:
 

./sample_decode_drm h264 -i ~/Desktop/MediaServerStudioEssentialsEvaluation2015R3/mediasdk_samples_bin/content/test_stream.264 -hw

Return on error: error code -3,	/home/andy/devel/MediaSamples_Linux_5.0.1604371.71/samples/sample_decode/src/pipeline_decode.cpp	164

Where is this going wrong?

0 Kudos
19 Replies
Jeffrey_M_Intel1
Employee
195 Views

The -3 error can mean a lot of things.  In this context it often means there is a problem communicating with the driver.

Unfortunately the script delivered with generic isn't sufficient. The generic release isn't fully developed yet and needs better automation/documentation.

 

Some things to investigate:

  1. What version of Ubuntu?
  2. What processor are you running on?
  3. What kernel version?  Did you apply the included patches?
  4. Do you see /dev/dri/cardN or /dev/dri/renderDN?
  5. Is the behavior any different as root?

 

For now, basic generic install steps should be something like this.

  1. Unzip the generic package (tar -xzf intel-linux-media-ocl_generic_16.4.1-32088_64bit.tar.gz)
  2. Copy the contents of etc, opt, and usr to /etc, /opt/ and /usr  (destinations, paths, etc. may need to be tweaked depending on your distro)
  3. Rebuild and install libdrm from /opt/intel/mediasdk/opensource/libdrm/2.4.54-32088/libdrm-2.4.54.tar.bz2
  4. Rebuild and install libva from /opt/intel/mediasdk/opensource/libva/1.3.1-staging.20130628.32088/libva-1.3.1.tar.bz2
  5. Download the 3.14.5 kernel from www.kernel.org
  6. Apply the patches from /opt/intel/mediasdk/opensource/patches/kmd/3.14.5/intel-kernel-patches.tar.bz
  7. Reboot

More details on steps 5 and 6:

# get kernel source

$ wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.5.tar.xz
$ tar -xJf linux-3.14.5.tar.xz

#apply patches

$ cp  /opt/intel/mediasdk/opensource/patches/kmd/3.14.5/intel-kernel-patches.tar.bz2 .
$ tar -xvjf intel-kernel-patches.tar.bz2

$ cd linux-3.14.5
$ for i in ../intel-kernel-patches/*.patch; do patch -p1 < $i; done

# build kernel

$ make olddefconfig
$ make -j 8
$ make modules_install
$ make install

 

 

Andrew_B_2
Beginner
195 Views

Thanks - the problem I had was the lack of documentation, your description makes sense now.  I am using Mint(Rebecca) on a Lenovo ideapad with an Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz.  I have followed your instructions and the laptop is now sitting forever in make install after the following log:

Error! Bad return status for module build on kernel: 3.14.5 (x86_64)

I had thought the make install would take no more than 10 minutes and it seems it is doing something but I am unsure if this is meant to 10 minutes or 2 hours.  I will report back when I know more.

Andrew_B_2
Beginner
195 Views

The build of kernel completed after 20 minutes or so, I rebooted and then tried to run one of the samples - I have built the samples before the kernel update.  Unfortunately I still have the same problem.  To answer question 4. and 5.

4. ls /dev/dri/
card0  controlD64  renderD128

5. No difference launching using sudo

I will continue to play around to see what is going on.

Max_L_
Beginner
195 Views

Andrew, still no luck?

 

Andrew_B_2
Beginner
195 Views

Unfortunately not.  I run an example and get the following:

./sample_multi_transcode_drm -i::h264 test_in.h264 -o::h264 test_out.h264 -hw
Multi Transcoding Sample Version 0.0.000.0000

libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
Segmentation fault

Why is it trying to load the i965 driver and not the i915 driver?

Does this help determine the problem?

 

Jeffrey_M_Intel1
Employee
195 Views

I got generic to work in Mint 7.1 (Rebecca) with the procedure above plus the following changes:

1) Remove all versions of libdrm and libva before installing the new ones

2) Set these environment variables in /etc/environment.

LD_LIBRARY_PATH="/usr/local/lib;/usr/lib64"
LIBVA_DRIVER_NAME=iHD                
LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64            

Please note: while the generic path provides a much wider range of options for Linux distributions it is also not as well developed as the "gold" installs for CentOS and SLES.  As such, it is not intended to be supported at the same level.  The basic ingredients are provided for the adventurous who are prepared to work their way through rough edges on their own.  Most importantly: any issues found must be replicable in a "gold" configuration for dev team help, filing bugs, etc.

 
Fu_J_Intel
Employee
195 Views

Hi,

I installed MSS professional 2015 R3 on centos 7.  I can run sample_decode_drm successfully.  But i got the same error msg as above when running ./simple_decode .  libva tries to open i965, not i915?

$ ./simple_decode ./data/in.h264 

libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

 

Lingyi_K_Intel
Employee
195 Views

Hi Fu, the simple_decode comes from MSDK tutorials, right? Did you run it w/ remote session? We met similar issue when running the tutorials w/ SSH and VNC.

Sample_decode_drm is using render nodes at first instead of card0. In tutorials you could try to replace /dev/dri/card0 with /dev/dri/renderD128 in common_vaapi.cpp.

 

Fu_J_Intel
Employee
195 Views

Hi LingYi,

You are right. I was using SSH.

I ran the test again in local. It looks finished OK, but with "seg fault" in the end. Any idea?  Thx, Jeffrey

[fjin2@kswarna-mobl5 _build]$ ./simple_decode data/in.h264 
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0

Execution time: 0.70 s (773.71 fps)
Segmentation fault (core dumped)

 

Surbhi_M_Intel
Employee
195 Views

Hi Fu,

We have got this issue reported recently. Can you try using simple_decode_vmem and check if you don't encounter the same issue? In the meantime we are looking into this problem and will update you. 

Thanks,
Surbhi

Fu_J_Intel
Employee
195 Views

simple_decode_vmem() is fine.  No error show up.

Fu_J_Intel
Employee
195 Views

Hi,

On CentOS 7 with MSS installed, when  running ./sample_decode_drm h264 -i ../content/test_stream.264 -r  I feel 2 possible issues:

  1. no video displayed

  2. Memory type    is    d3d.  Does "d3d" mean windows OS?

[fjin2@kswarna-mobl5 x64]$ ./sample_decode_drm h264 -i ../content/test_stream.264 -r
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Decoding Sample Version 5.0.1604371.71


Input video    AVC 
Output format    YUV420
Resolution    176x96
Crop X,Y,W,H    0,0,0,0
Frame rate    30.00
Memory type        d3d
MediaSDK impl        hw
MediaSDK version    1.13

Decoding started
Frame number:  101, fps: 5976.331, fread_fps: 0.000, fwrite_fps: 0.000
Decoding finished

Zeshan_A_
Beginner
195 Views

Hi ,

i got the error , when i run sample

/Media_server/mediasdk-tutorials-0.0.3/_build$ ./simple_decode_vmem  test_stream.264
./simple_decode_vmem: /usr/lib/x86_64-linux-gnu/libva.so.1: no version information available (required by ./simple_decode_vmem)
libva: VA-API version 0.32.0
libva: User requested driver 'iHD'
libva: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva: va_openDriver() returns 5
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Abgebrochen (Speicherabzug geschrieben) //  program break,

regards,

Zeshan

Surbhi_M_Intel
Employee
195 Views

Hi Zeshan, 

Can you please tell us more about the system like CPU info, GPU, OS and which Media Server Studio version are you trying to install?
Also, have you followed the steps mentioned in the getting started guide for the installation?

I would suggest you to test the installation using samples which comes in the package and make sure they work well to verify the installation. 

Also, check the 4th question in FAQ for the smoke test to verify installation
Q. How can I check if Media Server Studio is installed correctly for my OS?

For Linux, review the Getting Started Guide on how to install Media Server Studio for CentOS and SLES. To check if the install process was successful, here are some tests to help identify issues. (The output of these commands should match the ones provided in the Guide)

uname –ar
Ensure you are booted into the correct kernel. The following command should return the kernel with "MSSrN" in the ID (where N is the release number).

lspci –nn | grep VGA
Check if the Intel® Integrated Graphics is being recognized by the PCI on VGA

lsmod | grep i915 
Check if the i915 DRM module is installed

When running samples or tutorials applications, please use the drm module. Also ensure that you run them as root (not sudo, but root). To work around this, review the article Using drmserver with Media SDK for Linux Servers Applications.

Please let us know all the info requested above for us to debug the issue. 

Thanks,
Surbhi

Zeshan_A_
Beginner
195 Views

Thank you Surbhi for your useful guide,

i installed the media server on non-supported version of OS (Ubuntu 14.04 ).

But, now i switched to Beignet ( https://01.org/beignet ) for OpenCl run on Intel HD graphics. 

OpenCL sample code run quite well . i hope so it's  a good solution for Ubuntu User.

your recommendation will be use full if you have any alternative solution.

Regards,

Zeshan

 

 

Jiandong_Z_Intel
Employee
195 Views

#!/bin/sh

echo "Modify file for ubuntu ..."
find -name "*.pc" | xargs sed -i 's|lib64|lib/x86_64-linux-gnu|g'

# if using MSS version less than R6, please uncomment this.
#sed -i 's|lib64|lib/x86_64-linux-gnu|g' etc/OpenCL/vendors/intel.icd

echo "Remove old MSS install files ..."
sudo rm -rf /opt/intel/mediasdk
sudo rm -rf /opt/intel/common
sudo rm -rf /opt/intel/opencl

# remove old libdrm and libva
find /usr -name "libdrm*" | xargs sudo rm -rf
find /usr -name "libva*" | xargs sudo rm -rf

echo "Install MSS files ..."
sudo cp -rdf opt/* /opt/
sudo cp -rdf etc/* /etc/

sudo cp -rdf usr/bin/*     /usr/bin/
sudo cp -rdf usr/include/* /usr/include/
sudo cp -rdf usr/lib64/*   /usr/lib/x86_64-linux-gnu/
sudo cp -rdf usr/share/*   /usr/share


echo "Install finished, please reboot ..."

Hi Zeshan,

This script is a reference for install MSS UMD on Ubuntu.  You can use this script  instead of  install_media.sh in MSS "Generic" package.

./simple_decode_vmem: /usr/lib/x86_64-linux-gnu/libva.so.1: no version information available (required by ./simple_decode_vmem)

This error show us ./simple_decode_vmem is not using the correct libva versions. /usr/lib/x86_64-linux-gnu/libva.so.1 not from MSS install package, but from Ubuntu system build-in.

64 bit library default path:
Centos/SUSE: /usr/lib64/
Ubuntu: /usr/lib/x86_64-linux-gnu/

For using OpenCL in MSS on Ubuntu you need to upgrade KMD to 3.14.5 like #2 said.

Best Regards,

Zachary

 

zhang_m_
Beginner
195 Views

Hi.

I installed media sdk 2014 for unbuntu 14.04 .There are no errors .  I  builded  the samples with no problem.  The problem I have is that the samples don't work.

Samples of encoding and decoding have same errors.That is:

sts = m_mfxSession.Init(MFX_IMPL_SOFTWARE, &min_version);

    MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

This returns error.why?can you tell me how to install sdk for unbuntu14.04 in more detail?thank you very much.

 

Shaojuan_Z_Intel
Employee
195 Views

Hi Zhang,

Could you let us know your system configuration? For installation in Ubuntu, did you follow the generic steps in getting_started_guide.pdf? Did you verify if Media Server Studio was installed correctly? Also, is there any particular reason you want to install Media SDK 2014 instead of the latest 2015 version? Thanks.

 

195 Views

Hi Zhang - Can you please start a new thread for your question? It will be easier for us to keep track and respond.

Reg you question, the steps listed above are relevant for MSS 2015 R6 and thats the MSDK version we are supporting. MSDK 2014 is very old and the support for it has been removed. Could you please update to latest MSS and follow install steps for Ubuntu listed by Zachary? (Let us know if you need more help and we can share some documentation). You can find the latest MSS for download here (for free, community edition) - https://software.intel.com/en-us/intel-media-server-studio/try-buy

One more thing - SW implementations of AVC or codecs were not supported previously on Linux. Only recently (MSS R5) did we add SW library support in Linux. Also why you are possibly seeing the error.

Also, please start a new thread for any further questions - will be very helpful.

Reply