Closed Bug 1435212 Opened 2 years ago Closed 2 years ago

Add support for FFmpeg 4.0 (libavcodec/libavformat v58)

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 61+ fixed
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- fixed

People

(Reporter: dominik, Assigned: jya)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180125084229

Steps to reproduce:

Current trunk (https://hg.mozilla.org/releases/mozilla-aurora/file/tip/dom/media/platforms/ffmpeg/) doesn't support FFmpeg git master branch (3.5), please add support for it. This was reported in RPMFusion bugzilla after we updated FFmpeg to 3.5 git snapshot (https://bugzilla.rpmfusion.org/show_bug.cgi?id=4778).
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Assignee: nobody → jyavenard
when I played with ffmpeg master a couple of months ago it was working...
(In reply to Jean-Yves Avenard [:jya] from comment #1)
> when I played with ffmpeg master a couple of months ago it was working...

It must have been more than 4 months ago before they switched the libavcodec major to 58

https://github.com/FFmpeg/FFmpeg/blame/master/libavcodec/version.h#L30
Priority: -- → P3
The ABI isn't stable yet.

I have asked FFmpeg to provide AVOptions accessor to fields we use, the response has been negative so far:

•nevcairiel> Hendrik its not something we will invest in our codebase to support
17:14 thats the entire point of changing the major version, its inherently incompatible
jya> Jean-Yves Avenard you find that the 4 fields I mentioned are unreasonable to provide?
17:18 (I can do without opaque)
17:19 I'm happy to submit a patch for those 4
17:19 
<•nevcairiel> Hendrik basically, yes, since we're actively working in the opposite direction
17:19 
<jya> Jean-Yves Avenard and what direction is that?
17:20 
<•nevcairiel> Hendrik less accessors, cleaner structs without half-private fields and the like

So for now we're stuck, have to wait until 3.5 ships to be able to support version 58.
Duplicate of this bug: 1450254
Summary: Add support for FFmpeg 3.5 (libavcodec/libavformat v58) → Add support for FFmpeg 4.0 (libavcodec/libavformat v58)
Comment on attachment 8969185 [details]
Bug 1435212 - Add support for FFmpeg 4.0.

https://reviewboard.mozilla.org/r/237922/#review243686

LGTM with nit.

::: dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp:36
(Diff revision 1)
>    "libavcodec.56.dylib",
>    "libavcodec.55.dylib",
>    "libavcodec.54.dylib",
>    "libavcodec.53.dylib",
>  #else
> +  "libavcodec.so.58",

Could put the "libavcodec.so.58" lower to maintain the grouping of libavcodec.\* and libavcodec-ffmpeg.\*
Attachment #8969185 - Flags: review?(bvandyk) → review+
Comment on attachment 8969185 [details]
Bug 1435212 - Add support for FFmpeg 4.0.

https://reviewboard.mozilla.org/r/237922/#review243686

> Could put the "libavcodec.so.58" lower to maintain the grouping of libavcodec.\* and libavcodec-ffmpeg.\*

No, because no distribution has it that way any more. The use of libav*-ffmpeg was for when some distribution shipped both Libav and
https://hg.mozilla.org/mozilla-central/rev/573a198b7fdf
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Duplicate of this bug: 1455966
Do you plan to backport it to Firefox 60? ESR lifetime is ~1 year and downstream may have only one ffmpeg package.
Flags: needinfo?(jyavenard)
(In reply to Jan Beich from comment #13)
> Do you plan to backport it to Firefox 60? ESR lifetime is ~1 year and
> downstream may have only one ffmpeg package.

Beta 60 is only a few days away, I doubt this change will be accepted.

I wonder however, why would someone run ESR with a bleeding repo/ffmpeg?
(In reply to Jean-Yves Avenard [:jya] from comment #14)
> (In reply to Jan Beich from comment #13)
> > Do you plan to backport it to Firefox 60? ESR lifetime is ~1 year and
> > downstream may have only one ffmpeg package.
> 
> Beta 60 is only a few days away, I doubt this change will be accepted.

Missing 60.0 release is fine, it has a short life unlike ESR60. It may take downstream a few months to update main ffmpeg package.

> 
> I wonder however, why would someone run ESR with a bleeding repo/ffmpeg?

Latest release is not bleeding edge or Firefox 59.0.2 would be one at this time. In FreeBSD Ports only one ffmpeg package is maintained due to lack of manpower. Once most 4.0 bustage is fixed it will update. Unfortunately, Firefox doesn't have --with-system-ffmpeg to disable planned obsolescence. firefox-esr package doesn't have dozens of options, hundreds of consumers or crashes if more than one version ends up in the same process, so it's easier to maintain.
:RyanVM what do you think?

Should we uplift to 60 once 60 is out?
Flags: needinfo?(ryanvm)
302 jcristau (the release owner for 60)
Flags: needinfo?(ryanvm) → needinfo?(jcristau)
Definitely not something for 60 at this point.  I guess maybe for the esr60 branch next cycle.
Flags: needinfo?(jcristau)
Transitional, unitedrpms is using a compatible ffmpeg for Firefox 59.x... 

https://github.com/UnitedRPMs/issues/issues/17
Flags: needinfo?(jyavenard)
Can you request a backport to ESR60?
Flags: needinfo?(jyavenard)
Comment on attachment 8969185 [details]
Bug 1435212 - Add support for FFmpeg 4.0.

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined: Firefox will no longer play videos as Linux distributions are updated. ESR 60 has a long shelf life, various distributions have started to ship with ffmpeg 4.0 already (such as fedora) 
Fix Landed on Version: 61
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: none

See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Flags: needinfo?(jyavenard)
Attachment #8969185 - Flags: approval-mozilla-esr60?
Comment on attachment 8969185 [details]
Bug 1435212 - Add support for FFmpeg 4.0.

support newer ffmpeg, approved for 60.1esr
Attachment #8969185 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
(In reply to Jean-Yves Avenard [:jya] from comment #14)
> I wonder however, why would someone run ESR with a bleeding repo/ffmpeg?

I, for one, have ffmpeg-9999 for encoding and for mpv-9999. And I keep Firefox on the ESR branch, because addons often cannot keep up with the pace of updates.
You need to log in before you can comment on or make changes to this bug.