1. A method comprising: obtaining a video footage containing a sequence of image frames captured by a non-stationary capturing device; estimating a moving direction of the non-stationary capturing device for a plurality of frames in the sequence of image frames; and generating a shortened video footage having fewer frames than said video footage, by sampling the sequence of image frames, wherein the sampling is carried out by selecting specific image frames that minimize an overall cost associated with a deviation from a specific direction related to the moving direction, calculated for each of said plurality of image frames.