Twitter media cannot be played from Firefox

The solution is straightforward: just install ffmpeg:

sudo apt-get install ffmpeg

I did have all required codecs, tools & libs installed (ffmpeg, restricted extras, etc), but still was getting a lot of (but not all) media not playing -- mostly noticeable on twitter. Some played, others did not.

I was able to resolve this by going into Firefox preferences > content > DRM content; the check box "Play DRM Content" was not checked. After checking the box and restarting firefox, these media once again started playing in firefox. (Sample test tweet to verify.)

Ubuntu 17.04 (zesty), Firefox 54.0 (64-bit)