Bug 2240127 - Some h.264 mp4s do not play on fedora chromium, while they do on other chromium packages (i.e. rpm build from source, flatpak)
Summary: Some h.264 mp4s do not play on fedora chromium, while they do on other chromi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: chromium
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL: https://v16m-default.akamaized.net/c4...
Whiteboard:
: 2224141 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-21 22:12 UTC by pmquinn5
Modified: 2024-05-08 04:25 UTC (History)
13 users (show)

Fixed In Version: chromium-119.0.6045.159-2.fc39 chromium-119.0.6045.159-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-23 01:24:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
affectedvideo (1.34 MB, video/mp4)
2023-09-30 03:20 UTC, pmquinn5
no flags Details


Links
System ID Private Priority Status Summary Last Updated
chromium.org chromium 1306560 0 None None None 2023-10-27 06:23:24 UTC

Description pmquinn5 2023-09-21 22:12:42 UTC
On the fedora chromium package, some h.264 mp4s like the one linked fail to play and show the following in chrome://media-internals:

00:00:00.179	error	"FFmpegDemuxer: unfixable negative timestamp."
00:00:00.180	error	"FFmpegDemuxer: demuxer error: DEMUXER_ERROR_COULD_NOT_PARSE"

The same video plays without error on flatpak chromium and chromium compiled from source. 


Reproducible: Always

Steps to Reproduce:
1. Open chromium installed from fedora repos
2. Open the linked video
3. Observe that the video fails to play and the error in media-internals
Actual Results:  
Video does not play, error in media-internals

Expected Results:  
Video plays properly

Version 117.0.5938.88 (Official Build) Fedora Project (64-bit)

Comment 2 pmquinn5 2023-09-21 22:25:46 UTC
Additional details: I have rpmfusion ffmpeg installed and -freeworld packages.

$ rpm -qa | grep freeworld
mesa-va-drivers-freeworld-23.1.7-1.fc38.x86_64
libavcodec-freeworld-6.0-11.fc38.x86_64
gstreamer1-plugins-bad-freeworld-1.22.5-1.fc38.x86_64
libheif-freeworld-1.16.2-1.fc38.x86_64

$ rpm -qa | grep ffmpeg
ffmpegthumbs-23.04.3-2.fc38.x86_64
ffmpeg-libs-6.0-11.fc38.x86_64
ffmpeg-6.0-11.fc38.x86_64
ffmpegthumbnailer-2.2.3-0.4.20210902gitd92e191.fc38.x86_64

Comment 3 pmquinn5 2023-09-30 03:20:49 UTC
Created attachment 1991257 [details]
affectedvideo

Comment 4 pmquinn5 2023-09-30 03:21:11 UTC
Attached a video since the prior link is no longer valid

Comment 5 z97s5o0s 2023-10-07 23:40:03 UTC
Same problem with most embedded OGG sounds
Used https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_OGG.ogg to test

Comment 6 Than Ngo 2023-10-26 17:32:58 UTC
Hi Neal,

it seems the problem is caused by the ffmpeg-first_dts.patch which is required for the system ffmpeg.
it should work if we revert the change and use the non-upstream function av_stream_get_first_dts().

Of course it will breaks the compatibility with system ffmpeg 6.x. 

Info: Qt upstream already reverted change made. https://bugreports.qt.io/browse/QTBUG-110749

Comment 7 Neal Gompa 2023-10-27 06:23:24 UTC
It looks like upstream is aware of this: https://bugs.chromium.org/p/chromium/issues/detail?id=1306560

Comment 8 Than Ngo 2023-10-27 07:27:21 UTC
*** Bug 2224141 has been marked as a duplicate of this bug. ***

Comment 9 Neal Gompa 2023-10-27 15:08:30 UTC
I originally had the patch on ffmpeg and dropped it (see bug 2061392), and I could put it back, but there's a couple of issues with that:

1. RPM Fusion complained about it and refused to carry it in their build, so it was going to be a persistent ABI break between both.

2. I don't know if shipping it would reduce upstream's pressure to remove it. Or maybe they don't care, I don't know.

That being said, if I shipped it again, then everything is "fine" as long as libavcodec-freeworld is used as an overlay library rather than swapping the full ffmpeg implementation. That's because the patch only touches libavformat.

I guess we could also ask on the upstream bug report if there's been more progress getting rid of the need for the first_dts patch.

Comment 10 Bruno Pitrus 2023-10-29 09:31:59 UTC
FWIW this affects anyone who wants to build anything chromium-containing for Fedora on the openSUSE Build Service (https://build.opensuse.org/).

We are building Electron and four apps (bitwarden, element, signal, vscode). Three of these can potentially play videos.

The lawyers do not allow building bundled ffmpeg, and Electron is not suitable for shipping in Fedora proper (or any non-rolling distro) due to upstream very short support period and frequent ABI breaks.

Comment 11 Neal Gompa 2023-10-29 18:54:19 UTC
(In reply to Bruno Pitrus from comment #10)
> FWIW this affects anyone who wants to build anything chromium-containing for
> Fedora on the openSUSE Build Service (https://build.opensuse.org/).
> 
> We are building Electron and four apps (bitwarden, element, signal, vscode).
> Three of these can potentially play videos.
> 
> The lawyers do not allow building bundled ffmpeg, and Electron is not
> suitable for shipping in Fedora proper (or any non-rolling distro) due to
> upstream very short support period and frequent ABI breaks.

Shipping Electron in Fedora is probably fine if someone is willing to do it as a versioned package (similar to what's done for LLVM in Fedora).

But fixing the usage of system ffmpeg is obviously required for this...

Comment 12 Bruno Pitrus 2023-10-29 20:38:27 UTC
ABI breaks can be treated by versioning, yes (though the utility for end-users is questionable due to extreme bloat — I don't like what Arch does with it, for instance).

But short support terms cannot.
Electron 27 (released half a month ago) ends support around (extrapolating) April 2024.
Fedora 39 (just released) ends support around (again extrapolating) around December 2024.

That's 8 months of security patches for Chromium you would have to identify and backport.
Add to that Node patches that i'm already getting bugreports about because upstream does not care to update their embedded Node copy.

Now multiply all of the above by how many releases you decide to multiversion.

(As a consolation prize, SOME of these are not critical for Electron due to not dealing with untrusted HTML/JS unlike a browser — but we still deal with untrusted images/videos)

Maintaining one release at a time with the guarantee “these four apps work” and dropping ABI compatibility without warning, is something i can do in my free time.

But if you decide to turn it into a fully supported OS runtime like node proper/java/python/etc (which arguably someone should, to hedge against upstream) it will quickly turn into a Qtwebengine-style mess of downstream patches that needs a full time job to maintain.

Comment 13 Neal Gompa 2023-11-11 14:37:26 UTC
I am reintroducing the first_dts patch with ffmpeg-free-6.0.1.

https://src.fedoraproject.org/rpms/ffmpeg/c/b3cfba90d45ccf7fdd58a4e0fa79e6527890b58d

Dependents should take care to make sure that is accounted for.

Comment 14 Bruno Pitrus 2023-11-11 22:20:10 UTC
Then please communicate that to the rpmfusion maintainers since they did not get the memo:
https://pkgs.rpmfusion.org/cgit/free/ffmpeg.git/commit/?h=f39&id=635db1887428d9454bec1607cb35cc31959307dd

otherwise chromium will fail to start for rpmfusion users once it starts linking against that symbol

Comment 15 Neal Gompa 2023-11-11 22:30:12 UTC
(In reply to Bruno Pitrus from comment #14)
> Then please communicate that to the rpmfusion maintainers since they did not
> get the memo:
> https://pkgs.rpmfusion.org/cgit/free/ffmpeg.git/commit/
> ?h=f39&id=635db1887428d9454bec1607cb35cc31959307dd
> 
> otherwise chromium will fail to start for rpmfusion users once it starts
> linking against that symbol

I already told them this morning. It will not fail if people only install libavcodec-freeworld on top of ffmpeg-free, though.

And we already recommend installing libavcodec-freeworld instead in that scenario.

Comment 16 Bruno Pitrus 2023-11-11 22:38:24 UTC
Would adding the following:
Conflicts: ffmpeg-libs%{_isa}
Requires: libavformat-free%{_isa} >= 6.0.1
Recommends: libavcodec-freeworld%{_isa}

to any downstream chromium packages guard against this scenario?

Comment 17 Neal Gompa 2023-11-12 00:42:38 UTC
(In reply to Bruno Pitrus from comment #16)
> Would adding the following:
> Conflicts: ffmpeg-libs%{_isa}
> Requires: libavformat-free%{_isa} >= 6.0.1
> Recommends: libavcodec-freeworld%{_isa}
> 
> to any downstream chromium packages guard against this scenario?

Yes, that should be fine.

Comment 18 Neal Gompa 2023-11-12 13:57:31 UTC
Note that we cannot have that Recommends in Fedora proper packages (we're not allowed to reference non-Fedora packages to trigger installation), but COPR and OBS packages can.

Comment 19 Than Ngo 2023-11-13 15:33:01 UTC
(In reply to Neal Gompa from comment #13)
> I am reintroducing the first_dts patch with ffmpeg-free-6.0.1.
> 
> https://src.fedoraproject.org/rpms/ffmpeg/c/
> b3cfba90d45ccf7fdd58a4e0fa79e6527890b58d
> 

Thanks for adding this patch back, Neal! Do you plan to add it for epel9 and fedora 37?

Thanks

Comment 20 Thomas Crider 2023-11-13 21:18:18 UTC
Bruno & Neal,

Bringing up my proposal from https://bugzilla.redhat.com/show_bug.cgi?id=2249271#c9 as it seems relevant to Bruno's comment 
#16

This would achieve what you want without referring to libavcodec-freeworld at all in the spec sheet. Needs minor changes from rpmfusions side as well but should work. Tested and working on my side on Nobara

Comment 21 Fedora Update System 2023-11-14 09:51:13 UTC
FEDORA-2023-108f6c4ef5 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-108f6c4ef5

Comment 22 Fedora Update System 2023-11-14 09:51:15 UTC
FEDORA-2023-abef58ab49 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-abef58ab49

Comment 23 Neal Gompa 2023-11-14 17:28:51 UTC
(In reply to Than Ngo from comment #19)
> (In reply to Neal Gompa from comment #13)
> > I am reintroducing the first_dts patch with ffmpeg-free-6.0.1.
> > 
> > https://src.fedoraproject.org/rpms/ffmpeg/c/
> > b3cfba90d45ccf7fdd58a4e0fa79e6527890b58d
> > 
> 
> Thanks for adding this patch back, Neal! Do you plan to add it for epel9 and
> fedora 37?
> 
> Thanks

Yes. I intend to do it as part of doing the update to 5.1.4 for those branches.

Comment 24 Neal Gompa 2023-11-14 21:15:33 UTC
ffmpeg-5.1.4 for f37 and epel9 is now proposed:

* f37: https://bodhi.fedoraproject.org/updates/FEDORA-2023-fa089964c8
* epel9: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-8024c335d1

Comment 25 Fedora Update System 2023-11-15 03:24:27 UTC
FEDORA-2023-abef58ab49 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-abef58ab49`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-abef58ab49

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 26 Fedora Update System 2023-11-15 04:06:49 UTC
FEDORA-2023-108f6c4ef5 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-108f6c4ef5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-108f6c4ef5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 27 Than Ngo 2023-11-15 12:09:10 UTC
> ffmpeg-5.1.4 for f37 and epel9 is now proposed:
> 
> * f37: https://bodhi.fedoraproject.org/updates/FEDORA-2023-fa089964c8
> * epel9: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-8024c335d1

could someone please test and grant karma so it can be pushed to stable quickly?
I would like to have this in chromium for fedora 37 and epel9!

Thanks!

Comment 28 Andre Klapper 2023-11-15 16:40:26 UTC
(In reply to Than Ngo from comment #27)
> could someone please test and grant karma

Using `chromium-119.0.6045.123-2.fc39.x86_64` which is supposed to fix this very ticket according to https://koji.fedoraproject.org/koji/buildinfo?buildID=2319736 , Chromium does not start on Fedora 39:

[acko@fedora ~]$ chromium-browser 
/usr/bin/chromium-browser: symbol lookup error: /usr/bin/chromium-browser: undefined symbol: av_stream_get_first_dts, version LIBAVFORMAT_60

No such problem after downgrading to `chromium-119.0.6045.123-1.fc39.x86_64`; Chromium starts correctly.

In case it's relevant, `ffmpeg-6.0-16.fc39.x86_64` is installed in both cases.

Comment 29 Nicolas Chauvet (kwizart) 2023-11-15 16:57:03 UTC
@a9016009 

We are going to issue an urgent update to fix this issue on the rpmfusion side. But publishing such ABI breaking update fast is terrible!

Comment 30 Fedora Update System 2023-11-18 02:41:54 UTC
FEDORA-2023-9425bb0115 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9425bb0115`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9425bb0115

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 31 Fedora Update System 2023-11-18 02:48:04 UTC
FEDORA-2023-5b46676afa has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5b46676afa`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5b46676afa

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Fedora Update System 2023-11-21 01:30:13 UTC
FEDORA-2023-5b46676afa has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5b46676afa`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5b46676afa

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 33 Fedora Update System 2023-11-21 02:30:13 UTC
FEDORA-2023-9425bb0115 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9425bb0115`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9425bb0115

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 34 Fedora Update System 2023-11-23 01:24:03 UTC
FEDORA-2023-9425bb0115 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 35 dontknow Cris 2023-11-23 08:35:41 UTC Comment hidden (spam)
Comment 36 Andre Klapper 2023-11-23 09:34:47 UTC
Hi non-guys, please file separate tickets for separate issues. Thanks.

Comment 37 dontknow Cris 2023-11-23 09:49:48 UTC Comment hidden (spam)
Comment 38 dontknow Cris 2023-11-23 14:17:40 UTC Comment hidden (spam)
Comment 39 Fedora Update System 2023-11-26 03:05:06 UTC
FEDORA-2023-5b46676afa has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 40 Wade Berrier 2023-11-30 00:46:40 UTC
(In reply to Andre Klapper from comment #36)
> Hi non-guys, please file separate tickets for separate issues. Thanks.

There was a separate ticket for the described teams issue: https://bugzilla.redhat.com/show_bug.cgi?id=2224141

and it was closed as a duplicate of this ticket.

Should it be tracked in this ticket?  Or re-open the "duplicate", or open a new ticket?

Comment 41 dontknow Cris 2023-12-11 09:10:56 UTC Comment hidden (spam)
Comment 42 Red Hat Bugzilla 2024-05-08 04:25:09 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.