I am quite new to OpenCV and would like to know what is the best approach to cut selected ranges of frames from a video-file. Say for example you have a video-file VideoIn.avi with 10000 frames, and you want to extract frames 100->500 into output video VideoOut1.avi, and frames 7000->8000 into output video VideoOut2.avi. What would be the best approach using OpenCV?