-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable platform decoder for proprietary_codecs flag on Linux #710
Comments
Under Developer tools library > their is In example ; if licensed or patented Target multimedia (video, audio and image) playback require decoder library software, check whether that decoder, if already in-built in user's Device, If not present than prompt message to user that playback will require external (FOSS) software app like VLC player for their OS. Uazo, it may simplify your doubt or uncertainties. |
This setting only enables support of proprietary codecs. That means that the browser would accept that media for processing. The answer to your question however is not a trivial thing. Overall, it is probably OK to have To try and answer your question, let's separate following concepts
Now let's outline how it all works together. In order to produce a compressed multimedia file one needs an implementation of a compression standard. If an implementation is a software for example, usual terms for software apply, that is one needs a license for this software. If a compression standard is a proprietary one, i.e. it is covered by patents, in addition to software license one needs a license from patent holders. The two licenses are usually combined into one if patent holders also offer an implementation. This is however not always the case. In order to "display" a compressed multimedia file the procedure is the same with the exception that for "compressing" one needs a coder and for "uncompressing" — decoder. The two are usually combined into codec. Chromium built with So now let's take MPEG-4 Part 10 (or more commonly known as H.264 or AVC) for example. For this compression standard exists free and opensource implementation: x264, which likely to be used. And it indeed does not grant any licenses from MPEG patent holders: https://web.archive.org/web/20160307015234/http://x264licensing.com/content/does-x264-license-include-avc-patent-royalties. So what are they? According to Via Licensing and MPEG LA website one should obtain a license and pay a royalty fee starting at 100,001st sold unit. Not selling anything should probably waive this requirement. Yet another aspect is that of building Cromite together with GPL-2 licensed x264 and distributing the result. Perhaps by now you can realise why Google is so careful with this thing. As a side note I should mention that Firefox uses OpenH264 instead of x264. OpenH264 is developed by Cisco and is released under simplified BSD license. What is peculiar here is that Cisco pays royalty fees and promises not to pass royalty fees onto those who use their provided binaries. Those who build OpenH264 from source should obtain licenses and pay fees however. |
@PF4Public thanks, it's clear.
the idea is to understand what is activated with that flag and to check the corresponding licence, both related to the format and to the software that read that format. |
@Universalizer I don't think it has much to do with this, but I could be wrong |
As you mentioned this, it means Chrome itself uses Go to Cromite Settings > About Cromite > Legal information > Open Source License > You don't need to worry for these software libraries (encoder, decoder and other utilities). As per codec "H.264 MPEG-4 Part 10 (or more commonly known as H.264 or AVC) for example & H.265", both being heavily patented and licensed, also widely distributed under container ".mp4", But, ffmpeg contains libx264 & libx265 encoder (As a wrapper, open source implementation by VLC Developer) adopted under ffmpeg, so no problem. Carl, as Bromite developer is also genius for licensing knowledge, but to clear your doubts, Contact Carl if possible, he may help you. |
is not correct, I think instead I have to check.
no, he must be free to do what he wants. i hope he comes back, but i won't bother him. |
And I think a problem exists instead.
refs:
test: |
Exactly the same situation as what I described with H.264. |
And I think you're right. |
the only correct way is to use the libraries built into the s.o., because the licensing of those is up to the s.o. distributor. |
If you didn't request it specifically, you're probably using built-in ffmpeg. build/linux/unbundle/replace_gn_files.py might be of interest for you.
Why? https://packages.gentoo.org/packages/media-libs/fdk-aac https://packages.debian.org/bookworm/libfdk-aac2 |
mstorsjo/fdk-aac#118 (comment) because, as I understand it, distribution is not lawful without an VIA licence, and, mistakenly therefore, I thought that being under licence was not included in linux distributions, but I am probably wrong. |
As mentioned earlier, But, Multimedia Container *** General Format: MPEG-4 Format profile: Base Media / Version 2 Codec ID: mp42 (mp41/isom/iso2) *** Video ID: 1 Format: AVC Format/Info: Advanced Video Codec Codec configuration box: avcC *** Audio ID: 2 Format: AAC LC Format/Info: Advanced Audio Codec Low Complexity Codec ID: mp4a-40-2 Then, Cromite user's will have only These is my guess, probably right or wrong ?, I don't know. |
https://github.com/FFmpeg/FFmpeg official github.com |
if possible, I would try to maintain support for proprietary codecs delegating them to the s.o. libraries so that the responsibility for the licence falls on the s.o. distributor rather than on me. |
Good decision. |
It would be easy to achieve on Linux, but I have my doubts about Windows and Android. Have you investigated the latter? |
Uazo, It is possible, |
no, I am doing the rebase at 121, I will look at this immediately afterwards, for me it is a priority.
ah, you make it easy. if chromium doesn't provide for it, I won't be able to do it. |
This is what I suspect to be the case with Windows and Android. |
i hope this is not the case. last night, reading the code on the couch :) instead it seemed to me that only cast devices use those libraries directly, and therefore only those need to be licensed, but to understand this i have to edit some gn args and recompile. |
maybe related #723 (reply in thread) |
so, pretty complex issue. it seems like it's perfectly legal to use those codecs the moment you use functionality external to your application, the s.o.'s api i.e. external libraries, because at that point, the license has to be acquired from whoever produced that library, and so it's not my problem. indeed it seems that it is not legal to add support for AAC and H264 (the latter only in desktops and ios) in cromite. in fact it seems that it is not really legal to add it in any of the cromite-derived projects, unless the distributor (in this case me) has the necessary licenses available for distribution, which of course I don't know. I also went to look at the situation in the other applications.
in the forks:
however, in https://www.via-la.com/licensing-2/avc-h-264/avc-h-264-licensees/ i find adobe, apple, microsoft, google but not brave, calyx or eOs. (fantastically vivaldi reveals the surprise! see further...) then i found this:
where he talks about the spitzer project, which actually changes from v85 the behavior in android using the pipeline already active in the desktop, which used ffmpeg for decoding. the problem can big is that there is no alternative to the ffmepeg demuxer but there is a new project still in development 1266991 that allows the use of the hls format in android by restoring the use of the android libraries, code that would have to be understood thoroughly and exploited to handle aac as well (which is also the only codec not handled in android). build/linux/unbundle/replace_gn_files.py is not needed because it replaces the library root of source code using the system one, it does not make the library linked to the system one at runtime. instead for windows and linux there is vivaldi's code! I decided to disable aac and h264 in desktop, now we have to figure out how to do it:
|
What do you mean? ldd /usr/lib64/cromite/chrome | grep libav
libavcodec.so.60 => /usr/lib64/libavcodec.so.60 (0x00007f9823800000)
libavformat.so.60 => /usr/lib64/libavformat.so.60 (0x00007f9823400000)
libavutil.so.58 => /usr/lib64/libavutil.so.58 (0x00007f9823213000) Those are the libraries from ffmpeg. It is not from your releases, it is how I built it. |
note, those who build for themselves are not a problem, it is those who distribute the build who have the problem.
correct me if I am wrong:
Which is actually what the script does. |
Will it be supported in Cromite ? libx264 (FFmpeg Library) libx265 (FFmpeg Library) |
@uazo With |
certainly.
In my opinion, you can bring this to the attention of the chromium team. |
another update. |
I checked for linux, it is not true that they use a particular ffmpeg modified version. to what are you referring?
so do you distribute a version of ffmpeg without the correct licences? or is it only for your internal use? is that correct, can you do it? I ask because if there is a legal way I would do it too. |
If your library is loaded in runtime (on demand, like LoadLibraryEx and GetProcAddress in Windows), then you could download it on your build machine, checksum it, hardcode it into the binary, and then compare the checksum before each load of the library. Checking the manually built library is a big problem in it's own. Simplest would be to verify the archive of the sources from which it should be built because making reproducible builds so that you could verify the resulting binary everywhere is a daunting task (dependent on the size of a library of course)
I don't think such a thing exists in Linux, but I'll do a research on the topic and let you know if I can find something.
Compare attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
#define AV_PROGRAM_RUNNING 1 attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
// Chromium: We use the internal field first_dts vvv
int64_t av_stream_get_first_dts(const AVStream *st);
// Chromium: We use the internal field first_dts ^^^
#define AV_PROGRAM_RUNNING 1 They use internal field, which means that if system library does not provide this field it leads to a runtime failure.
No, I build this library locally and anyone building ungoogled-chromium or Cromite using my overlay should also do the same locally. In this case I do not distribute anything at all. I also provide pre-compiled ungoogled-chromium, which does not require system ffmpeg, but it has proprietary codecs enabled. I'm not a lawyer and didn't investigate how unlawful/lawful that might be :)
Would creating several virtual machines and gathering logs there suffice? I could do this if it might help you. |
I like this solution, I don't know if I can do it, but I like it: I first have to check whether the build is reproducible so I could put the .so without the proprietary codecs in the official build, and allow the user to replace the library.
you're right, I checked it wrong.
Yeah, same problem as mine.
unfortunately i think i need physical machines, i.e. not virtual ones: I don't want to make public yet the fingerpriting flaw i found until i solve it, we can discuss it later.
thanks, we'll talk again, actually you're already helping me a lot. |
for those who want to try, release: https://github.com/uazo/cromite/releases/tag/v122.0.6261.111-6144adc65250e66b02fbd658839dd786fa5bf1ea is the same version of https://github.com/uazo/cromite/releases/tag/v122.0.6261.111-aeb7dce1db09d042991073d6352a1363efeeceee but with the patch of #856 |
Platform audio-visual (AV) decoding under Linux including xHE_ACC |
that is exactly the problem. |
We have to be pragmatic, unless the desire is that each indiviual user of Chromium compiles it from source, |
well, that would be nice. the use of my docker images would already allow this. |
@lpslp If you cannot publish links with failing videos, you can examine the "Media" tab in devtools, to see which codec was expected and wasn't found. |
It looks like they're trying to use the codec, that is for some reason disabled in Cromite. The "Track" tab should show the actual codec that is used there, for example AV1 or h264. |
sorry, but i don't know where is it... |
|
|
but that's windows, what does that have to do with this issue? |
from https://groups.google.com/a/chromium.org/g/chromium-dev/c/uI5knHDhLjE
in cromite is active by default because it is derived from bromite.
it is a question of whether the enabling is correct or I might run into legal problems.
The text was updated successfully, but these errors were encountered: