there are several parts to this
- getting a build OpenCV that’s compatible with VS 2019
- figuring out how to make a VS project that uses OpenCV
- the actual VideoCapture and imwrite stuff
what have you tried? what exactly were the results? where are you stuck?
why aren’t you simply using python?