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.
3073 Discussions

Problem with second process started from not root user

ANdrey_R_1
Beginner
1,041 Views

 

I compile ffmpeg with qsv supporting (MEDIASDK 2018R1) and try run:

ffmpeg -i sintel_trailer-1080p.mp4 -vcodec h264_qsv -init_hw_device qsv:hw out_qsv.mp4 Twice and more time from root user and is works 

But when i run second process from any other user i have an error 

libva info: VA-API version 1.0.0
open lib: No such file or directory
libva info: va_getDriverName() returns 1
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_1_0
get chip id failed: -1 [13]
param: 4, val: 0
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18          

What does it mean ? How to fix ? 

CentOS Linux release 7.4.1708 (Core)

Linux localhost.localdomain 3.10.0-693.21.1.el7.x86_64 #1 SMP 

libva info: VA-API version 1.0.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_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva )
vainfo: Driver version: 16.8.69021-ubit
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : <unknown entrypoint>
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : <unknown entrypoint>
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : <unknown entrypoint>
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: <unknown entrypoint>
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : <unknown entrypoint> 


export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/
export LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64
export LIBVA_DRIVER_NAME=iHD
export MFX_HOME=/opt/intel/mediasdk

 

0 Kudos
7 Replies
TurtleCrazy
Beginner
1,041 Views

Make sure that the user is a member of the video group. That means, the process  has read and write rights on `/dev/dri/*` devices.

 

0 Kudos
Mark_L_Intel1
Moderator
1,041 Views

Hi Andrey,

I saw the following line in the error message:

"get chip id failed: -1 [13]"

What processor are you using? Note we don't support KabyLake process in Linux.

Mark

0 Kudos
ANdrey_R_1
Beginner
1,041 Views

Liu, Mark (Intel) wrote:

Hi Andrey,

I saw the following line in the error message:

"get chip id failed: -1 [13]"

What processor are you using? Note we don't support KabyLake process in Linux.

Mark

 

Thats problem what first run of ffmpeg it works but on second on any user except root i got this error !

I use i7 6700

0 Kudos
ANdrey_R_1
Beginner
1,041 Views

TurtleCrazy wrote:

Make sure that the user is a member of the video group. That means, the process  has read and write rights on `/dev/dri/*` devices.

Is member because the first run is works !

It happens on any linux and any kernel !

Also some problems with motherboards, i success only with asus z170 

0 Kudos
Mark_L_Intel1
Moderator
1,041 Views

Good, it seems like the missing member of video group also causes device id error. This is a good learning.

Mark

0 Kudos
ANdrey_R_1
Beginner
1,041 Views

Liu, Mark (Intel) wrote:

Good, it seems like the missing member of video group also causes device id error. This is a good learning.

Mark

 

You mean what simple adding user to the video group members is solution ? 

I using command 

usermod -a -G video {username} 

but is not helps ! Second request of ffmpeg giving error listed before.

0 Kudos
Mark_L_Intel1
Moderator
1,041 Views

Hi Andrey,

Sorry for the late response and I might mis-interrupt your question before.

When you got ffmpeg failure under the normal user, could you run sample_multi_transcode?

To run it, download the sample package from here, uncompress it to a local folder, it should have pre-built binary, you should be able to run following command directly:

> sample_multi_transcode -i::h264 <input file> -o::h264 <output file>

I am curious how did you install the package? Which package are you using, Media Server Studio or Media SDK for embedded Linux?

Mark

0 Kudos
Reply