Re: [meta-arago][master/wrynose][PATCH v2] meta-arago-distro: chromium: add force-h264-youtube extension
Jon Cormier <[email protected]> Tue, 9 Jun 2026 14:51:43 -0400
| Newsgroups | org.yoctoproject.lists.meta-arago |
|---|---|
| Message-ID | <CADL8D3ZGa072xrKJZzyGM3vz4_2cgaSyikADjipBUfy1JuBREA@mail.gmail.com> |
--0000000000000852030653d69f64 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 9, 2026 at 2:25=E2=80=AFPM Lannynd, Thorsten <[email protected]>= wrote: > On 6/9/26 12:52 PM, Jon Cormier via lists.yoctoproject.org wrote: > > On Tue, Jun 9, 2026 at 1:43=E2=80=AFPM Denys Dmytriyenko via > lists.yoctoproject.org > > <[email protected]> wrote: > > > > > > 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 <[email protected]> > > > > --- > > > > v2: > > > > - Remove the flag that enables extension by default as not all SoCs > support > > > > Wave5 and Chromium > > Why would disabling this extension help? Does this mean there are some > SoCs > > which do support VP8, VP9, and AV1? Or if using CPU, decode those bett= er > > than h.264? > H.264 and HEVC are the only codecs with hardware acceleration, however, w= e > have one SoC that supports Chromium with no hardware video decoder. > > Not enabling the extension gives the user control over what codec YouTube > Is serving. I found the CPU utilization results to be roughly around the > same, > at 480p 30 fps when using S/W acceleration for AV1 and H.264 with > significant playback stutters. > Alright thanks thats useful information. I had recently been testing the AM62A with youtube and was talking to a coworker about this extension. So glad to see it pop up here serendipitously. > > > > > > > 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-bro= w > > > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/force_h264.j= s > > > > create mode 100644 > > > > meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-bro= w > > > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/manifest.jso= n > > > > > > > > diff --git > > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/chromium/chromium-ozone-wayland-arago.inc > > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/chromium/chromium-ozone-wayland-arago.inc > > > > index ab092fa1..d8eb0204 100644 > > > > --- > > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/chromium/chromium-ozone-wayland-arago.inc > > > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recip= e > > > > +++ s-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,15 @@ SRC_URI:append =3D " \ > > > > > 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-.pa= t > > > > ch \ > > > > + 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 =3D " ${EXTENSION_DIR}" > > > > diff --git > > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/chromium/chromium-ozone-wayland/force-h264- > > youtube/force_h264. > > > > js > > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/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/recip= e > > > > +++ s-browser/chromium/chromium-ozone-wayland/force-h264- > > youtube/for > > > > +++ ce_h264.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-b= r > > > > owser/chromium/chromium-ozone-wayland/force-h264- > > youtube/manifest.js > > > > on > > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-b= r > > > > owser/chromium/chromium-ozone-wayland/force-h264- > > youtube/manifest.js > > > > on > > > > new file mode 100644 > > > > index 00000000..fc69be22 > > > > --- /dev/null > > > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recip= e > > > > +++ s-browser/chromium/chromium-ozone-wayland/force-h264- > > youtube/man > > > > +++ ifest.json > > > > @@ -0,0 +1,19 @@ > > > > +{ > > > > + "manifest_version": 3, > > > > + "name": "Force H.264", > > > > + "version": "1.0.0", > > > > + "description": "Lightweight extension that forces YouTube to pla= y > > > > +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 > > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > > Links: You receive all messages sent to this group. > > > View/Reply Online (#17560): > > > https://lists.yoctoproject.org/g/meta-arago/message/17560 > > > Mute This Topic: https://lists.yoctoproject.org/mt/119726830/7902621 > > > Group Owner: [email protected] > > > Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub > > > [[email protected]] > > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > > > > > > > > > > > -- > > Jonathan Cormier > > Senior Software Engineer > > > > Office: 315.425.4045 x222 > > > > http://www.CriticalLink.com > > 6712 Brooklawn Parkway, Syracuse, NY 13211 > --=20 Jonathan Cormier Senior Software Engineer Office: 315.425.4045 x222 http://www.CriticalLink.com <http://www.criticallink.com/> 6712 Brooklawn Parkway, Syracuse, NY 13211 --0000000000000852030653d69f64 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jun 9, = 2026 at 2:25=E2=80=AFPM Lannynd, Thorsten <<a href=3D"mailto:t-lannynd@t= i.com">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,= 204);padding-left:1ex">On 6/9/26 12:52 PM, Jon Cormier via <a href=3D"http:= //lists.yoctoproject.org" rel=3D"noreferrer" target=3D"_blank">lists.yoctop= roject.org</a> wrote:<br> > On Tue, Jun 9, 2026 at 1:43=E2=80=AFPM Denys Dmytriyenko via <a href= =3D"http://lists.yoctoproject.org" rel=3D"noreferrer" target=3D"_blank">lis= ts.yoctoproject.org</a><br> > <denis=3D<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:<br> > ><br> > > On Tue, Jun 09, 2026 at 12:13:06PM -0500, Thorsten Lannynd via<br= > > <a href=3D"http://lists.yoctoproject.org" rel=3D"noreferrer" target=3D= "_blank">lists.yoctoproject.org</a> wrote:<br> > > > Install a lightweight Chrome extension that forces YouTube t= o serve<br> > > > H.264 (avc1) by blocking VP8, VP9, and AV1 via<br> > MediaSource.isTypeSupported.<br> > > > This enables Wave5 hardware video decoding on YouTube, which= only<br> > > > supports<br> > > > H.264 and HEVC.<br> > > ><br> > > > Installed at /usr/lib/chromium/extensions/force-h264-youtube= <br> > > > and --load-extension flag is needed to enable the extension.= <br> > > ><br> > > > Signed-off-by: Thorsten Lannynd <<a href=3D"mailto:t-lann= [email protected]" target=3D"_blank">[email protected]</a>><br> > > > ---<br> > > > v2:<br> > > > - Remove the flag that enables extension by default as not a= ll SoCs support<br> > > >=C2=A0 =C2=A0Wave5 and Chromium<br> > Why would disabling this extension help? Does this mean there are some= SoCs<br> > which do support VP8, VP9, and AV1?=C2=A0 Or if using CPU, decode thos= e better<br> > than h.264?<br> H.264 and HEVC are the only codecs with hardware acceleration, however, we<= br> have one SoC that supports Chromium with no hardware video decoder.<br> <br> Not enabling the extension gives the user control over what codec YouTube<b= r> Is serving. I found the CPU utilization results to be roughly around the sa= me,<br> at 480p 30 fps when using S/W acceleration for AV1 and H.264 with<br> significant playback stutters.<br></blockquote><div>Alright thanks thats us= eful information.=C2=A0 I had recently been testing the AM62A with youtube = and was talking to a coworker about this extension.=C2=A0 So glad to see it= pop up here serendipitously.=C2=A0</div><blockquote class=3D"gmail_quote" = style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa= dding-left:1ex"> <br> > ><br> > > This is also fine, though requires enabling it manually...<br> > <br> > ><br> > ><br> > ><br> > > >=C2=A0 .../chromium/chromium-ozone-wayland-arago.inc | 13 +++= ++++++++++<br> > > >=C2=A0 .../force-h264-youtube/force_h264.js=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 |=C2=A0 4 ++++<br> > > >=C2=A0 .../force-h264-youtube/manifest.json=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 | 19 +++++++++++++++++++<br> > > >=C2=A0 3 files changed, 36 insertions(+)<br> > > >=C2=A0 create mode 100644<br> > > > meta-arago-distro/dynamic-layers/chromium-browser-layer/reci= pes-brow<br> > > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/force= _h264.js<br> > > >=C2=A0 create mode 100644<br> > > > meta-arago-distro/dynamic-layers/chromium-browser-layer/reci= pes-brow<br> > > > ser/chromium/chromium-ozone-wayland/force-h264-youtube/manif= est.json<br> > > ><br> > > > diff --git<br> > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland-arago.inc<br> > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland-arago.inc<br> > > > index ab092fa1..d8eb0204 100644<br> > > > ---<br> > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland-arago.inc<br> > > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-laye= r/recipe<br> > > > +++ s-browser/chromium/chromium-ozone-wayland-arago.inc<br> > > > @@ -1,5 +1,7 @@<br> > > >=C2=A0 PR:append =3D ".arago0"<br> > > ><br> > > > +EXTENSION_DIR =3D "/usr/lib/chromium/extensions/force-= h264-youtube"<br> > > > +<br> > > >=C2=A0 FILESEXTRAPATHS:prepend :=3D "${THISDIR}/chromium= -ozone-wayland:"<br> > > ><br> > > >=C2=A0 PACKAGECONFIG:append =3D " proprietary-codecs&quo= t;<br> > > > @@ -9,4 +11,15 @@ SRC_URI:append =3D " \<br> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 file://0002-chromium-gpu-sandbox-Allow-GPU-sandbox-access-<br> > to-V4L.patch \<br> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 file://0003-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-<br> > V4L2.patch \<br> > > ><br> > > > file://0004-media-gpu-v4l2-Avoid-placing-incomplete-H264-acc= ess-.pat<br> > > > ch \<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 file://force-h264-youtube/force_h264.js \<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 file://force-h264-youtube/manifest.json \<br> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "<br> > > > +<br> > > > +do_install:append() {<br> > > > +=C2=A0 =C2=A0 install -d ${D}${EXTENSION_DIR}<br> > > > +=C2=A0 =C2=A0 install -m 0644 ${WORKDIR}/sources/force-h264= -youtube/force_h264.js<br> > \<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ${WORKDIR}/sources/force-h264-youtube/manifest.json \<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ${D}${EXTENSION_DIR}/ }<br> > > > +<br> > > > +FILES:${PN}:append =3D " ${EXTENSION_DIR}"<br> > > > diff --git<br> > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland/force-h264-<br> > youtube/force_h264.<br> > > > js<br> > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland/force-h264-<br> > youtube/force_h264.<br> > > > js<br> > > > new file mode 100644<br> > > > index 00000000..5e942321<br> > > > --- /dev/null<br> > > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-laye= r/recipe<br> > > > +++ s-browser/chromium/chromium-ozone-wayland/force-h264-<br= > > youtube/for<br> > > > +++ ce_h264.js<br> > > > @@ -0,0 +1,4 @@<br> > > > +(function() {<br> > > > +=C2=A0 =C2=A0 var orig =3D MediaSource.isTypeSupported.bind= (MediaSource);<br> > > > +=C2=A0 =C2=A0 MediaSource.isTypeSupported =3D function(t) {= return<br> > > > +/vp8|vp09?|av01/i.test(t) ? false : orig(t); }; })();<br> > > > diff --git<br> > > > a/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland/force-h264-<br> > youtube/manifest.js<br> > > > on<br> > > > b/meta-arago-distro/dynamic-layers/chromium-browser-layer/re= cipes-br<br> > > > owser/chromium/chromium-ozone-wayland/force-h264-<br> > youtube/manifest.js<br> > > > on<br> > > > new file mode 100644<br> > > > index 00000000..fc69be22<br> > > > --- /dev/null<br> > > > +++ b/meta-arago-distro/dynamic-layers/chromium-browser-laye= r/recipe<br> > > > +++ s-browser/chromium/chromium-ozone-wayland/force-h264-<br= > > youtube/man<br> > > > +++ ifest.json<br> > > > @@ -0,0 +1,19 @@<br> > > > +{<br> > > > +=C2=A0 "manifest_version": 3,<br> > > > +=C2=A0 "name": "Force H.264",<br> > > > +=C2=A0 "version": "1.0.0",<br> > > > +=C2=A0 "description": "Lightweight extension= that forces YouTube to play<br> > > > +H.264 (avc1) by blocking VP8, VP9, and AV1",<br> > > > +=C2=A0 "content_scripts": [<br> > > > +=C2=A0 =C2=A0 {<br> > > > +=C2=A0 =C2=A0 =C2=A0 "matches": [<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 "*://*.<a href=3D"http://y= outube.com/*" rel=3D"noreferrer" target=3D"_blank">youtube.com/*</a>",= <br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 "*://*.<a href=3D"http://y= outube-nocookie.com/*" rel=3D"noreferrer" target=3D"_blank">youtube-nocooki= e.com/*</a>",<br> > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 "*://*.<a href=3D"http://y= outu.be/*" rel=3D"noreferrer" target=3D"_blank">youtu.be/*</a>"<br> > > > +=C2=A0 =C2=A0 =C2=A0 ],<br> > > > +=C2=A0 =C2=A0 =C2=A0 "js": ["force_h264.js&q= uot;],<br> > > > +=C2=A0 =C2=A0 =C2=A0 "run_at": "document_sta= rt",<br> > > > +=C2=A0 =C2=A0 =C2=A0 "world": "MAIN",<b= r> > > > +=C2=A0 =C2=A0 =C2=A0 "all_frames": true<br> > > > +=C2=A0 =C2=A0 }<br> > > > +=C2=A0 ]<br> > > > +}<br> > > > --<br> > > > 2.34.1<br> > ><br> > ><br> > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-<br> > > Links: You receive all messages sent to this group.<br> > > View/Reply Online (#17560):<br> > > <a href=3D"https://lists.yoctoproject.org/g/meta-arago/message/17= 560" rel=3D"noreferrer" target=3D"_blank">https://lists.yoctoproject.org/g/= meta-arago/message/17560</a><br> > > Mute This Topic: <a href=3D"https://lists.yoctoproject.org/mt/119= 726830/7902621" rel=3D"noreferrer" target=3D"_blank">https://lists.yoctopro= ject.org/mt/119726830/7902621</a><br> > > Group Owner: <a href=3D"mailto:meta-arago%[email protected]= ect.org" target=3D"_blank">[email protected]</a><br> > > Unsubscribe: <a href=3D"https://lists.yoctoproject.org/g/meta-ara= go/unsub" rel=3D"noreferrer" target=3D"_blank">https://lists.yoctoproject.o= rg/g/meta-arago/unsub</a><br> > > [<a href=3D"mailto:[email protected]" target=3D"_blank">j= [email protected]</a>]<br> > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-<br> > ><br> > ><br> > <br> > <br> > --<br> > Jonathan Cormier<br> > Senior Software Engineer<br> > <br> > Office:=C2=A0 315.425.4045 x222<br> > <br> > <a href=3D"http://www.CriticalLink.com" rel=3D"noreferrer" target=3D"_= blank">http://www.CriticalLink.com</a><br> > 6712 Brooklawn Parkway, Syracuse, NY 13211<br> </blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si= gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d= iv dir=3D"ltr"><div><div><div><div><div><div><div>Jonathan Cormier<br>Senio= r Software Engineer<br><br>Office: =C2=A0315.425.4045 x222</div><div><img s= rc=3D"https://www.criticallink.com/wp-content/uploads/critical-link-logo-em= ail.png"><br></div><div><div><a href=3D"http://www.criticallink.com/" targe= t=3D"_blank">http://www.CriticalLink.com</a></div></div></div>6712 Brooklaw= n Parkway, Syracuse, NY 13211 </div></div></div></div></div><br></div></div= ></div> --0000000000000852030653d69f64--