Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Linux media sdk as root

Brian_P_2
Beginner
202 Views

I am working to integrate the media sdk into a streaming video application that runs under linux. Does the sdk have to be initialized in an application run as root? When I try to use it as a non-root user the vaInitialize call in DRMLibVA constructor fails. I have ruled out environment variables by setting  any missing ones for the non-root user.

thanks,

bfp

0 Kudos
2 Replies
Jeffrey_M_Intel1
Employee
202 Views

Media SDK itself does not require you to be root.  However, this can happen from time to time due to permissions in the libva/DRM stack.  One of the most common causes is permissions on /dev/dri/card0. Does changing the permissions here or adding yourself to the video group help? 

Brian_P_2
Beginner
202 Views

I have already  chmod'ed 666 /dev/dri/card0. To get things to work I found that I had to copy the XAUTHORITY environment variable from root user and give that database 666 permissions. I also had to set a DISPLAY environemnt variable.

I noticed that I needed to do these steps to get vainfo to work. Once that was working I could use the media sdk as non-root user.

I am confused as to why X window envirionment settings appear to be necessary to get the media sdk functioning when I am using DRM mode. Can you shed any light on the architecture?

thanks,bfp

Reply