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

Sample_encode_x11 run twice, the same command first successful, the second error, error contents -7

崇龙_战_
Beginner
332 Views

Hi

 I installed the intel media sdk R6 version on ubuntu, ubuntu is 14.04.3

uname -a

Linux suirui 3.19.0-25-generic # 26 ~ 14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU / Linux

I installed documentation generic way to install and compile the sample MediaSamples_Linux_6.0.16043175.175, produced sample_encode_x11 bin file, and then I use the command ./sample_encode_x11 h264 -i test_stream_176x96.yuv -o 3.264 -w 176 -h 96 -vaapi

First run properly, resulting in a h264 file

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
Encoding Sample Version 0.0.000.0000

Input file format YUV420
Output video AVC
Source picture:
        Resolution 176x96
        Crop X, Y, W, H 0,0,176,96
Destination picture:
        Resolution 176x96
        Crop X, Y, W, H 0,0,176,96
Frame rate 30.00
Bit rate (Kbps) 112
Target usage balanced
Memory type d3d
Media SDK impl hw
Media SDK version 1.16

Processing started
Frame number: 101
Processing finished

 

The same command being given a second time

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
Encoding Sample Version 0.0.000.0000

Input file format YUV420
Output video AVC
Source picture:
        Resolution 176x96
        Crop X, Y, W, H 0,0,176,96
Destination picture:
        Resolution 176x96
        Crop X, Y, W, H 0,0,176,96
Frame rate 30.00
Bit rate (Kbps) 112
Target usage balanced
Memory type d3d
Media SDK impl hw
Media SDK version 1.16

Processing started

Return on error: error code -7, /home/suirui/MediaSamples_Linux_6.0.16043175.175/samples/sample_encode/src/pipeline_encode.cpp 1212

Return on error: error code -7, /home/suirui/MediaSamples_Linux_6.0.16043175.175/samples/sample_encode/src/pipeline_encode.cpp 1367

Return on error: error code 1, /home/suirui/MediaSamples_Linux_6.0.16043175.175/samples/sample_encode/src/sample_encode.cpp 678

The third re-run the command normal again, I checked the error, is MFX_ERR_LOCK_MEMORY, is what causes?

I suspect that is not caused by the kernel version, The documentation requirement is 3.14.5, but my version is 3.19.0-25

0 Kudos
4 Replies
Jiandong_Z_Intel
Employee
332 Views

Hi There,

First, I want to get more details about the issue, Can you send the following command line to me when the error happened ?

(only add strace to head of your command line)

$ strace  ./sample_encode_x11 h264 -i test_stream_176x96.yuv -o 3.264 -w 176 -h 96 -vaapi

Second, please send outputs of following command lines for better understand your environment.

$ vainfo

$ ls -l /dev/dri

$ lspci -nn | grep VGA

Third, Currently MSS R6 generic package support kernel 3.14.5,  Maybe you should update your kernel following "KMD (kernel mode driver) install steps" in media_server_studio_getting_started_guide.pdf

  

Thanks

Zachary

 

0 Kudos
崇龙_战_
Beginner
332 Views

 

Thank you very much

     As you say the way

   first  strace  ./sample_encode_x11 h264 -i test_stream_176x96.yuv -o 3.264 -w 176 -h 96 -vaapi 

   I get the result 

 
477230 strace  ./sample_encode_x11 h264 -i test_stream_176x96.yuv -o 3.264 -w 176 -h 96 -vaapi 
 
I get the result
 
 
then vainfo 
 
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
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: 16.4.2.1.39163-ubit
vainfo: Supported profile and entrypoints
VAProfileNone                   :    VAEntrypointVideoProc
VAProfileNone                   :    <unknown entrypoint>
VAProfileMPEG2Simple            :    VAEntrypointEncSlice
VAProfileMPEG2Simple            :    VAEntrypointVLD
VAProfileMPEG2Main              :    VAEntrypointEncSlice
VAProfileMPEG2Main              :    VAEntrypointVLD
VAProfileH264Baseline           :    VAEntrypointEncSlice
VAProfileH264Baseline           :    <unknown entrypoint>
VAProfileH264Baseline           :    <unknown entrypoint>
VAProfileH264Main               :    VAEntrypointVLD
VAProfileH264Main               :    VAEntrypointEncSlice
VAProfileH264Main               :    <unknown entrypoint>
VAProfileH264Main               :    <unknown entrypoint>
VAProfileH264High               :    VAEntrypointVLD
VAProfileH264High               :    VAEntrypointEncSlice
VAProfileH264High               :    <unknown entrypoint>
VAProfileH264High               :    <unknown entrypoint>
VAProfileVC1Simple              :    VAEntrypointVLD
VAProfileVC1Main                :    VAEntrypointVLD
VAProfileVC1Advanced            :    VAEntrypointVLD
VAProfileJPEGBaseline           :    VAEntrypointVLD
VAProfileJPEGBaseline           :    VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
VAProfileVP8Version0_3          :    VAEntrypointEncSlice
VAProfileVP8Version0_3          :    VAEntrypointVLD
VAProfileVP8Version0_3          :    <unknown entrypoint>
 
$ ls -l /dev/dri
总用量 0
crw-rw----+ 1 root video 226,   0  9月  9 15:27 card0
crw-rw----  1 root video 226,  64  9月  9 15:27 controlD64
crw-rw----  1 root video 226, 128  9月  9 15:27 renderD128
 
 
$ lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1626] (rev 09)
 
 

Since NUC5i5RYK I use, it's graphics are HD 6000, kervel version 3.14.5 does not support, so is the use ubuntu 14.04.3, it kernerl version is 3.19.0-25

I was using  another four generations of NUC, try 3.14.5.

 
 
 
 
 
 
0 Kudos
Jiandong_Z_Intel
Employee
332 Views

Hi ,

Can you test with ./sample_encode_drm  instead of ./sample_encode_x11  ? Let's see if the same issue happened.

About " it's graphics are HD 6000, kervel version 3.14.5 does not support", How do you verify this ?

Do you meet some issues when using build and setup kernel 3.14.5  on NUC5i5RYK ?

 

Thanks

Zachary

 

0 Kudos
Sravanthi_K_Intel
332 Views

Hello there - As Zachary pointed out, please let us know if you are seeing the same error with the drm executable instead of x11. I have faced similar errors in my own experiments, and for me, the cause was faulty driver module installation. In your case, it can possibly be launching two X11 sessions - please let us know your results. I'm interested in this topic as well.

0 Kudos
Reply