Acquiring frames for time-lapse videos