This is the code to convert a video into a timelapse video using openCV library.