This is what seems to have helped for me on Fedora:
-
Install free and non-free RPM Fusion repositories: https://rpmfusion.org/Configuration
-
Then run the following:
sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin sudo dnf groupupdate sound-and-video sudo dnf install mozilla-openh264 rm ~/.cache/gstreamer-1.0/registry.x86_64.bin
I was having trouble with many h265 videos until I cleared my gstreamer cache (I only needed to clear the 64-bit cache, this thread suggests clearing both 32 and 64-bit):
https://discussion.fedoraproject.org/t/h265-videos-wont-play-in-totem-after-installing-all-codecs/87341/17
You could set up btrfs snapshots, too. Of course, don’t forget to take a snapshot before you break your configs.