Out of box H.264 and AAC support in Fedora 31 Workstation

Up until now, playing video files has been problematic in Fedora as we haven’t been able to include the necessary codecs for popular video formats. This is now changing in Fedora 31 Workstation.

We have two independent changes that landed just yesterday:

  • gstreamer1-plugins-bad-free 1.16.0-4.fc31 adds support for AAC, which is the audio format used in most .mp4 videos
  • gstreamer1-plugin-openh264 2.0.0 package adds support for main/high H.264 profiles, which is the video format used in most .mp4 videos

These changes together enable .mp4 video playback without having to use extra third party repositories such as rpmfusion.

The openh264 codec is available through the fedora-cisco-openh264 repository that we include by default, but is set to enabled=0. You can either edit /etc/yum.repos.d/fedora-cisco-openh264.repo and edit it to enabled=1, or just rely on gnome-software automatically offering to install it and enable the repo when playing videos through Totem (note that you need to grab fixed gnome-software from updates-testing for this to work).

AAC support is enabled through the fdk-aac-free library that is included on the install media.

11 thoughts on “Out of box H.264 and AAC support in Fedora 31 Workstation

  1. Seb

    Thanks for the update. It’s great to see this work land in official repos.

    Any thoughts on how to enable H264 playback in Firefox using these codecs?


    1. kalev Post author

      As far as I know Firefox uses ffmpeg / libav for video decoding and not gstreamer, so these codecs don’t help the firefox video playback situation at all.

        1. kalev Post author

          Yes, it still uses openh264, but only for WebRTC, that is video conferencing. Regular video decoding goes through ffmpeg, as far as I know. It used to be gstreamer, but that got changed at some point.

          I would love to be wrong here by the way, so please say if I am 🙂

        2. Christian Schaller

          Firefox use OpenH264 for WebRTC support as only Low-complexity profile was needed for that usecase. They never used it for general playback, but we do hope to change that though now that OpenH264 has full h264 support, but we haven’t had a chance/time to do so yet.

          1. John Doe

            Thanks, Kalev and Christian, I didn’t realize that there are two different areas where the codec could be used.

        1. kalev Post author

          There’s patent-encumbered code in ffmpeg that Fedora can’t ship. ffmpeg is not modular so we can’t only build portions of it either, sadly.


Leave a Reply

Your email address will not be published. Required fields are marked *