1. A method, comprising: performing, by one or more computers: factoring two-dimensional (2D) feature trajectories from an input video sequence into a coefficient matrix representing features in the input video sequence and basis vectors representing camera motion over time in the input video sequence; applying an energy minimization technique to the basis vectors to generate smoothed basis vectors; generating smoothed output feature trajectories by combining the smoothed basis vectors with the coefficient matrix; and warping the input video sequence according to the smoothed output feature trajectories to generate a stabilized video sequence.