1. A method, comprising: accessing a video; estimating, for a plurality of frames of the video, values of a plurality of degrees of freedom (DOF) of a similarity motion model, a value of each of the DOFs of the similarity motion model representing a magnitude of a different camera motion of an original camera used to capture the video, the DOFs of the similarity motion model comprising a scale change DOF and a rotation change DOF; generating spectrograms for the DOFs based on the values of the DOFs over time windows comprising a plurality of adjacent frames of the video; generating a plurality of shake features based on the spectrograms; classifying the video based on the shake features; and stabilizing the video based on the classification.