3.0.x fix exif rotation and flip for videso with rotation like EXIF 2457
I went through and found the related commits from 5-6 years ago that should be backported to get things to be flipped correctly as well as the commits that cleanup the code for unused variables.
Although I feel like the logic is a little convoluted, this keeps it "same" between master and 3.0.x branch which I know is very valuable with limited maintenance resources
Closes #29101