How to add video and audio codec support in Wpe-webkit-mir-kiosk snap?

Hello!

Recently I started to test wpe-webkit-mir-kiosk and I’m very surprised at how it works pretty well.

I’m a newbie using snap and I would like to know how I could add video/audio codecs support in this snap. I’m using https://html5test.com/ for checking and all video and audio codecs are unavailable.

Could someone help me?

This is something that would require modifications to the snap. The author of the snap may be able to help. @tobias?

1 Like

Hi @aroeira, glad to hear it’s working for you – except for the codecs. Which version of the snap are you using (revision + channel), and on which architecture?

Thanks @alan_g for the ping :blush:

EDIT: I just tested wpe-webkit-mir-kiosk on a Raspberry Pi (armhf) running Ubuntu Core, WPE snap from latest/stable: 2.30.5 / rev 56 Audio codecs all show “Yes” except Dolby Digital and Dolby Digital Plus, video codecs all “Yes” except H.265.

1 Like

Hi @tobias,

Thank you for the message and sorry for the long delay. I was moving to another place, and things became a little complicated.

I’ll test on RPi3, but my actual target is an intel Celeron (x86) with wpe-webkit-mir-kiosk 2.30.5.

channels:
  latest/stable:    2.30.5 2021-03-09 (54) 175MB -
  latest/candidate: 2.30.5 2021-02-25 (54) 175MB -
  latest/beta:      2.30.5 2021-02-25 (54) 175MB -
  latest/edge:      2.30.5 2021-02-25 (54) 175MB -
installed:          2.30.5            (54) 175MB -

Linux preview 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 20.04.2 LTS

Hi @aroeira, no worries :slight_smile: To be clear: You intend to use the integrated graphics of an Intel Celeron CPU, right? Or does the target machine have a dedicated GPU? I think the specific model/name would be best to find out which Ubuntu package contains the necessary drivers for your target device. Then I’ll gladly add it as an architecture-specific stage package. Maybe @alan_g knows (once we know the model)?

1 Like

Sorry, video acceleration and codecs are not my area. But I can give a bit of background.

One of the principle limitations on Ubuntu Core at present is that graphical snaps need to include any userspace graphics libraries corresponding to the kernel drivers and the graphics hardware.

For the Mir based snaps we’ve chosen to include the Mesa userspace libraries. These open source libraries provide support for a wide range of hardware and have a stable interface to the kernel drivers.

For Intel based graphics I’d expect that staging va-driver-all will provide support for video acceleration. But there my knowledge ends.

The situation on ARM is different and typically each SoC needs a bespoke kernel module (which, unless specific enablement has been done, may not be in Ubuntu Core) and a bespoke userspace.

In particular, the proprietary Broadcom DispmanX drivers needed for the RPi3 are not enabled by the default Ubuntu Core kernel, and nor is the corresponding userspace included in any of the Mir snaps.

1 Like

Hi @tobias and @alan_g!

Yes. That is the idea.

In this case, the multimedia in the webkit should work if there is support in Mesa for intel graphics. Am I right?

I’ll explore more this evening.

Thanks for helping!

If the webkit snap stages va-driver-all I would expect that this will enable support for video acceleration. (It works for my mir-kiosk-kodi snap.)

1 Like

Thanks @alan_g for the explanation and package name! I added va-driver-all to the snap’s stage packages with an architecture-specific grammar, to avoid bloating the armhf version.

@aroeira I released revision 57 to the amd64 edge and beta channels, and on my Ubuntu Desktop machine with AMD Rv710 html5test.com now reports proper video/audio codec support like on armhf. Please test on your machine and let me know if I can promote the build to stable.

2 Likes

Thanks, @tobias
The edge version is working like a charm with codecs.


In order to obtain GPU acceleration I’ve installed the Intel IGP from https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.7423.

I downloaded all deb files and executed:

sudo apt install ./intel-igc*.deb
1 Like