Codecs / Video Playback in Firefox

For Rocky Linux, some videos may not playback properly. This is usually due to missing libraries or codecs. At a minimum, epel-release and rpmfusion-free-release can provide the necessary packages you can install to get some of that functionality back. You can also enable rpmfusion non-free for other additional libraries and codecs.

Rocky Linux 8

dnf install epel-release rpmfusion-free-release -y
crb enable
dnf install ffmpeg gstreamer1-plugins-ugly -y

Rocky Linux 9

dnf install epel-release rpmfusion-free-release -y
crb enable
dnf install ffmpeg \
  compat-ffmpeg4 \
  gstreamer1-plugin-openh264 \
  mozilla-openh264 \
  gstreamer1-plugins-ugly

Additional Packages and Information

It’s highly recommended to check out dnf search to find other codecs you may need. You may also want to view the multimedia page from rpmfusion.org.