https://bugs.kde.org/show_bug.cgi?id=476187

            Bug ID: 476187
           Summary: OpenH264 codec support
    Classification: Frameworks and Libraries
           Product: KPipeWire
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: mar...@marcan.st
                CC: aleix...@kde.org
  Target Milestone: ---

KPipeWire currently only supports software h.264 encoding via libx264. libx264
cannot be safely distributed by default in countries with restrictive software
patent legislation. OpenH264 is an open source h.264 encoder distributed by
Cisco, making use of their H.264 license (https://www.openh264.org/). It allows
distributions like Fedora to support h.264 without much fuss, and in particular
for the Fedora Asahi Remix we have hooked it up to be installed automatically,
so H.264 works out of the box in most apps.

Since KPipeWire uses libavcodec, and libavcodec has openh264 integration, it
should be pretty easy to generalize the code to not explicitly hardcode libx264
but rather allow openh264 as well.

The codec name in this case is `libopenh264`. Quality controls have to be
validated to make sure they work well on both codecs (see bug 476186 for the
story on libx264, I don't know off the top of my head what the appropriate
quality controls are for openh264 but I can investigate). Where libx264 is
available, it should be preferred, since x264 is widely considered to be the
best h.264 encoder in the world and particularly well optimized.

In the future there will be more h.264 encoder options, e.g. for Fedora Asahi
we plan to expose the internal hardware encoder as a h264_v4l2m2m
implementation. This is also supported by ffmpeg. So it might be worth setting
things up so that, at the very least as a fallback, "any codec that can encode
h.264" is selected. I believe this should be possible with ffmpeg by requesting
the `h264` codec and letting it pick an appropriate encoder. That will make
h.264 encoding at least work (if perhaps without ideal quality control) on any
machine that has a usable codec, without explicitly handling them all in
KPipeWire.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to