Opened 6 months ago

Last modified 11 hours ago

#69808 assigned defect

ffmpeg*: ability to select ffmpeg version as default

Reported by: eirnym (Eir Nym) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), laggardkernel (laggardkernel)
Port: ffmpeg6 yt-dlp

Description

Recently I found that there's two ports: ffmpeg (version 4.x) and ffmpeg6 (version 6.x). I've installed ffmpeg6 and it can't be used as default for some reason. Please add an ability to select ffmpeg6 version as default.

There's port select mechanism to do that and I'd like to use it instead of create manual links

Change History (8)

comment:1 Changed 6 months ago by mascguy (Christopher Nielsen)

Keywords: ffmpeg select ffmpeg6 removed
Owner: set to mascguy
Status: newassigned
Summary: Ability to select ffmpeg version as defaultffmpeg*: ability to select ffmpeg version as default
Version: 2.9.3

Symlinks are already created, so that you can use version 6 commands with a suffix of 6:

$ port installed ffmpeg6
The following ports are currently installed:
  ffmpeg6 @6.1.1_3+gpl2 (active)

$ which ffmpeg6
/opt/local/bin/ffmpeg6

$ which ffplay6
/opt/local/bin/ffplay6

$ which ffprobe6
/opt/local/bin/ffprobe6

We can't make ffmpeg6 the default, as it may break some older ports. But you can simply run ffmpeg6, ffplay6, and ffprobe6.

comment:2 Changed 6 months ago by eirnym (Eir Nym)

Hi, could you explain which exactly ports it would break? The port select works perfectly in other cases as I need link only files in /opt/local/bin and not libraries.

My problem is I installed yt-dlp without a hard dependency on ffmpeg and it doesn't recognise ffmpeg6. After manual linking them to versions without 6, it works as expected.

comment:3 in reply to:  2 Changed 6 months ago by mascguy (Christopher Nielsen)

Cc: ryandesign added
Port: yt-dlp added

Replying to eirnym:

My problem is I installed yt-dlp without a hard dependency on ffmpeg and it doesn't recognize ffmpeg6. After manual linking them to versions without 6, it works as expected.

If yt-dlp is the port that you're interested in, we can add a new variant to utilize ffmpeg6. Is that the only one?

comment:4 Changed 6 months ago by eirnym (Eir Nym)

ffmpeg is a big and heavy to update dependency. I won't use variant in yt-dlp.

comment:5 Changed 6 months ago by eirnym (Eir Nym)

Could you please explain which exactly ports it would break?

The port select works perfectly in other cases as I need link only files in /opt/local/bin and not libraries.

comment:6 Changed 6 months ago by eirnym (Eir Nym)

I searched ports git to find which ports could break and found that almost none of them depends on ffmpeg executables. and I believe that almost none of these would break if ffmpeg6 will be executed rather than ffmpeg4.

comment:7 Changed 12 hours ago by laggardkernel (laggardkernel)

Cc: laggardkernel added

comment:8 in reply to:  5 Changed 11 hours ago by ryandesign (Ryan Carsten Schmidt)

Replying to eirnym:

ffmpeg is a big and heavy to update dependency. I won't use variant in yt-dlp.

I don't understand your reluctance. If we add, for example, an +ffmpeg6 variant to yt-dlp, then because this variant is not enabled by default, if you try to install it, MacPorts would have to build yt-dlp from source on your system, which would take a couple seconds. But you would still be able to receive our precompiled ffmpeg6 port's binary to satisfy yt-dlp's dependency and wouldn't have to do the lengthy ffmpeg6 build from source.

Replying to eirnym:

The port select works perfectly in other cases as I need link only files in /opt/local/bin and not libraries.

Adding port select functionality to the ffmpeg family of ports is a reasonable request. However, the ffmpeg port currently installs /opt/local/bin/ffmpeg, whereas you would want that path to be the symlink created by port select. So the ffmpeg port first needs to be changed so that it installs its program somewhere else, for example /opt/local/bin/ffmpeg4. There are actually several programs, and their manpages, and maybe more files, that would need the major version number appended. At that point, renaming the ffmpeg port to ffmpeg4 would make sense. And all of the ports that use the ffmpeg port would need to be updated to adapt to these changes. It's a lot of work that nobody has yet volunteered to plan and do.

Replying to eirnym:

I searched ports git to find which ports could break and found that almost none of them depends on ffmpeg executables. and I believe that almost none of these would break if ffmpeg6 will be executed rather than ffmpeg4.

I don't see how you could know that. According to the output of port echo depends:':ffmpeg($|\s)' | wc -l there are 121 ports that depend on the ffmpeg port. We do not know which of those use ffmpeg's libraries vs. which of those use ffmpeg's executables, nor which of them would break if ffmpeg were updated to version 6 or newer. The change in major ffmpeg version from 4 to 6 to now 7 indicates backward incompatibility. Deprecated library APIs have been removed as have deprecated command line options. Older ports that depend on ffmpeg may well be using those APIs and/or command line options so that updating to a major new ffmpeg version would break them. Therefore it's prudent when updating a dependency like ffmpeg to a new major version to verify that the ports that depend on it still work afterward. Since there are so many of them, and this is a lot of work, this is probably why the ffmpeg port was not updated past major version 4 for so long, and why an alternate strategy of creating separate non-conflicting ffmpeg6 and ffmpeg7 ports was pursued instead.

Note: See TracTickets for help on using tickets.