From: Denys Dmytriyenko <denis@denix.org>
To: t-lannynd@ti.com
Cc: meta-arago@lists.yoctoproject.org, reatmon@ti.com,
detheridge@ti.com, b-brnich@ti.com, a-christidis@ti.com
Subject: Re: [meta-arago][master/wrynose][PATCH v2] meta-arago-distro: chromium: add force-h264-youtube extension
Date: Tue, 9 Jun 2026 13:42:55 -0400 [thread overview]
Message-ID: <20260609174255.GH23325@denix.org> (raw)
In-Reply-To: <20260609171306.238854-1-t-lannynd@ti.com>
On Tue, Jun 09, 2026 at 12:13:06PM -0500, 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.
>
> Installed at /usr/lib/chromium/extensions/force-h264-youtube
> and --load-extension flag is needed to enable the extension.
>
> Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com>
> ---
> v2:
> - Remove the flag that enables extension by default as not all SoCs support
> Wave5 and Chromium
This is also fine, though requires enabling it manually...
> .../chromium/chromium-ozone-wayland-arago.inc | 13 +++++++++++++
> .../force-h264-youtube/force_h264.js | 4 ++++
> .../force-h264-youtube/manifest.json | 19 +++++++++++++++++++
> 3 files changed, 36 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..d8eb0204 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,15 @@ 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}/
> +}
> +
> +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
> + }
> + ]
> +}
> --
> 2.34.1
next prev parent reply other threads:[~2026-06-09 17:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 17:13 [meta-arago][master/wrynose][PATCH v2] meta-arago-distro: chromium: add force-h264-youtube extension Thorsten Lannynd
2026-06-09 17:34 ` PRC Automation
2026-06-09 17:42 ` Denys Dmytriyenko [this message]
2026-06-09 17:51 ` Jon Cormier
2026-06-09 18:25 ` Lannynd, Thorsten
2026-06-09 18:51 ` Jon Cormier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609174255.GH23325@denix.org \
--to=denis@denix.org \
--cc=a-christidis@ti.com \
--cc=b-brnich@ti.com \
--cc=detheridge@ti.com \
--cc=meta-arago@lists.yoctoproject.org \
--cc=reatmon@ti.com \
--cc=t-lannynd@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.