From 7517fb7e9b1e24b4a30f614c6df69f7961b94680 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Fri, 24 Apr 2026 20:57:20 +0000 Subject: [PATCH] ohm task (b.2): neither system ffmpeg nor Chromium's V4L2 decoder reachable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to the user's "can Brave use our ffmpeg instead?" question. Both alternatives investigated, both dead ends: - System ffmpeg path: Chromium/Brave link a vendored ffmpeg. Even the use_system_ffmpeg builds use system libavcodec only as a pure SW decoder (FfmpegVideoDecoder — no hw_device_ctx / hwaccel wiring). Our ffmpeg-v4l2-request-git would be used as SW. No HW speedup. - Chromium's own V4L2VideoDecoder: class IS compiled into brave-bin (strings /opt/brave-bin/brave | grep V4L2VideoDecoder hits), but the factory is ChromeOS-gated. Feature flag strings UseChromeOSDirectVideoDecoder / V4L2FlatStatelessVideoDecoder / V4L2FlatVideoDecoder do NOT appear as strings in the binary — only AcceleratedVideoDecodeLinuxGL does, and that's the VA-API gate, not a V4L2 gate. Setting those flags on the cmdline is a no-op on this build. Conclusion: unlocking browser HW decode on ohm requires either (a) Chromium rebuilt with V4L2 decoder factory extended to Linux non-ChromeOS, (b) a multiplanar-capable libva-v4l2-request, or (c) a new chromium-on-Linux HW decode path that hasn't shipped yet. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 2f6de6f..bb4286f 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,23 @@ Non-browser HW decode (GStreamer `v4l2codecs`, FFmpeg via ohm is a useful starting point for anyone who wants to pick up the multiplanar port. +#### Why not "Brave via our system ffmpeg" or Chromium's own V4L2 decoder? + +- **System ffmpeg is not a decoder source for Chromium/Brave.** Chromium + links a vendored ffmpeg fork; even the Arch-style `use_system_ffmpeg` + builds use system `libavcodec` only as a pure software decoder + (`FfmpegVideoDecoder`), with no `hw_device_ctx` / hwaccel wiring. + Installing our `ffmpeg-v4l2-request-git` would not give Brave HW decode. +- **Chromium's own `V4L2VideoDecoder` class is compiled into `brave-bin`** + (verified via `strings`) but gated behind ChromeOS-only runtime factory + checks. `UseChromeOSDirectVideoDecoder` / `V4L2FlatStatelessVideoDecoder` + feature flag names do **not** appear as strings in the brave-bin binary + — only `AcceleratedVideoDecodeLinuxGL` does, which is a VA-API gate, not + a V4L2 gate. Enabling those flags at the command line is a no-op on this + build. Unlocking V4L2 on Linux Brave would require either (a) a Chromium + rebuild with different buildflags, or (b) upstream patches to extend the + V4L2 decoder factory to Linux non-ChromeOS targets. + ### Acceptance criterion **1080p @ 30 fps, no dropped frames.** Applies to every device and every