I have, as test cases, two mp4 videos: they seem to be encoded the same, but one works in Firefox and one doesn't:
bad.mp4 (doesn't work) view download
good.mp4 (does work) view download
(NOTE - I thought that the "view" links above would open them using the browser's built-in player, but it looks like they use Dropbox's video player, which DOES work in firefox. So, to see it in firefox, download it and then drag it into Firefox or right click and choose Firefox from "open with" - thanks!)
They both play in Chrome.
There is a long discussion on the Mozilla bug tracking site about a related issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1130450
So, I need to answer three questions:
1) What is the problem with bad.mp4?
2) How can I detect, programmatically (ie at the linux command line) which videos, of a library of videos, are going to have this problem?
3) How can I fix it, programmatically (eg with FFMPEG).
One thing I noticed was that in the good one, the video is on stream 0 and the audio stream 1, while on the bad one it's the other way round. I tried swapping the streams but it didn't seem to help.
EDIT: re the Baseline profile
It was suggested that FF might not like Baseline profile videos. I was able to identify some baseline profile videos that work and some that don't, so I think that's not the key problem. Here are a couple more samples:
