Hi Developer Community,
I am trying to migrate my kiosk web browser configuration from Chromium to COG/WPE using the documentation here and it is mostly working and promising for my project where I need GPU HW support.
The biggest issue observed so far is the lack of video codec in COG/WPE: if I try to open YouTube or a video test page like this no video codec is found and I do not know if that’s normal for the current integration stage in Torizon or some configuration error.
The COG docker log report the following warning about a plugin:
browser_1 | ** (WPEWebProcess:15): WARNING **: 13:16:05.722: WebKit wasn't able to find the GL video sink dependencies. Hardware-accelerated zero-copy video rendering can't be enabled without this plugin.
Thank you for the attention and best regards,
Colibri iMX8 QXP 2GB WB IT
Torizon 5.1.0 and 5.3.0
docker image torizon/kiosk-mode-browser-vivante:2 ID=77cae549a813 (6 weeks ago)
In order to have Video playback with Cog you’ll need to customize the container a bit. First of all you’ll need to install gstreamer. Here’s a list of all available gstreamer related packages that come in our Debian containers: https://github.com/toradex/torizon-samples/blob/bullseye/gstreamer/bash/simple-pipeline/Dockerfile.arm64
You probably don’t need all of these packages, just the plugins. Though the exact packages needed may depend on what video codecs are required.
Once the needed gstreamer packages are installed you then need to set the following environment variable in the container:
After that I was able to play Youtube videos, though I didn’t test every video format. Please give this a try and let me know if there’s a video format you need that still isn’t working.
thank you for the answer and the indications. I confirm with gstreamer1.0-gl libgstreamer1.0-gl and the plugins, it is playing the videos. That’s a good point, but unfortunately the CPU is doing the heavy lifting, rather than the GPU. For example, 125-150% CPU usage playing a 576p WEBM VP8.
I suppose the mentioned debian packages are compiled to run on CPU because the iMX8 GPU requires some specific support as in this repository by Freescale. Do you know if it is already built somewhere else in Torizon or if Toradex plan is to add this feature in some of the next releases?
Thanks again and best regards,
Yes that is the downside currently. At the moment the gstreamer packages available in the Debian containers aren’t optimized for i.MX8 hardware and thus are mostly using software rendering.
We do plan to integrate the imx specific gstreamer from NXP. But I can’t provide any rough timelines for this since the effort and work is still being planned. Though I’ll see if I can get any more info on this and report back here if I do.