one of the first things I do when installing the Firefox on Fedora usually involves twitter so its quickly apparent on Fedora that videos and animated gifs (they convert animated gif’s to videos) dont play and show an error “The media could not be played.”
A while ago Cisco come to the worlds rescue regarding H.264 licensing with their opensource version of H264 (www.openh264.org), unfortunately on Firefox this is only used for webRTC and doesnt cover html’s video tag :/ (see https://bugzilla.mozilla.org/show_bug.cgi?id=1057646). Its worth installing anyway, so pop over to https://fedoraproject.org/wiki/OpenH264 for more info and how to install it.
Back to our original problem, Twitter videos, the solution is a simple one, we need to install a H.264 codec that will be used by html’s video tag. Firefox uses ffmpeg codecs if available so we can get up an running by installing that library
dnf install ffmpeg-libs
if you (re)start Firefox now you should be good to go. you cant test the codes are installed correctly by popping over to https://www.youtube.com/html5 and it will tell you if there are any issues.
As a side note, you can “solve” this problem by installing VLC, you should do this anyway. VLC installs ffmpeg as a dependency so you can solve your H.264 issue and get a better media player in one go 🙂
sudo dnf install vlc mozilla-vlc