Got the exact same problem. Using avidemux 2.6.19.
Got newest android software on Nexus 5X.
Videos looks fine on the phone itself.
Videos automatically backed up to google photos looks fine too.
My MPC-HC ( https://mpc-hc.org/
) player had the upside/down problem, but upgrading to newest version 1.7.11 fixed it.
Video's recorded on the older Nexus 5 does not have this problem.
Perhaps google changed something in the rotation meta data or something.
I have several samples I can share if that's any help.