After adding a <video> tag with an mp4 source to a new website I am building, I noticed that the video did not play in Firefox 59 on Ubuntu 16.04. It played fine in Chromium 65.
I knew that there had been issues in the past because mp4 is a patent-encumbered format; you have to pay royalties to the license holders if you ship an encoder or decoder. That's the reason Firefox does not ship native support for it:
[10] To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).
Firefox supports these formats on the following platforms: Windows Vista+ since Firefox 22.0, Android since Firefox 20.0, Firefox OS since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and OS X 10.7 since Firefox 35.0.
Firefox can download OpenH264, but that codec is only used for WebRTC (video conferencing), because it is not suitable for playing most web videos:
Firefox currently uses OpenH264 only for WebRTC and not for the <video> tag, because OpenH264 does not yet support the high profile format frequently used for streaming video. We will reconsider this once support has been added.
So, what am I missing? In Ubuntu 12.04 and 14.04 you had to install the ubuntu-restricted-extras package, but doing this did not help at all.
Then I actually searched for firefox video troubleshooting
and landed on
Firefox: Fix common audio and video issues
which - after reading many screen pages - told me:
Disable interfering extensions or ad-blocking software
And then it occured to me that I have the NoScript extension installed. By default, every domain is marked "not trusted", which means that playing videos from the very same host does not work until you mark it "trusted".