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, each degree of freedom representing a different camera motion of an original camera used to capture the video, the values of the DOFs representing magnitudes of the different camera motions; generating a spectrogram for each of the DOFs, each spectrogram based on the values of the DOFs over a time window 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.