Cleanest way to install all video codecs on Fedora KDE 40

I recently downloaded and installed Fedora KDE 40 and this time I was pleasantly surprised that it came with most of the popular codecs preinstalled.

However, there are still some less popular but still widely used codecs that are missing. Next time I boot to Linux I will provide a few examples from VLCs error messages.

Is there a recommended way to install basically ALL of the multimedia codecs, including some of the less common ones.

I know this question is pretty old and I have looked at old posts, but there are several different answers to this same question.

In general, my preference is to avoid third party repositories unless a codec is available nowhere in official repositories.

One thing I really liked about OpenSUSE was the ability to get a vast gamut of codecs by installing a single zypper package from the official OpenSUSE repositories.

No offense, but codecs on Fedora seem like a mess.

I already have Fedora KDE 40 and VLC Media Player installed at this point.

VLC might have pulled in more codecs when installing, so maybe I should just check the video files I want to play one more time and see if I really need anything at this point.

sudo dnf install libavcodec-freeworld

And then see what gets installed.

Otherwise, swap ffmpeg-free with ffmpeg

https://rpmfusion.org/Howto/Multimedia

2 Likes

I’m confused because the link you provided shows ffmpeg-free and ffmpeg being swapped. There’s nothing in there about ffmpeg-full.

What exactly does this dnf swap accomplish?

Are you saying I should run ALL of these commands? I have an NVIDIA RTX 4070 on my laptop.

sudo dnf install libavcodec-freeworld
sudo dnf swap ffmpeg-free ffmpeg --allowerasing
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf update @sound-and-video
sudo dnf install intel-media-driver
sudo dnf install libva-nvidia-driver

I just want to make sure we’re on the same page before I go through with this.

Will the VA-API drivers from libva-nvidia-driver be used only if I launch VLC with switcherooctl?

Sorry, I changed the names

Fedora includes ffmpeg-free which only includes the free codecs. The swap replaces that with ffmpeg from rpmfusion, which should have all codecs.

No

The intel media driver can be left out I think.

The rest is to assure you get all the media stuff from rpmfusion only.

But I would just swap ffmpeg and install the nvidia driver

Okay so this?

sudo dnf swap ffmpeg-free ffmpeg --allowerasing
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf update @sound-and-video
sudo dnf install libva-nvidia-driver

You just need libavcodec-freeworld and mesa-va-drivers-freeworld (AMD) or intel-media-driver (Intel) for everything.

1 Like

so the intel package also includes nvidia support? For hardware decoding or encoding of video?

NVIDIA uses NVENC+NVDEC, and stuff in Fedora already will use it if the NVIDIA driver stack is installed.

2 Likes

Dell XPS 9530 laptop. It has Intel i9 processor, intel Iris graphics and NVIDIA RTX 4070.

Can you please remind me of the commands to add the proper repositories and then install what I need to install?

The phrasing of Neal’s post is ambiguous because of they way he is using “and” and “or” without being explicit about precedence. It is not clear to me whether libavcodec-freeworld is necessary for Intel, from reading his post, or whether he is saying this is necessary for AMD only. I assume that he means libavcodec-freeworld is necessary for both AMD and intel.

Can you tell me if this is correct?

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf libavcodec-freeworld

sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install intel-media-driver 

Bump.

Listen, folks. I need someone to please weigh in on what I wrote so I can mark it as a solution (?)

Answer my question…

Impatience on a volunteer forum gets you nowhere.

We cannot tell if it is the solution until you try the suggested solution and confirm it is or is not the proper solution. You must test it yourself.

I’m saying that the phrasing of the suggested solution is ambiguous, and therefore I still have not confirmed what I am supposed to test.

I am not clear whether Neal is saying this:

AMD: libavcodec-freeworld AND mesa-va-drivers-freeworld
Intel : intel-media-driver

… or whethere Neal is saying this …

libavcodec-freeworld for both AMD and Intel

AND

AMD: mesa-va-drivers-freeworld
OR
Intel : intel-media-driver

I need to know whether for intel I would use both libavcodec-freeworld and intel-media-driver or just use intel-media-driver by itself.

Therefore there is nothing for me to test at this point.

I’m not going to go into a whole process of trial and error. I’m just not going to do it. That’s a hard line at this point. Installing codecs is clearly the messiest part of Fedora installation and I want to be sure of what I am getting into before I try it.

What do you suppose happens if two packages both provide the same codec? Which one has precedence at that point? How would you even know which package is providing the codec when playing a video? You wouldn’t. That would be flying blind. Let’s say I installed a codec that plays videos correctly but doesn’t provide hardware acceleration. How would I know if hardware acceleration were working properly?

To me, these questions seem like a good reason to make sure I know what I am doing before doing it.

If you still don’t understand what I’m asking you’re not trying hard enough.

This is not the place to argue.

I did read what you wrote and my response was based on your 2 posts that I edited in as quotes.

I will state what Neal appears to have meant with the appropriate commands and steps.

  1. install the 2 indicated repos using the commands you already showed.
  2. Run the commands you posted in your post #3 above
sudo dnf install libavcodec-freeworld --allowerasing
sudo dnf swap ffmpeg-free ffmpeg --allowerasing
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf update @sound-and-video
  1. If necessary you can run these additional commands but only if deemed necessary after testing without those packages.
sudo dnf install intel-media-driver
sudo dnf install libva-nvidia-driver

I do not believe the intel driver is necessary and personally have never needed the libva driver even though I use nvidia.

The swap of ffmpeg-free and ffmpeg removes the codec limited version that is provided by fedora and installs the full featured version from rpmfusion along with all the necessary package changes to support that swap. (the reference to ffmpeg-full above appears to be a typo)

With that said, I would reiterate that none of us know if the suggested solution is valid for your needs and on your system until you, as the concerned party, have tested what was suggested. In the past there have been cases where a user refused to even perform one command until it had been verified and repeated several times. I hope you are not that timid in moving forward.

Listen I appreciate that what you’re saying is more constructive than the last post but I honestly don’t think that’s what he meant. It would be really handy if he could come back here. Just sayin’

And I literally have not had any issues with being ‘timid’ except for codecs. On Fedora they a just a total mess. Also NVIDIA drivers. But besides those two I’m good.

With codecs it seems impossible to be more limiting than what fedora provides as default. The suggestions have been clear and concise and follow what has been suggested and worked for many users in many many threads on this forum.

You of course have the choice to move ahead or to wait for an infrequent and occasional user to return.

Another documented guide which although a year old is still mostly valid (except for the fedora changes that require the ffmpeg and libavcodec-freeworld parts)
https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/

Added f40, video-codecs

Your commands here seem correct. The libavcodec bit does not seem to be related to any particular hardware. A search for libavcodec brought me to this page in the ffmpeg docs which does not indicate a hardware dependence:

https://ffmpeg.org/libavcodec.html

Codecs just generally seem to be quite messy because there are so many of them that it’s difficult to keep track of what needs what. I tend to just install the whole super set as noted in the RPM Fusion docs and that seems to ensure that everything works.

2 Likes

You’re saying this is correct?

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf libavcodec-freeworld

sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install intel-media-driver 

Yep–try it out?

(Note: one can undo dnf transactions using dnf history undo. man dnf has more info on this).