When I record videos with my phone while it is vertically orientated the video displays correctly in most media video players. But then I noticed that when I load the video into Blender it displays horizontally as if it was rotated 90 degrees counter clockwise. So I checked the properties details and it really says 1920x1080 which is horizontal, but the phones and media players display it vertically as recorded. So I tried rotating it clockwise by 90 degrees using:
ffmpeg -i input.mp4 -vf "transpose=1" output.mp4
So now it rotates visually from vertical to horizontal and the details still show 1920x1080 which now matches the visual horizontal display. So now I tried doing the opposite on the original video, rotate counterclockwise:
ffmpeg -i input.mp4 -vf "transpose=2" output.mp4
Which also rotates visually from vertical to horizontal and the details still also show 1920x1080. So both 90 degree counterclockwise and clockwise rotations don't fix the video, but only made sure that now the properties details were in sync with the visual display.
So how do I fix the original video to display 1080x1920 to match the visual vertical representation of video? My current workaround is to rotate it clockwise and then rotate it counterclockwise using:
ffmpeg -i input.mp4 -vf "transpose=1,transpose=2" output.mp4
It looks like the phone is messing up the meta data or something? Is there a better way to solve this or to normalize the video with another command?