This article explains why portrait videos recorded on iOS devices might appear rotated and how to address this issue.
Why are your portrait videos rotated?
Portrait videos recorded on your iOS device may appear rotated. This is a known issue with the iOS operating system.
When will this issue be fixed?
Apple has addressed this bug in the upcoming iOS version 18.6. You can find more details about the fix here.
What can you do in the meantime?
Until iOS 18.6 is available, you may need to manually rotate your videos. Rotate them after you finish recording.