imx8mp hw accelerated video play in qtwebengine

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp hw accelerated video play in qtwebengine

376 Views
osipovvo
Contributor II

Hi,

we used imx8mp processor and want to enable h264 hw accelerated video play on the web pages shown on the single screen. Our application based on qtwebengine (qt 6.3.2, chromiuim 94-based). Linux kernel 5.15. We need in single player at one time, full screen, full hd, without resize operations and with static positioning of the output windows on the screen (web pages). From graphics side the egl is used, and we don't use any windows, any user interfaces, solution has no any controll buttons or graphics elements like forms. Output display is lcd pannel (different sizes from 10'' to 43'') connected via LVDS. We also know about hantro (vpu) part inside imx8mp. On the kernel startup the hantro device is initialized well and provides appropriative /dev fs device.

What the shortest and effective way? Is it like enable and use v4l2 and someone plugin for it? Or it is better to write/implement something for ffmpeg (like one more new plugin that utialize the imx-vpu)? Or it is easier to implemet gstreamer backend/player into the chromium and use existed gst-imx-vpu-plugin?

What the propper, shortest and effective way? 

PS: Also, looking to the Linux Release Notes (6.6.3), chapter 7.4.9 it is looks like our task (from chromium point of view) is already done with bsp/kernel version 6. Am i right?!

4 Replies

161 Views
osipovvo
Contributor II

Finally we done with next steps: we got chromium patches from dynamic-layers from meta-imx/meta-imx-sdk and applied them (with some modifications) to the chromium sources used for qtwebengine. After some additional adaptations of the args.gn used for qtwebengine chromium sources compilation we got v4l hw acceleration enabled for h264 video playback. This solution works with kernel 6.6, qt 6.2.8, qtwenengine chromium 102.

0 Kudos
Reply

270 Views
osipovvo
Contributor II

I was able to test chromium only video playback so far. Looks like yes, chromium in bsp 6 really uses hw acceleration video play, however my request bit deeper - i need to get this functionality in the qtwebengine. Now i'm trying to apply set of patches from dinamic classes from freescale/imx meta directly to the qtwebengine chromium sources. So the question - is it possible to build qt webengine with linking to the "installed to the system chromium", not with including chromium sources directly into the qtwebengine project?!

PS: for the ffmpeg i also found and tried solution from verisilicon github. Howerver it doesn't work on imx8mp even after modification of the build files (Makefiles are for the host here, not for the yocto). Specifing propper mxc-hantro device in the command line of the ffmpeg call also not solve the issue. Looks like code is unable to communicate with hw due to some specific reasons (other hw?!)

0 Kudos
Reply

236 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You are right, h264 hw decode is already supported by chromium.

Do you mean you want qtwebengine not to compile chromium, and directly use our yocto's chromium?

You may check this question on qt community, we use the code from qt community without change.

Regards

0 Kudos
Reply

326 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

 

Yes, with version 6.6.3 you can do it with chromium and take the gstreamer as plugging, but it does not support ffmepg, is purely software.

regards

0 Kudos
Reply