I have video that was taken with a phone, with the phone vertical. When I watch the original video (MP4 file) it is oriented correctly but when I convert it to a smaller format it becomes horizontal.

Can anyone explain what is happening or how I can prevent it. I know there are other times when the rotation would be helpful.