Rotate a video taken on an iPhone, and save it as an MP4
I opened iMovie, and imported the upside down video (which only appears upside down in non-Apple apps, like VLC). Since iMovie is an Apple app, it is able to read the rotation metadata, so it showed the video correctly. I then simply exported the video as an MP4 from iMovie, which resulted in a video with the correct orientation.

No manual rotation was necessary in iMovie since it already was able to read that metadata, as I mentioned.