On Fri, 13 Nov 2020 17:32:54 +0100 Adam Cecile <acec...@le-vert.net> wrote:
Package: chromium
Version: 83.0.4103.116-1~deb10u3.rtc.use.h264
Severity: important
Dear Chromium maintainer,
Current Chromium package in Debian lack H264 support for WebRTC, which
basically renders this feature unusable.
Yesterday I dig into the issue and figured out why it was behaving like this
(and not on other distribution nor with officiel Chrome package).
It seems OpenH264 has been un-bundled from the sources, and, unlike Firefox,
Chromium does not rely on FFMPEG for WebRTC decoding but needs this library.
I think it's quite an important feature that is missing here. I fully
understand that OpenH264 should not be bundled into Chromium sources but I
failed to find any discussion about this point, so I wanted to bring back this
issue on-top.
Despite being copyrighted by Cisco, OpenH264 is published on GitHub and
released under a 2-clause BSD license, which looks okay to me.
I think the issue might be legal, as H264 is tighted to MPEG group but FFMPEG
also comes with H264 encoder/decoder so that should not be an issue.
Would you consider enabling this feature ? At least if the main issue is just
the lack of OpenH264 package in Debian, we should at least create a RFP for it
and mark this bug being blocked by the RFP. This library should not be hard to
get into the archive, looks like being C++/ASM with Meson build-system.
Thanks in advance,
Regards, Adam.
Hi,
Currently chromium uses ffmpeg to decode h264 and uses openh264 to
encode such streams. It is described here:
https://www.chromestatus.com/feature/6417796455989248
There are a lot of patents on the h264 codec. Cisco created the open
source OpenH264 and ships this also as binaries. Cisco paid all
royalties for the library in binary form, this allows everyone to use
the *binary* of the OpenH264 library in compliance with the MPEG LA
license terms without paying anything extra to them. If you build it
yourself from the source code you still have to pay the royalties, at
least when you distribute your binary.
https://en.wikipedia.org/wiki/OpenH264
Compiling openh264 into chromium would probably be problematic from a
legal point of view for Debian.
To get chromium with openh264 support you can install the libopenh264
from deb-multimedia.org and then remove the disable/openh264.patch patch.
https://debian.pkgs.org/10/multimedia-main-amd64/libopenh264-5_2.0.0-dmo1_amd64.deb.html
https://debian.pkgs.org/10/multimedia-main-amd64/libopenh264-dev_2.0.0-dmo1_amd64.deb.html
libopenh264 is probably not inside the main Debian repository because of
these patent problems.
I would propose the following:
Create a libopenh264 in Debian main or non-free repositories which
downloads the binary which was build by Cisco when the package is
installed. I think Debian would then not ship the patented binary.
Create a libopenh264-dev with the matching header files.
We would do it in a similar way like this:
https://packages.debian.org/de/sid/firmware-b43-installer
Modify chromium to use dlopen to try to load the libopenh264.so.6
library dynamically and not statically link against it, if it is found
on the system it will support h264 in WebRTC, if it is not found this
feature will not work.
It looks like there are only two symbols used from this library:
WelsCreateSVCEncoder
WelsDestroySVCEncoder
Chromium would not depend on libopenh264, but if it finds this binary on
the system it would make use of it. User would not be forced to install
libopenh264 and it should not be a dependency.
I haven't started this, I only looked at the code and it looks like it
is possible. I would like to know if this solution would be acceptable
by Debian. My motivation is that I want to use GeForce Now and make it
easier to use Google Stadia with Chromium on Debian.
GeForce Now currently fails with "ERROR CODE: 0xC0F2220E" on Debian with
chromium because of the missing h264 support in WebRTC, with openh264 it
works.
I am not a lawyer and also not a Debian developer, but I would implement
this if this proposal looks ok.
Hauke