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

MediaSDK samples not working in Ubunutu but working in windows

verma__Ashish
Beginner
2,534 Views

I have run this sample

./sample_encode h264 -rgb4 -i /home/sr/out_1280_720_BGRA.avi -o /home/sr/out1111.avi -w 1280 -h 720 -device /dev/dri/renderD128

In windows its working fine but in Linux its crashing with the following error ->

libva info: VA-API version 1.8.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), AllocFrames, Query (for encoder) failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:946

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), ResetMFXComponents, AllocFrames failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:2047

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), Init, ResetMFXComponents failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:1828

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), main, pPipeline->Init failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/sample_encode.cpp:1632
Frame number: 0
Encoding fps: -0
/opt/intel/mediasdk/share/mfx/samples/_bin-> ./sample_encode h264 -rgb4 -i /home/sr/out_1280_720_BGRA.avi -o /home/sr/out1111.avi -w 1280 -h 720
libva info: VA-API version 1.8.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), AllocFrames, Query (for encoder) failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:946

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), ResetMFXComponents, AllocFrames failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:2047

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), Init, ResetMFXComponents failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/pipeline_encode.cpp:1828

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), main, pPipeline->Init failed at /docker/worker/mediasdk/build_dir/repos/MediaSDK/samples/sample_encode/src/sample_encode.cpp:1632
Frame number: 0
Encoding fps: -0

Do we have to install any dependencies separately for rgb4 format in linux?  

I am using latest mediasdk version 20.2.1.

Any help will be appreciated

Thanks

0 Kudos
12 Replies
JesusE_Intel
Moderator
2,499 Views

Hi verma__Ashish,

Could you provide the full command and sample input file for me to reproduce? Looking at your command, it seems you are using an AVI file, however, per the sample documentation an uncompressed YUV420 or NV12 input file is expected. Could you confirm?

Regards,

Jesus

 

0 Kudos
verma__Ashish
Beginner
2,490 Views

Hi Jesus, 

Its not an AVI compressed file, it is rgb4 raw file only we have just named it like that and in the sample help option I have seen that it can accept rgb4 format also and the same command with the same file is working in windows properly. 

Also the same command is working for h265 in Linux only it is not working for Linux h264

Command -> 

./sample_encode h264 -rgb4 -i /home/sr/out_1280_720_BGRA.avi -o /home/sr/out1111.avi -w 1280 -h 720 -device /dev/dri/renderD128

Here is the link for the file ->

https://drive.google.com/file/d/1JbrglsnIKseDTT1JmbGdHYiW2xh80jbv/view?usp=sharing

Any help will be appreciated

Regards

Ashishi

 

0 Kudos
Mark_L_Intel1
Moderator
2,470 Views

Hi Ashish,


Thanks for the detailed report.


Yes, I have reproduce this and reported to dev team, I will update it if they have any results.


From the log you posted, it seems the memory allocation issue at the application level.


Mark


0 Kudos
verma__Ashish
Beginner
2,459 Views

Thanks Mark 

Eagerly waiting for your reply

Ashish

0 Kudos
JesusE_Intel
Moderator
2,418 Views

Hi verma__Ashish,

 

We are working on a fix, you can track the progress in this pull request.

 

Regards,

Jesus

 

0 Kudos
Mark_L_Intel1
Moderator
2,394 Views

Hi Ashish,

 

Sorry for the late response, I got some update from dev team about this feature.

 

First, I have to clarify this feature:

  1. Directly encoder support RGB;
  2. Support RGB by converting with VPP as the preprocessing to encoder.

 

#1 apply only to some recent hardware platform on Linux.

#2 apply only to Windows but not Linux due to some driver limitation.


So the behavior you observed is expected results if you are not using the last hardware platform.

Mark Liu

 

0 Kudos
verma__Ashish
Beginner
2,388 Views

Hi Mark ,

Thanks for the response. 

Can you please elaborate what do you mean by last hardware platform? 

And what are the driver limitation ...When It is going to be fixed ?

Its kind of urgent in my project, Is there a workaround for the time being meanwhile dev team can work on it and fix it 

Any help will be appreciated 

Regards

Ashish

0 Kudos
Mark_L_Intel1
Moderator
2,383 Views

Hi Ashish,

 

Thanks for the quick response, are you requesting a big fix to this?

 

You can always use VPP + encode to do the same thing in your own application, right? What's the point to fix the bug in sample_encode? I need a good reason to convince dev team since they are very busy.

 

About RGBA support, please see the following table in our driver:

https://github.com/intel/media-driver/blob/master/docs/media_features.md#supported-encoding-input-format-and-max-resolution

Note: the RGBA info is in the note line under the table.

 

Mark

 

0 Kudos
verma__Ashish
Beginner
2,379 Views

Hi Mark,

No I am not requesting for a bug fix.

Yes I can use VPP + encode to do the same thing in my application

Thanks for the response. I will get back to you if required 

Regards

Ashish

0 Kudos
Mark_L_Intel1
Moderator
2,373 Views

Thanks so much for the quick response,


Feel free to submit a request anytime if you find an issue.


Mark


0 Kudos
verma__Ashish
Beginner
2,367 Views

Hi Mark,

 I want to measure the resource usage and performance of the encoder before using the media sdk encoder in our application, for that i need this sample to be worked in linux. This will help us to choose the hardware for different solutions

That's why I am asking for that 

Any help will be appreciated, if possible

Thanks

Ashish

0 Kudos
Mark_L_Intel1
Moderator
2,358 Views

Thanks Ashish,


This is a good topic and really appreciated to use our product.


Here is the general direction:


Please use these as a start and create a different post on the resource usage and performance checking.


Mark


0 Kudos
Reply