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.

OneVPL JPEG Encoding with HW Acceleration

OllieB
Beginner
1,767 Views

Hi,

I am trying to leverage my integrated GPU (Intel UHD Graphics (9A60)) to accelerate the encoding of a live video stream from a webcam. I am using the OneVPL Dispatcher & Implementation. The output encoding needs to be JPEG to support my existing software stack.

I am getting the input video stream from opencv - this is in BGR format, stored in a cv::Mat object from which I can extract the RGB values of each row of pixels.

On the Programming Guide section on Encoding, it suggests that I should be able to encode RGB images by setting FourCC to MFX_FOURCC_RGB4 and ChromaFormat to MFX_CHROMAFORMAT_YUV444. I also set Quality to 100.

I queried the encoding parameters using MFXVideoENCODE_Query and it gave an error status of MFX_ERR_UNSUPPORTED. However, I found that the hello_encode sample gives exactly the same error status but is able to successfully encode NV12 inputs to H265. 

I've attached some source code to demonstrate the problem. I'm aware that I may not be correctly populating the surface with my BGR image data but I'm not convinced that that would result in the error I'm getting. 

Could you please help? Happy to provide further information as required.

 

n.b. to run the attached code you'll need opencv (and of course OneVPL!) linked etc.

0 Kudos
6 Replies
RajashekarK_Intel
1,734 Views

Hi, Thanks for posting in Intel communities.


It would be great if you can provide below details to debug and reproduce your issue from our end.

1. Processor Information:

2. OS Details:

3. oneVPL Version:

4. oneVPL GPU Runtime version: 

5. Your sample video as a zip file if possible.


Regards,

Rajashekar


0 Kudos
OllieB
Beginner
1,730 Views

Hi Rajeshekar,

 

Thanks for the reply. The information is as follows:

1. Intel Core i7-11800H

2. Windows 10 Pro Build 19045

3. 2023.1.0

4. I'm not sure where to find this info. The listed "API version" from the samples is 2.3 if that's the one. 

5. As I mentioned in my original message, I am trying to stream videos from the webcam, so my use case doesn't involve reading from file.

0 Kudos
RajashekarK_Intel
1,653 Views

Hi @OllieB ,

Thanks for providing the details.

We are working on this internally. We will get back to you soon with an update

 

Regards,

Rajashekar

 

 

0 Kudos
RajashekarK_Intel
1,594 Views

Hi @OllieB , Good day to you.

We were able to reproduce your issue with SYSTEM_MEMORY, could you try VIDEO_MEMORY under encoding parameters.

encodeParams.IOPattern = MFX_IOPATTERN_IN_VIDEO_MEMORY;

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue.

 

Thanks & Regards

Rajashekar.

 

0 Kudos
RajashekarK_Intel
1,487 Views

Hi, Good day to you.

We have not heard back from you. Is your issue resolved with the given solution? If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue.


Regards,

Rajashekar


0 Kudos
RajashekarK_Intel
1,427 Views

Hi,

We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Rajashekar


0 Kudos
Reply