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.

VP8 encoder initialization problem

Oleg_F_
Beginner
757 Views

Hi,

I'm using MSS 2015 R3 and I experience a problem with VP8 encoder:

I constantly get error code -3 (MFX_ERR_UNSUPPORTED) from MFXVideoENCODE_Query() call.

I'm using the following settings for the encoder:

memset(&enc_params, 0, sizeof(enc_params));
    enc_params.mfx.CodecId = MFX_CODEC_VP8;
    enc_params.mfx.CodecProfile = MFX_PROFILE_VP8_3;
    enc_params.mfx.TargetUsage = MFX_TARGETUSAGE_BEST_SPEED;
    enc_params.mfx.TargetKbps = 1000;
    enc_params.mfx.RateControlMethod = MFX_RATECONTROL_VBR;
    enc_params.mfx.FrameInfo.FrameRateExtN = 30;
    enc_params.mfx.FrameInfo.FrameRateExtD = 1;
    enc_params.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
    enc_params.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
    enc_params.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
    enc_params.mfx.FrameInfo.CropX = 0;
    enc_params.mfx.FrameInfo.CropY = 0;
    enc_params.mfx.FrameInfo.CropW = current_config.in_width;
    enc_params.mfx.FrameInfo.CropH = current_config.in_height;
    enc_params.mfx.FrameInfo.Width = 1280;
    enc_params.mfx.FrameInfo.Height = 720;
    enc_params.IOPattern = MFX_IOPATTERN_IN_VIDEO_MEMORY;

If I use the same parameters for AVC codec (except level and profile) it works fine.

I need some assistance with that since I don't know what I do wrong

Thanks,

Oleg Fomenko

0 Kudos
9 Replies
Surbhi_M_Intel
Employee
737 Views

Hi Oleg, 

Can you give us details about your system and OS to debug the issue. Please check system analyzer tool if working in windows. 
FYI: we need plugins to use VP8 to encode which are only present in Linux only. 

Thanks, 
_Surbhi

0 Kudos
Oleg_F_
Beginner
737 Views

Hi,

I'm using CentOS 7 linux and I followed the exact installation procedure from the user's manual document.

There is nothing written about plug-in in VP8 manual document...

I suppose my problem is very simple, but I can't find it since I don't have any VP8 example. Do you have one?

Thanks,

Oleg

 

0 Kudos
Surbhi_M_Intel
Employee
737 Views

Hi Oleg, 

Can you please try with mfxVideoParam.AsyncDepth set to 1. We are hoping this should resolve the problem. This is currently under our known limitations that only one asynchronous operation before explicit sync is supported. 

Hope this helps. please let us know about your finding.

-Surbhi

0 Kudos
Oleg_F_
Beginner
737 Views

Hi,

Unfortunately it didn't help

I still get the same error...

Do you have any working example of VP-8 usage?

Thanks,

Oleg

 

0 Kudos
Surbhi_M_Intel
Employee
737 Views

Hi Oleg, 

I tried on the SLES system and was able to run it successfully. 
I am listing out the steps I have used, hopefully that can be used for you as a starting point -
--Use sample_encode to use VP8 encoder. 
--cat the contents of plugins.cfg.bck to plugins.cfg, so that it includes the GUID's of VP8. 
--the cmd to execute "
./sample_encode_drm vp8 -i test_stream_176x96.yuv -o out -w 176 -h 96 -p bffc518cde134df98a96f4cf816c0fac". Please check the plugin uid in plugins.cfg and use that.

We are working on to write a tutorial for adding a plugin, whenever we have it I will let you know. 
 

-Surbhi

 

 

 

 

0 Kudos
Oleg_F_
Beginner
737 Views

Hi Surbhi,

I was not able to locate plugins.cfg in my samples package.

I downloaded "Samples from Media Server Studio 2015 R3 for linux (for 16.4 version)" from this link:

https://software.intel.com/en-us/intel-media-server-studio-support/code-samples

Where can I find it?

I just need a working example of VP-8 decoder and encoder, from there I can already proceed alone. (I have already integrated intel H.264 decoder and encoder capabilities into my project)

Oleg

0 Kudos
Surbhi_M_Intel
Employee
737 Views

Hi Oleg, 

You can find plugins.cfg @ /opt/intel/mediasdk/plugins/. To use Vp8 encoder it needs to be mentioned in the plugin configuration from where the application loads the GUID of the plugin. 
You can find details of my plugin.cfg below, please replace with yours. After that re-run the sample encoder -"./sample_encode_drm vp8 -i test_stream_176x96.yuv -o out -w 176 -h 96 -p bffc518cde134df98a96f4cf816c0fac "

[HEVC_Decoder_15dd936825ad475ea34e35f3f54217a6]
GUID = 15dd936825ad475ea34e35f3f54217a6
PluginVersion = 1
APIVersion = 269
Path = /opt/intel/mediasdk/plugins/libmfx_hevcd_sw64.so
Type = 1
CodecID = HEVC
Default = 0

[HEVC_Encoder_e5400a06c74d41f5b12d430bbaa23d0b]
GUID = e5400a06c74d41f5b12d430bbaa23d0b
PluginVersion = 1
APIVersion = 269
Path = /opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
Type = 2
CodecID = HEVC
Default = 0

[HEVC_Encoder_2fca99749fdb49aeb121a5b63ef568f7]
GUID = 2fca99749fdb49aeb121a5b63ef568f7
PluginVersion = 1
APIVersion = 269
Path = /opt/intel/mediasdk/plugins/libmfx_hevce_sw64.so
Type = 2
CodecID = HEVC
Default = 0

[HEVC_Encoder_87e0e80207375240852515cf4a5edde6]
GUID = 87e0e80207375240852515cf4a5edde6
PluginVersion = 1
APIVersion = 269
Path = /opt/intel/mediasdk/plugins/libmfx_h265fei_hw64.so
Type = 4
CodecID = HEVC
Default = 0

[H264LA_Encoder_588f1185d47b42968dea377bb5d0dcb4]
GUID = 588f1185d47b42968dea377bb5d0dcb4
PluginVersion = 1
APIVersion = 270
Path = /opt/intel/mediasdk/plugins/libmfx_h264la_hw64.so
Type = 4
CodecID = AVC
Default = 0
[VP8_Decoder_bca276ec7a854a598c30e0dc5748f1f6]
GUID = bca276ec7a854a598c30e0dc5748f1f6
PluginVersion = 1
APIVersion = 270
Path = /opt/intel/mediasdk/plugins/libmfx_vp8d_hw64.so
Type = 1
CodecID = VP8
Default = 0

[VP8_Encoder_bffc518cde134df98a96f4cf816c0fac]
GUID = bffc518cde134df98a96f4cf816c0fac
PluginVersion = 1
APIVersion = 270
Path = /opt/intel/mediasdk/plugins/libmfx_vp8e_hw64.so
Type = 2
CodecID = VP8
Default = 0

 

Can you please try with default sample_encode and not change the settings. If this doesn't work can you let me know the steps you are doing to run the test on your side and the error you see. 

 

-Surbhi

0 Kudos
Oleg_F_
Beginner
737 Views

Hi Surbhi,

I finally succeeded to build and run the sample (Had to re-install the CentOS for support of legacy X11)

I found that Intel sample (sample_encoder) returns warning code 5 on encoder initialization when I run it as described above.

The result is still good - the encoding works.

Is this OK?

Moreover I noticed that the application crashes when I try to use video memory (-vaapi)

I found that the encoder tries to allocate surfaces in unknown format: VP8N instead of NV12

Can VP8 encoder be used with video memory?

If not how should I copy frames from the video memory (my other modules like h.264 decoders and video composition uses video memory) to system memory in optimal way?

Thanks for your support,

Oleg

0 Kudos
Surbhi_M_Intel
Employee
737 Views

Hi Oleg, 

I am glad you got it to work!
Regarding warning, we don't see that issue at our end. One way to debug is use the content provided in samples and confirm if you see the same issue to eliminate any issues with i/p file. Please let us know your findings.
Regarding error using vaapi surfaces, this issue is a know issue and is fixed in next release of samples which will be soon out. Once the new samples are available please upgrade, you shouldn't see this issue.  

Thanks,
Surbhi
 
 

0 Kudos
Reply