diff mbox series

[meta-arago,master/wrynose] meta-arago-distro: chromium: add force-h264-youtube extension

Message ID 20260608201827.3937832-1-t-lannynd@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series [meta-arago,master/wrynose] meta-arago-distro: chromium: add force-h264-youtube extension | expand

Commit Message

Lannynd, Thorsten June 8, 2026, 8:18 p.m. UTC
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 <t-lannynd@ti.com>
---
 .../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-browser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js
 create mode 100644 meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json

Comments

PRC Automation June 8, 2026, 8:38 p.m. UTC | #1
meta-arago / na / 20260608201827.3937832-1-t-lannynd

PRC Results: PASS

=========================================================
  check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed



=========================================================
  apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-arago][master/wrynose][PATCH] meta-arago-distro: chromium: add force-h264-youtube extension
- Submitter: From: Thorsten Lannynd <t-lannynd@ti.com>
- Date: Date: Mon, 8 Jun 2026 15:18:27 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 439c683d573a6ca724e2ce593e0934a66a3baefb

Applied to:
- Repository: lcpd-prc-meta-arago
- Base Branch: master-wip
- Commit Author: Thorsten Lannynd <t-lannynd@ti.com>
- Commit Subject: meta-arago: chromium: clean up and simplify V4L2 patch series
- Commit SHA: 30a611f56a4bd74d421e36ecddf705b956c01648

Patches
----------------------------------------
All patches applied

wrynose
=====================
Summary:
- Patch Series: [meta-arago][master/wrynose][PATCH] meta-arago-distro: chromium: add force-h264-youtube extension
- Submitter: From: Thorsten Lannynd <t-lannynd@ti.com>
- Date: Date: Mon, 8 Jun 2026 15:18:27 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 439c683d573a6ca724e2ce593e0934a66a3baefb

Applied to:
- Repository: lcpd-prc-meta-arago
- Base Branch: wrynose-wip
- Commit Author: Thorsten Lannynd <t-lannynd@ti.com>
- Commit Subject: meta-arago: chromium: clean up and simplify V4L2 patch series
- Commit SHA: 0e97f60a272300075fe2dcb4190873b19c32663c

Patches
----------------------------------------
All patches applied



=========================================================
  check-yocto-repo: PASS
=========================================================
master
=====================
PASS

wrynose
=====================
PASS



=========================================================
  yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed

wrynose - PASS
=====================
All checks passed
Yogesh Hegde June 9, 2026, 6:21 a.m. UTC | #2
Hi Thorsten, 
Thanks for the patch. 

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 <t-lannynd@ti.com>

Is Wave5 hardware video decoding supported on all SoCs? 
If not, please limit the patches to SoCs/machines that support it.  

> ---
>  .../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-browser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js
>  create mode 100644 meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json
> 
> diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc
> index ab092fa1..14c12767 100644
> --- a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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 = ".arago0"
>  
> +EXTENSION_DIR = "/usr/lib/chromium/extensions/force-h264-youtube"
> +
>  FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland:"
>  
>  PACKAGECONFIG:append = " proprietary-codecs"
> @@ -9,4 +11,17 @@ SRC_URI:append = " \
>                    file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch \
>                    file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-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.js \
> +                    ${WORKDIR}/sources/force-h264-youtube/manifest.json \
> +                    ${D}${EXTENSION_DIR}/
> +    sed -i 's|--ozone-platform=wayland"|--ozone-platform=wayland --load-extension=${EXTENSION_DIR}"|' \
> +            ${D}/usr/lib/chromium/chromium-wrapper
> +}
> +
> +FILES:${PN}:append = " ${EXTENSION_DIR}"
> diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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_h264.js
> @@ -0,0 +1,4 @@
> +(function() {
> +    var orig = MediaSource.isTypeSupported.bind(MediaSource);
> +    MediaSource.isTypeSupported = function(t) { return /vp8|vp09?|av01/i.test(t) ? false : orig(t); };
> +})();
> diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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/manifest.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
> +    }
> +  ]
> +}

--- 
-- Yogesh Hegde
Lannynd, Thorsten June 9, 2026, 5:09 p.m. UTC | #3
On 6/9/26 1:22 AM, Yogesh Hedge via lists.yoctoproject.org wrote:
> Hi Thorsten,
> Thanks for the patch.
> 
> 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 <t-lannynd@ti.com>
> 
> 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.

> 
> > ---
> >  .../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 = ".arago0"
> >
> > +EXTENSION_DIR = "/usr/lib/chromium/extensions/force-h264-youtube"
> > +
> >  FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland:"
> >
> >  PACKAGECONFIG:append = " proprietary-codecs"
> > @@ -9,4 +11,17 @@ SRC_URI:append = " \
> >                    file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-
> V4L.patch \
> >                    file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-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.js \
> > +                    ${WORKDIR}/sources/force-h264-youtube/manifest.json \
> > +                    ${D}${EXTENSION_DIR}/
> > +    sed -i 's|--ozone-platform=wayland"|--ozone-platform=wayland --load-
> extension=${EXTENSION_DIR}"|' \
> > +            ${D}/usr/lib/chromium/chromium-wrapper
> > +}
> > +
> > +FILES:${PN}:append = " ${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 = MediaSource.isTypeSupported.bind(MediaSource);
> > +    MediaSource.isTypeSupported = 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
> > +    }
> > +  ]
> > +}
> 
> ---
> -- Yogesh Hegde
Denys Dmytriyenko June 9, 2026, 5:37 p.m. UTC | #4
On Tue, Jun 09, 2026 at 05:09:37PM +0000, Thorsten Lannynd via lists.yoctoproject.org wrote:
> On 6/9/26 1:22 AM, Yogesh Hedge via lists.yoctoproject.org wrote:
> > Hi Thorsten,
> > Thanks for the patch.
> > 
> > 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 <t-lannynd@ti.com>
> > 
> > Is Wave5 hardware video decoding supported on all SoCs?
> > If not, please limit the patches to SoCs/machines that support it.

This will make Chromium package machine-specific. So, the same binary and 
shared state can't be re-used across different platforms of the same 
architecture, e.g. aarch64. You'd end up re-building Chromium for each 
platform individually. Chromium is already a beast and is taking forever to 
build.


> 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.

Can the extension be made as a separate machine-specific package and marked 
as not compatible with AM62x. I wonder if Chromium will run just fine when 
started with --load-extension passed to not existing extenstion. Otherwise 
some run-time check for it's presence can be made in the wrapper script...


> > > ---
> > >  .../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 = ".arago0"
> > >
> > > +EXTENSION_DIR = "/usr/lib/chromium/extensions/force-h264-youtube"
> > > +
> > >  FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland:"
> > >
> > >  PACKAGECONFIG:append = " proprietary-codecs"
> > > @@ -9,4 +11,17 @@ SRC_URI:append = " \
> > >                    file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-
> > V4L.patch \
> > >                    file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-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.js \
> > > +                    ${WORKDIR}/sources/force-h264-youtube/manifest.json \
> > > +                    ${D}${EXTENSION_DIR}/
> > > +    sed -i 's|--ozone-platform=wayland"|--ozone-platform=wayland --load-
> > extension=${EXTENSION_DIR}"|' \
> > > +            ${D}/usr/lib/chromium/chromium-wrapper
> > > +}
> > > +
> > > +FILES:${PN}:append = " ${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 = MediaSource.isTypeSupported.bind(MediaSource);
> > > +    MediaSource.isTypeSupported = 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
> > > +    }
> > > +  ]
> > > +}
> > 
> > ---
> > -- Yogesh Hegde
diff mbox series

Patch

diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc
index ab092fa1..14c12767 100644
--- a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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 = ".arago0"
 
+EXTENSION_DIR = "/usr/lib/chromium/extensions/force-h264-youtube"
+
 FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland:"
 
 PACKAGECONFIG:append = " proprietary-codecs"
@@ -9,4 +11,17 @@  SRC_URI:append = " \
                   file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch \
                   file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-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.js \
+                    ${WORKDIR}/sources/force-h264-youtube/manifest.json \
+                    ${D}${EXTENSION_DIR}/
+    sed -i 's|--ozone-platform=wayland"|--ozone-platform=wayland --load-extension=${EXTENSION_DIR}"|' \
+            ${D}/usr/lib/chromium/chromium-wrapper
+}
+
+FILES:${PN}:append = " ${EXTENSION_DIR}"
diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.js b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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_h264.js
@@ -0,0 +1,4 @@ 
+(function() {
+    var orig = MediaSource.isTypeSupported.bind(MediaSource);
+    MediaSource.isTypeSupported = function(t) { return /vp8|vp09?|av01/i.test(t) ? false : orig(t); };
+})();
diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.json b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/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/manifest.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
+    }
+  ]
+}