`dnf update` fails with `ffmpeg-libs`

$ sudo dnf update                
Last metadata expiration check: 3:54:57 ago on Mon 15 May 2023 12:30:58 PM +03.
Dependencies resolved.

 Problem: cannot install the best update candidate for package ffmpeg-libs-6.0-6.fc38.x86_64
  - nothing provides libopenh264.so.7()(64bit) needed by ffmpeg-libs-6.0-11.fc38.x86_64
==========================================================================================================================================================================
 Package                                Architecture                      Version                                 Repository                                         Size
==========================================================================================================================================================================
Skipping packages with broken dependencies:
 ffmpeg-libs                            x86_64                            6.0-11.fc38                             rpmfusion-free-updates                            8.0 M

Transaction Summary
==========================================================================================================================================================================
Skip  1 Package

Nothing to do.
Complete! 

When I try to remove it, it tries to remove pitivi, wireshark and chromium. Strange that these come from @updates, but depend on the package from @rpmfusion-free.

~ sudo dnf remove ffmpeg-libs
Dependencies resolved.
==========================================================================================================================================================================
 Package                                     Architecture               Version                                                 Repository                           Size
==========================================================================================================================================================================
Removing:
 ffmpeg-libs                                 x86_64                     6.0-6.fc38                                              @rpmfusion-free                      21 M
Removing dependent packages:
 chromium                                    x86_64                     113.0.5672.63-1.fc38                                    @updates                            205 M
 pitivi                                      x86_64                     2023.03-2.fc38                                          @updates                             11 M
 wireshark                                   x86_64                     1:4.0.5-1.fc38                                          @updates                            9.2 M

In any case, how to fix this update problem?

Try using dnf upgrade --refresh --best --allowerasing which should make sure all packages being upgraded meet the required dependencies.

I actually expect that error is reported with an upgrade being done while the mirrors were still being updated and not fully in sync. Most of the updates normally seem to happen on Tuesday and frequently such errors disappear in a few hours or less than a day, though not all follow that schedule.

I just did an upgrade and everything worked for me.

libopenh264.so.7 is provided by openh264 package from fedora-cisco-openh264 repo.

This repo is enabled by default in Workstation. If you’ve disabled it, you can enable it again:

dnf config-manager --set-enabled fedora-cisco-openh264

This new dependency was added recently:

# dnf changelog ffmpeg-libs
[...]
* Fri 12 May 2023 00:00:00  Leigh Scott <leigh123linux@gmail.com> - 6.0-10
- Enable openh264 for fedora

Those packages like chromium depend on various ffmpeg components, e.g. libavcodec, libswscale, etc.

Fedora’s ffmpeg is split into separate packages, while RPM Fusion’s ffmpeg is a combined package (mostly). E.g. libavcodec is provided by either libavcodec-free from Fedora, or ffmpeg-libs from RPM Fusion free.

If you don’t use any packages that require RPM Fusion’s full ffmpeg + ffmpeg-libs, you can swap back to Fedora’s ffmpeg-free + split packages:

dnf swap ffmpeg ffmpeg-free
2 Likes

Just tried again and it didn’t work. Now trying @jn64 variant.

$ sudo dnf upgrade --refresh --best --allowerasing
[sudo] password for anatoli: 
Fedora 38 - x86_64                                                                                                                         90 kB/s |  17 kB     00:00    
Fedora Modular 38 - x86_64                                                                                                                111 kB/s |  17 kB     00:00    
Fedora 38 - x86_64 - Updates                                                                                                               16 kB/s |  12 kB     00:00    
Fedora 38 - x86_64 - Updates                                                                                                              486 kB/s | 1.4 MB     00:02    
Fedora Modular 38 - x86_64 - Updates                                                                                                      123 kB/s |  17 kB     00:00    
RPM Fusion for Fedora 38 - Free                                                                                                            39 kB/s | 6.4 kB     00:00    
RPM Fusion for Fedora 38 - Free - Updates                                                                                                  12 kB/s | 6.4 kB     00:00    
Error: 
 Problem: problem with installed package ffmpeg-libs-6.0-6.fc38.x86_64
  - cannot install the best update candidate for package ffmpeg-libs-6.0-6.fc38.x86_64
  - nothing provides libopenh264.so.7()(64bit) needed by ffmpeg-libs-6.0-11.fc38.x86_64
(try to add '--skip-broken' to skip uninstallable packages)                                                                                                         
$  ~ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"

This works. :smiley: Thanks!

$ sudo dnf swap ffmpeg ffmpeg-free --allowerasing
2 Likes

That works, but you should be aware that there are many codecs supported by the ffmpeg package from rpmfusion that are not available in the ffmpeg-free package from fedora.

2 Likes

Gotcha. I needed to resolve this to upgrade to Fedora 39. Hopefully I would be able to live with free codec land. )

Have you enabled fedora-cisco-openh264 as suggested in mesage 3?

1 Like

In case it wasn’t clear, you could have used RPM Fusion’s ffmpeg as before if you enabled the openh264 repo. Swapping to Fedora’s ffmpeg-free wasn’t the only solution.

1 Like

Querying repos feels slow, so I didn’t enable it. I also don’t get the purpose of this additional repo. From OpenH264 - Fedora Project Wiki the codec is BSD. Why it can not be packaged as everything else?

The h264 codec has some status that violates fedora’s policy that requires they not distribute anything that may be encumbered with copyright, licensing, or patents that are restrictive. Thus fedora cannot include it directly. The same applies to packages that come from rpmfusion instead of directly from fedora.

From OpenH264

In order for Cisco to be responsible for the MPEG LA licensing royalties for the module, Cisco must provide the packaging and distribution of this code in a binary module format

The explanation is found in this page http://www.openh264.org/BINARY_LICENSE.txt.

-------------------------------------------------------
About The Cisco-Provided Binary of OpenH264 Video Codec
-------------------------------------------------------

Cisco provides this program under the terms of the BSD license.  

Additionally, this binary is licensed under Cisco’s AVC/H.264 Patent Portfolio License from MPEG LA, at no cost to you, provided that the requirements and conditions shown below in the AVC/H.264 Patent Portfolio sections are met.  

As with all AVC/H.264 codecs, you may also obtain your own patent license from MPEG LA or from the individual patent owners, or proceed at your own risk.  Your rights from Cisco under the BSD license are not affected by this choice.  

For more information on the OpenH264 binary licensing, please see the OpenH264 FAQ found at http://www.openh264.org/faq.html#binary 

A corresponding source code to this binary program is available under the same BSD terms, which can be found at http://www.openh264.org

Wherever that patent portfolio can be enforced, you can only get this software legaly from the dedicated Cisco server.

Besides, that repository is very small and rarely updated, so it can’t become a performance problem.

There are two problems.

  1. It is not really BSD license if people can’t really compile and use it from source. It doesn’t matter if the author modifies the license, or adds additional restrictions by a separate document, it is not a valid open source code anymore.

  2. Binary distribution allows to inject various spyware, which diminishes the benefits of having an open source OS.

  1. You can compile from source.

    I’m sure Cisco (and Red Hat) lawyers have some idea whether this is valid or not.

  2. All the rpms you install (from Fedora or elsewhere) are binaries. If binary distribution is a concern, you should use source-based distros like Gentoo or Nix.

When I have dnf update errors like that, if I haven’t installed anything in a while, I keep trying for a few days before messing with packages. It is often a mistake in the dependency list of a package or a package in a different repo that needs time to catch up. If you try to work around it by removing packages or by using options like --allowerasing, you can make a bigger mess.

You are talking about problems with other freeworld packages (recently mesa and libheif) being out of sync. This is a different situation entirely (missing dependency because the user disabled openh264 repo).

1 Like

Not totally different than your link, because still talking about issues with dependencies and mismatch between fedora repo and rpmfusion repo (and possibly mirroring delays).

ffmpeg-libs gets installed from rpmfusion when one installs ffmpeg. Ffmpeg and ffmpeg-libs are not compatible with ffmpeg-free from fedora.

As was stated above when one has 2 different packages (even from the same repo and otherwise compatible) a version mismatch may cause this type issue when the mirror being used is not fully in sync. In that situation, waiting for the mirror to sync then trying again usually solves it.

You are 100% correct in the comment about the user deliberately disabling a needed repo and that caused the error. The fix is to re-enable the repo.