Apply transform (rotation) to video clip before motion tracking I have a video clip filmed on a GoPro in wide angle format.  I've figured out how to apply the Lens Distortion K1, K2, and K3 values which will cancel out the fisheye look of the video.  I drew polylines on the video in the Motion Tracking tab of Blender, and edited the lens distortion K values to match the contour of the polylines to features in the video.

However, the polylines do not match up properly because the video needs to be rotated slightly before changing the lens distortion.  I can rotate the video after applying the distortion just fine.  But I cannot figure out how to apply the rotation transform to the video before applying the distortion, viewing the rotated video in the motion tracker, in order to be able to draw polylines on the already rotated video.  Is there a way to do this besides rendering out a rotated video and loading it back into the motion tracker?
Though I don't think is necessary to rotate your image, here's how to do it:

Add two trackers on opposite ends of the frame that don't track anything in the footage, with a a weight of 0 (so they don't add anything to the camera solver) and use those to control the rotation.

On the Display tab enable Display Stabilization.



Enable 2D stabilization. Select both trackers and add them to the stabilization box.

Do not enable autoscale, enable Stabilize Rotation and select one of the trackers to control the rotation of the image. 



You can rotate the image now by moving any of the trackers up or down.