On youtube.com/html5 it’s possible to see what video formats are supported by the browser. For me on Fedora 25, I wasn’t able to watch H.264 nor MSE & H.264.

Start by installing RPM Fusion. When that’s done, install the package gstreamer1-plugins-ugly:

sudo dnf install gstreamer1-plugins-ugly

Restart Firefox and revisit youtube.com/html5. You should now have a blue checkmark on all six video formats.