Bug 2218868

Summary: dlopen() ffmpeg please
Product: [Fedora] Fedora Reporter: Artem S. Tashkinov <aros>
Component: goldendictAssignee: Mosaab Alzoubi <moceap>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: moceap, vitaly
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/goldendict/goldendict/issues/1659
Whiteboard:
Fixed In Version: goldendict-1.5.0-2.fc37 goldendict-1.5.0-2.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-01 00:37:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artem S. Tashkinov 2023-06-30 10:31:14 UTC
Linking to ffmpeg directly is excessive considering the sheer amount of dependencies it brings.

Please consider `dlopen()`ing ffmpeg libraries.

Thank you!

Reproducible: Always

Comment 1 Vitaly Zaitsev 2023-06-30 12:26:21 UTC
A lot of users asked to build goldendict with ffmpeg. Since 1.5.0 it is possible, so we did it.

dlopening is the worst choice, because ffmpeg has multiple soversions and the app will need to handle them separately and will break on every ffmpeg major release.

Comment 2 Artem S. Tashkinov 2023-06-30 12:44:44 UTC
According to https://github.com/goldendict/goldendict/issues/1659#issuecomment-1614591012

There's 0 sense in linking to ffmpeg as users may specify any player they want including:

* ffplay
* mpv
* mplayer
* aplay

Please recompile goldendict without ffmpeg "CONFIG+=no_ffmpeg_player".

Rationale

* Specifying a single "Prefernces -> Audio -> Playback-> Use external program" option for those who actually use/need it is a _whole lot_ easier than asking the people who don't need any ffmpeg to install three dozen unnecessary packages.
* Extra libraries mean a _far wider attack surface_ - ffmpeg itself is notorious for that

Comment 3 Artem S. Tashkinov 2023-06-30 12:49:12 UTC
# dnf whatprovides ffplay
ffmpeg-free-6.0-2.fc38.x86_64 : A complete solution to record, convert and stream audio and video
Repo        : fedora
Matched from:
Filename    : /usr/bin/ffplay

ffmpeg-free-6.0-4.fc38.x86_64 : A complete solution to record, convert and stream audio and video
Repo        : updates
Matched from:
Filename    : /usr/bin/ffplay

Fedora does supply ffplay.

Here's two extra arguments for _not_ linking against ffmpeg:

* Currently Goldendict (without a ffmpeg dependency) can be used between Fedora versions - this change breaks that as ffmpeg is updated often
* Goldendict must be recompiled each time ffmpeg ups its major soname version - this means _more_ unnecessary work for you and unnecessary updates for Fedora users.

Comment 4 Artem S. Tashkinov 2023-06-30 12:51:34 UTC
And lastly, it's anecdotal evidence and can be dismissed but I know a ton of Fedora users who compile ffmpeg themselves including me because Fedora's ffmpeg is royally castrated and RPMFusion's ffmpeg comes with a ton of unnecessary dependencies for playing files and using devices (e.g. FireWire) no one has had for decades.

Comment 5 Vitaly Zaitsev 2023-06-30 12:53:56 UTC
Please stop reopening. You can always build it in a COPR with any flags you want. ffmpeg is now a part of Fedora and will include it in ISO since Fedora 39.

Comment 6 Vitaly Zaitsev 2023-06-30 13:00:10 UTC
If you want to minify a set of packages, you have chosen the wrong distribution. Fedora always build all available program features.

You need to try Gentoo and play with USE-flags.

Comment 7 Vitaly Zaitsev 2023-06-30 13:16:47 UTC
Fixed. Disabled ffmpeg.

Comment 8 Fedora Update System 2023-06-30 13:29:34 UTC
FEDORA-2023-0b5da236b8 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0b5da236b8

Comment 9 Fedora Update System 2023-06-30 13:29:34 UTC
FEDORA-2023-d1c3336aae has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1c3336aae

Comment 10 Vitaly Zaitsev 2023-06-30 13:30:07 UTC
Please test and give karma to these updates:
- https://bodhi.fedoraproject.org/updates/FEDORA-2023-0b5da236b8
- https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1c3336aae

Comment 11 Artem S. Tashkinov 2023-06-30 13:54:49 UTC
(In reply to Vitaly Zaitsev from comment #10)

Done.

Thank you very much!

Really appreciate it.

Comment 12 Fedora Update System 2023-07-01 00:37:56 UTC
FEDORA-2023-0b5da236b8 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2023-07-01 01:46:03 UTC
FEDORA-2023-d1c3336aae has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.