RE: [meta-arago][master/wrynose][PATCH] meta-arago-distro: chromium: add force-h264-youtube extension
"Lannynd, Thorsten" <[email protected]> Tue, 9 Jun 2026 17:09:37 +0000
| Newsgroups | org.yoctoproject.lists.meta-arago |
|---|---|
| Message-ID | <[email protected]> |
On 6/9/26 1:22 AM, Yogesh Hedge via lists.yoctoproject.org wrote: > Hi Thorsten, > Thanks for the patch. >=20 > On 6/9/26 01:48, Thorsten Lannynd via lists.yoctoproject.org wrote: > > Install a lightweight Chrome extension that forces YouTube to serve > > H.264 (avc1) by blocking VP8, VP9, and AV1 via > MediaSource.isTypeSupported. > > This enables Wave5 hardware video decoding on YouTube, which only > > supports > > H.264 and HEVC, without requiring a third-party extension to be > > manually installed through the Chrome Web Store before use. > > > > Installed at /usr/lib/chromium/extensions/force-h264-youtube > > and --load-extension is appended to the chromium-wrapper launch script. > > > > Signed-off-by: Thorsten Lannynd <[email protected]> >=20 > Is Wave5 hardware video decoding supported on all SoCs? > If not, please limit the patches to SoCs/machines that support it. Thank you for the review. I will make the extension not enabled by default. The only platform that does not support Wave5 but supports Chromium is AM62x. >=20 > > --- > > .../chromium/chromium-ozone-wayland-arago.inc | 15 +++++++++++++++ > > .../force-h264-youtube/force_h264.js | 4 ++++ > > .../force-h264-youtube/manifest.json | 19 +++++++++++++++++++ > > 3 files changed, 38 insertions(+) > > create mode 100644 > > meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browse > > r/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js > > create mode 100644 > > meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browse > > r/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json > > > > diff --git > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland-arago.inc > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland-arago.inc > > index ab092fa1..14c12767 100644 > > --- > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland-arago.inc > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes- > > +++ browser/chromium/chromium-ozone-wayland-arago.inc > > @@ -1,5 +1,7 @@ > > PR:append =3D ".arago0" > > > > +EXTENSION_DIR =3D "/usr/lib/chromium/extensions/force-h264-youtube" > > + > > FILESEXTRAPATHS:prepend :=3D "${THISDIR}/chromium-ozone-wayland:" > > > > PACKAGECONFIG:append =3D " proprietary-codecs" > > @@ -9,4 +11,17 @@ SRC_URI:append =3D " \ > > file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-a= ccess-to- > V4L.patch \ > > file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-strea= ming-in- > V4L2.patch \ > > > > file://0004-media-gpu-v4l2-Avoid-placing-incomplete-H264-access-.patch > > \ > > + file://force-h264-youtube/force_h264.js \ > > + file://force-h264-youtube/manifest.json \ > > " > > + > > +do_install:append() { > > + install -d ${D}${EXTENSION_DIR} > > + install -m 0644 ${WORKDIR}/sources/force-h264-youtube/force_h264.j= s \ > > + ${WORKDIR}/sources/force-h264-youtube/manifest.jso= n \ > > + ${D}${EXTENSION_DIR}/ > > + sed -i 's|--ozone-platform=3Dwayland"|--ozone-platform=3Dwayland -= -load- > extension=3D${EXTENSION_DIR}"|' \ > > + ${D}/usr/lib/chromium/chromium-wrapper > > +} > > + > > +FILES:${PN}:append =3D " ${EXTENSION_DIR}" > > diff --git > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js > > new file mode 100644 > > index 00000000..5e942321 > > --- /dev/null > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes- > > +++ browser/chromium/chromium-ozone-wayland/force-h264- > youtube/force_h > > +++ 264.js > > @@ -0,0 +1,4 @@ > > +(function() { > > + var orig =3D MediaSource.isTypeSupported.bind(MediaSource); > > + MediaSource.isTypeSupported =3D function(t) { return > > +/vp8|vp09?|av01/i.test(t) ? false : orig(t); }; })(); > > diff --git > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-brow > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json > > new file mode 100644 > > index 00000000..fc69be22 > > --- /dev/null > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes- > > +++ browser/chromium/chromium-ozone-wayland/force-h264- > youtube/manifes > > +++ t.json > > @@ -0,0 +1,19 @@ > > +{ > > + "manifest_version": 3, > > + "name": "Force H.264", > > + "version": "1.0.0", > > + "description": "Lightweight extension that forces YouTube to play > > +H.264 (avc1) by blocking VP8, VP9, and AV1", > > + "content_scripts": [ > > + { > > + "matches": [ > > + "*://*.youtube.com/*", > > + "*://*.youtube-nocookie.com/*", > > + "*://*.youtu.be/*" > > + ], > > + "js": ["force_h264.js"], > > + "run_at": "document_start", > > + "world": "MAIN", > > + "all_frames": true > > + } > > + ] > > +} >=20 > --- > -- Yogesh Hegde