How to do camera tracking for a video shot in portrait mode? Whenever I try to do camera tracking on a video that was shot in portrait mode (1080x1920 pixels), I fail to get a proper result. In the 3D view (with the video footage as a background) the trackers don't end up in the right place:

When I take the exact same video and rotate it 90 degrees before importing it in Blender, I get the correct result:

I am using Blender 2.90.
In both cases I do the tracking using Motion Model = &quot;Location&quot; and Match = &quot;Previous frame&quot;.
I keep the default camera settings that Blender uses for a new scene, and solve the camera motion using Refine = &quot;Focal Length, Optical Center, K1, K2)&quot;.
Then I set the floor, origin and y axis using the exact same trackers.
Of course I could do camera tracking on portrait scenes by rotating them first, but that would be very inconvenient: looking through the camera with the video background, I would have to work on a scene that was rotated 90 degrees.
My question: is it possible to do camera tracking in Blender using a video in portrait mode? If so, what should I do to make it work?
NOTE: A workaround would be to turn a portrait video into a landscape video by adding black bars to the left and right. I already tested this, and it works. But I would still like to know how to do camera tracking on a portrait video. You'd think this should be possible in an era in which portrait videos are almost more common than landscape videos.
An example of a portrait video for which blender gives an incorrect camera tracking result, can be found here: https://app.mediafire.com/icyvdawxlli8q
There you'll also find the same video in landscape format, that doesn't cause any problems.
Portrait

Under Solve tab check Refine &gt; Focal Length, Optical Center, Radial Distortion with those I got nice error only 0,10 px
Set Floor, Wall, Center, XY axis - with that I got camera correctly orientated

The only one thing that didn't match was camera Focal Length (and Shift).

If you select camera and go to Properties editor &gt; Object Data &gt; Camera &gt; Sensor Fit and switch to Horizontal &gt; Width 35 mm.

It does not fix the value itself, but empties and reconstructed scene match perfectly.

I still don't know why the given Focal Length is incorrect, but I'm not a tracking guru :) Alternatively you can adjust Focal Length and Shift manually according generated Empties.

Notes
How to determinate Lens Distortion
How to get better result ...